Phaser API Documentation

  Version: 

Member of: Phaser.Loader

<static> XHRLoader(file, globalXHRSettings)

Description:

Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings and starts the download of it. It uses the Files own XHRSettings and merges them with the global XHRSettings object to set the xhr values before download.

Parameters:

name type description
file Phaser.Loader.File

The File to download.

globalXHRSettings Phaser.Types.Loader.XHRSettingsObject

The global XHRSettings object.

Returns:
Description:

The XHR object.

Type:
  • XMLHttpRequest
Since: 3.0.0
Source: src/loader/XHRLoader.js (Line 9)