Helper
A helper class providing utility methods
Static Method Summary
Static Public Methods | ||
public static |
addEventListener(emitter: EventEmitter, eventName: string, handler: function()): function() Register an eventName, eventListener pairs on an EventEmitter |
|
public static |
addEventListeners(emitter: EventEmitter, events: function()): function() Register an array of eventName, eventListener pairs to an EventEmitter |
|
public static |
removeEventListeners(listeners: function()) Remove the listeners registered on an EventEmitter by either addEventListener or addEventListeners |
Static Public Methods
public static addEventListener(emitter: EventEmitter, eventName: string, handler: function()): function() source
Register an eventName, eventListener pairs on an EventEmitter
public static addEventListeners(emitter: EventEmitter, events: function()): function() source
Register an array of eventName, eventListener pairs to an EventEmitter
Params:
Name | Type | Attribute | Description |
emitter | EventEmitter |
|
The EventEmitter to register the eventName, eventListener pairs on |
events | function() | The array of eventName, eventListener pairs |
public static removeEventListeners(listeners: function()) source
Remove the listeners registered on an EventEmitter by either addEventListener or addEventListeners
Params:
Name | Type | Attribute | Description |
listeners | function() |
|