EventEmitter
Class EventEmitter - base event manager
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
addListener: * |
|
public get |
Returns all event listeners |
|
public |
|
Method Summary
Public Methods | ||
public |
Emits given event bypassing to each registered handler given args |
|
public |
Un-registers previously registered event handlers |
|
public |
Registers given handlers for a given events to be called each time event is emitted |
|
public |
Registers given handler for given event to be called only once when event is emitted |
|
public |
removeAllListeners(event: string) Removes all listeners for a given event |
Public Constructors
public constructor source
Public Methods
public emit(event: string, args: ...*) source
Emits given event bypassing to each registered handler given args
Params:
Name | Type | Attribute | Description |
event | string | ||
args | ...* |
public off(event: string, handlers: ...function) source
Un-registers previously registered event handlers
public on(event: string, handlers: ...function) source
Registers given handlers for a given events to be called each time event is emitted