Class: Executable

rune.util.Executable(fnopt, scopeopt, argsopt, asyncopt)

The Executable class represents a JavaScript function with associated arguments and the scope within which the function is intended to be executed.

Constructor

new Executable(fnopt, scopeopt, argsopt, asyncopt)

Creates a new instance of the Executable class.
Parameters:
Name Type Attributes Description
fn function <optional>
A function.
scope Object <optional>
Scope of execution.
args Array <optional>
Function argument.
async boolean <optional>
Asynchronous execution.
Source:

Members

(readonly) args :Array

List of possible function arguments.
Type:
  • Array
Source:

(readonly) fn :function

Function to execute.
Type:
  • function
Source:

(readonly) scope :Object

Execution scope. If this reference is null, execution is performed within the global scope of JavaScript (ie window).
Type:
  • Object
Source:

Methods

dispose() → {undefined}

Resets the object's internal memory references. Note that this process frees up memory and renders the object unusable.
Source:
Returns:
Type
undefined

execute(…argsopt) → {undefined}

Executes the assigned function of the object.
Parameters:
Name Type Attributes Description
args * <optional>
<repeatable>
Optional arguments.
Source:
Throws:
If the specified function cannot be executed.
Type
TypeError
Returns:
Type
undefined