Extends
Methods
callFunction(name, functionArguments) → {any}
Calls a function that is defined in the script
| Name | Type | Description |
|---|---|---|
name | string | The name of a function defined in the script |
functionArguments | Array.<any> | Array of arguments passed to the function |
- Since
- 5.8.3
If the script does not define a function with the given name
- Type
- UndeclaredFunctionError
The return value of the evaluated function
- Type:
- any
deregister()
Deregisters the element. The id will be undefined afterwards. Equivalent to setId(undefined)
- Inherited From
- See
- setId
eval() → {any}
Evaluates the script. Equivalent to eval(source())
- Since
- 5.4.2
The return value of the evaluated script
- Type:
- any
id() → {string|undefined}
Returns the registered ID, or undefined if not registered.
- Inherited From
- Type:
- string |
undefined
module() → {object}
Returns the module exports of the script
- Since
- 5.4.2
If this script is not registered
- Type:
- object
name() → {string}
Returns the name of the script
- Since
- 5.4.2
- Type:
- string
parentFolders() → {Array.<$k.Folder>}
Returns the folders that contain this element
- Inherited From
- Type:
- Array.<$k.Folder>
registryType() → {string}
Returns the name of the registry that contains elements of this type
- Inherited From
- Type:
- string
setId(id, replaceScriptReferencesopt)
Registers the element with the given ID. If the element has already been registered, the current ID will be changed to the new ID. If the given ID is undefined or null, the element will be deregistered.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id | string | | The ID to set | ||
replaceScriptReferences | boolean | <optional> | false | True if ID references in scripts should be replaced. Only done when the old and the new ID is not undefined. |
- Inherited From
source() → {string}
Returns the script source code
- Since
- 5.4.2
- Type:
- string