text: (function functionName (_Phaser) {
  
      var xhrLoad = _Phaser.Loader.prototype.xhrLoad;
  
      /**
      * If true and if the browser supports XDomainRequest, it will be used in preference for XHR.
      *
      * This is only relevant for IE 9 and should _only_ be enabled for IE 9 clients when required by the server/CDN.
      *
      * @property {boolean} useXDomainRequest
      */
      _Phaser.Loader.prototype.useXDomainRequest = false;
  
      /**
      * @private
      * @property {boolean} _warnedAboutXDomainRequest - Control number of warnings for using XDR outside of IE 9.
      */
      _Phaser.Loader.prototype._warnedAboutXDomainRequest = false;
  
      /**
      * Starts the xhr loader - using XDomainRequest.
      * This should _only_ be used with IE 9. Phaser does not support IE 8 and XDR is deprecated in IE 10.
      *
      * This is designed specifically to use with asset file processing.
      *
      * @method Phaser.Loader#xhrLoadWithXDR
      * @private
      * @param {object} file - The file/pack to load.
      * @param {string} url - The URL of the file.
      * @param {string} type - The xhr responseType.
      * @param {function} onload - The function to call on success. Invoked in `this` context and supplied with `(file, xhr)` arguments.
      * @param {function} [onerror=fileError]  The function to call on error. Invoked in `this` context and supplied with `(file, xhr)` arguments.
      */
      _Phaser.Loader.prototype.xhrLoadWithXDR = function (file, url, type, onload, onerror) {
  
          // Special IE9 magic .. only
          if (!this._warnedAboutXDomainRequest &&
              (!this.game.device.ie || this.game.device.ieVersion >= 10))
          {
              this._warnedAboutXDomainRequest = true;
              console.warn("Phaser.Loader - using XDomainRequest outside of IE 9");
          }
  
          // Ref: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
          var xhr = new window.XDomainRequest();
          xhr.open('GET', url, true);
          xhr.responseType = type;
  
          // XDomainRequest has a few quirks. Occasionally it will abort requests
          // A way to avoid this is to make sure ALL callbacks are set even if not used
          // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9
          xhr.timeout = 3000;
  
          onerror = onerror || this.fileError;
  
          var _this = this;
  
          xhr.onerror = function () {
              try {
                  return onerror.call(_this, file, xhr);
              } catch (e) {
                  _this.asyncComplete(file, e.message || 'Exception');
              }
          };
  
          xhr.ontimeout = function () {
              try {
                  return onerror.call(_this, file, xhr);
              } catch (e) {
                  _this.asyncComplete(file, e.message || 'Exception');
              }
          };
  
          xhr.onprogress = function() {};
  
          xhr.onload = function () {
              try {
                  if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599) { // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.
                      return onerror.call(_this, file, xhr);
                  }
                  else {
                      return onload.call(_this, file, xhr);
                  }
              } catch (e) {
                  _this.asyncComplete(file, e.message || 'Exception');
              }
          };
  
          file.requestObject = xhr;
          file.requestUrl = url;
  
          //  Note: The xdr.send() call is wrapped in a timeout to prevent an issue with the interface where some requests are lost
          //  if multiple XDomainRequests are being sent at the same time.
          setTimeout(function () {
              xhr.send();
          }, 0);
  
      };
  
      /**
      * Starts the xhr loader.
      *
      * This is designed specifically to use with asset file processing.
      *
      * @method Phaser.Loader#xhrLoad
      * @private
      * @param {object} file - The file/pack to load.
      * @param {string} url - The URL of the file.
      * @param {string} type - The xhr responseType.
      * @param {function} onload - The function to call on success. Invoked in `this` context and supplied with `(file, xhr)` arguments.
      * @param {function} [onerror=fileError]  The function to call on error. Invoked in `this` context and supplied with `(file, xhr)` arguments.
      */
      _Phaser.Loader.prototype.xhrLoad = function (file, url, type, onload, onerror) {
  
          if (this.useXDomainRequest && window.XDomainRequest)
          {
              this.xhrLoadWithXDR(file, url, type, onload, onerror);
              return;
          }
  
          xhrLoad.call(this, file, url, type, onload, onerror);
  
      };
  
  }(window.Phaser));
  