Phaser API Documentation



Sets the Cross Origin Resource Sharing value used when loading files.

Files can override this value on a per-file basis by specifying an alternative crossOrigin value in their file config.

Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have their own CORs setting. To reset it, call this method with no arguments.

For more details about CORs see


name type arguments description
crossOrigin string <optional>

The value to use for the crossOrigin property in the load request.


This Loader object.

Since: 3.0.0