Class core.EventSubscriptions
Defined in: EventSubscriptions.js.
Constructor Attributes | Constructor Name and Description |
---|---|
A helper object used to subscribe to events on multiple event sources.
|
Method Attributes | Method Name and Description |
---|---|
addFrameSubscription(eventSource, eventid, callback)
Register a callback that will be invoked if the supplied event id is triggered at least once before the next
frame.
|
|
<inner> |
addSubscription(eventSource, eventid, callback)
Subscribe to the specified event on the supplied eventSource
|
destroy(callback)
Destroy the object.
|
|
<inner> |
Unsubscribe all event subscriptions on all eventSources
|
Class Detail
core.EventSubscriptions()
A helper object used to subscribe to events on multiple event sources. Tracking this makes it easier to unsubscribe
to all events upon destruction.
Method Detail
{undefined}
addFrameSubscription(eventSource, eventid, callback)
Register a callback that will be invoked if the supplied event id is triggered at least once before the next
frame. The callback will only be triggered once per event id when the browser redraws the content.
The callback takes no arguments.
- Parameters:
- {!core.EventSource} eventSource
- {!string} eventid
- {!function():undefined} callback
- Event callback. This callback takes NO arguments
- Returns:
- {undefined}
<inner>
addSubscription(eventSource, eventid, callback)
Subscribe to the specified event on the supplied eventSource
- Parameters:
- {!core.EventSource} eventSource
- {!string} eventid
- {!Function} callback
{undefined}
destroy(callback)
Destroy the object.
Do not access any member of this object after this call.
- Parameters:
- {function(!Error=):undefined} callback
- Returns:
- {undefined}
<inner>
{undefined}
unsubscribeAll()
Unsubscribe all event subscriptions on all eventSources
- Returns:
- {undefined}