Config.loaderWithCredentials is the new global setting for XHRSettings.withCredentials.

This commit is contained in:
Richard Davey 2020-01-22 16:30:11 +00:00
parent af85f9451d
commit 0d263be52a
2 changed files with 7 additions and 1 deletions

View file

@ -480,6 +480,11 @@ var Config = new Class({
*/
this.loaderTimeout = GetValue(config, 'loader.timeout', 0);
/**
* @const {boolean} Phaser.Core.Config#loaderWithCredentials - Optional XHR withCredentials value.
*/
this.loaderWithCredentials = GetValue(config, 'loader.withCredentials', false);
/*
* Allows `plugins` property to either be an array, in which case it just replaces
* the default plugins like previously, or a config object.

View file

@ -194,7 +194,8 @@ var LoaderPlugin = new Class({
GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync),
GetFastValue(sceneConfig, 'user', gameConfig.loaderUser),
GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword),
GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout)
GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout),
GetFastValue(sceneConfig, 'withCredentials', gameConfig.loaderWithCredentials)
);
/**