Phaser API Documentation

  Version: 
setCORS([crossOrigin])

Description:

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 https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Parameters:

name type arguments description
crossOrigin string <optional>

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

Returns:
Description:

This Loader object.

Since: 3.0.0