Skip to content

Commit 7bfa6fa

Browse files
committed
Loader.useXDomainRequest boolean added. If true (the default is false) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it (phaserjs#1131 phaserjs#1116)
1 parent 26484ea commit 7bfa6fa

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ Version 2.1.0 - "Cairhien" - -in development-
7979
* Device will now detect for Cordova (thanks @videlais #1102)
8080
* Arcade Physics Body.skipQuadTree is a new boolean that if set to `true` when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
8181
* Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
82+
* Cordova 'deviceready' event check added (thanks @videlais #1120)
83+
* Loader.useXDomainRequest boolean added. If `true` (the default is `false`) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it (#1131 #1116)
8284

8385
### Bug Fixes
8486

@@ -90,6 +92,7 @@ Version 2.1.0 - "Cairhien" - -in development-
9092
* Resolves issue with pixel perfect click / over detection on Sprites that used trimmed image atlases for animations or frames > 0.
9193
* Group.swap() updates the Z index values properly (thanks @Blank101 #1090)
9294
* Device now recognises ChromeOS as a desktop (thanks @alvinsight @hilts-vaughan #1091)
95+
* Fixed Point.rotate bug (thanks @gamedolphin #1107)
9396

9497
### p2.js 0.6.0 Changes and New Features
9598

src/loader/Loader.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ Phaser.Loader = function (game) {
9999
*/
100100
this.onPackComplete = new Phaser.Signal();
101101

102+
/**
103+
* @property {boolean} useXDomainRequest - If true and if the browser supports XDomainRequest, it will be used in preference for xhr. You'll know if you need this or not.
104+
* @default
105+
*/
106+
this.useXDomainRequest = false;
107+
102108
/**
103109
* @property {array} _packList - Contains all the assets packs.
104110
* @private
@@ -1218,7 +1224,7 @@ Phaser.Loader.prototype = {
12181224

12191225
case 'json':
12201226

1221-
if (window.XDomainRequest)
1227+
if (this.useXDomainRequest && window.XDomainRequest)
12221228
{
12231229
this._ajax = new window.XDomainRequest();
12241230

0 commit comments

Comments
 (0)