Methods
-
cancelableOn( event_name, handler ) → {void}
-
Description
Attaches an event handler to an event.
Parameters
Name Type Description event_nameString The event name that the handler will be attached to.
handlerfunction The event handler (function) that will be invoked when event_name is triggered. The event handler can accept one optional callback parameter. The event handler can return a Deferred object, which if resolved, executes the callback function. If the promise is rejected, the callback function does not execute.
Returns
-
cancelableOff( event_name, handler ) → {void}
-
Description
Detaches an event handler from an event.
Parameters
Name Type Description event_nameString The event name that the handler will be detached from. This argument is required.
handlerfunction The event handler (function) that will be removed from the list of registered handlers. This argument is required.
Returns
-
cancelableDisable( event_name ) → {void}
-
Description
Disables all event handlers attached to an event.
Parameters
Name Type Description event_nameString The name of the event for which event handlers will be disabled.
Returns
-
cancelableEnable( event_name ) → {Void}
-
Description
Re-enables all event handlers attached to an event.
Parameters
Name Type Description event_nameString The name of the event for which event handlers will be re-enabled.
Returns
-
cancelableTrigger( event_name, ...args ) → {Deferred}
-
Description
Triggers an event with one or more arguments. If any of the event handlers associated with the event are rejected, callbacks will not be executed.
Parameters
Name Type Attributes Description event_nameString The name of the event to trigger.
argsparams <repeatable> Any arguments to be passed to all event handlers attached to the event.
Returns
-
cancelableTriggerUnsafe( event_name, ...args ) → {Deferred}
-
Description
Triggers an event with one or more unsanitized arguments. If any of the event handlers associated with the event are rejected, callbacks will not be executed.
Parameters
Name Type Attributes Description event_nameString The name of the event to trigger.
argsparams <repeatable> Any arguments to be passed to all event handlers attached to the event.
Returns