Phaser API Documentation

  Version: 
save(data, [filename], [filetype])

Description:

Causes the browser to save the given data as a file to its default Downloads folder.

Creates a DOM level anchor link, assigns it as being a download anchor, sets the href to be an ObjectURL based on the given data, and then invokes a click event.

Parameters:

name type arguments Default description
data *

The data to be saved. Will be passed through URL.createObjectURL.

filename string <optional> file.json

The filename to save the file as.

filetype string <optional> application/json

The file type to use when saving the file. Defaults to JSON.

Returns:
Description:

This Loader plugin.

Since: 3.0.0