Click or drag to resize

ScriptReference Methods

The ScriptReference type exposes the following members.

Methods
  NameDescription
Public methodAddFunctionListener
Add a function that will be called when this script reference is invoked. The target visual is prepended to the script reference's original signature such that an event like OnBlocked would expect a function like this to be passed: function (target : Visual, sender : Visual, load : Visual) The functions are cleared upon each reset, removing the need for cleanup. The function list is not persisted upon model save.
Public methodClear
Remove the reference to the JScript function (set Name to an empty string).
Public methodRemoveFunctionListeners
Remove function listeners for a given target Visual.
Public methodToString
The JScript function to be called and whether there are any native listeners.
(Overrides ObjectToString.)
Top
Extension Methods
  NameDescription
Public Extension MethodForNoLongerThan
Throw an exception if the task takes longer than the timeout.
(Defined by TaskExt.)
Public Extension MethodIfTimeout
Add an action to be called if a task throws an exception due to a timeout.
(Defined by TaskExt.)
Top
See Also