ScriptHandler

ScriptHandler

Loads script objects for use by the engine.

Supported config object properties:

{string} id - The id of the script.
{string} name - The name of the script.

{string} className - either className or body can be specified. If className
is specified, then the engine script with that name is loaded.

{string} body - either className or body can be specified. If body is
specified, then the body content is loaded as JavaScript code.

The options object provided when loading, if any, is used to set the script's
initial "args" values passed to script functions.

Constructor

new ScriptHandler(…args)

Initialize a new ScriptHandler object.

Parameters:
Name Type Attributes Description
args * <repeatable>

Arguments passed to the ConfigHandler constructor.

Methods

_create()

Creates a script data wrapper object to be used in the engine

_remove(ref)

Remove this script from the cache.

Parameters:
Name Type Description
ref string

the script guid

_update(ref, config, options)

Updates a script object with provided config.

Parameters:
Name Type Description
ref string
config Object
options Object