Events
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
off: * |
|
public |
on: * |
Private Members | ||
private |
_eventCallbacks: {} |
|
private |
_listeners: {} |
|
private |
_log: * |
|
private |
_logEvents: boolean |
|
private |
_logName: string |
Method Summary
Public Methods | ||
public |
addEventListener(which: *, cb: *, idPrefix: string): string add event listener |
|
public |
emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *) emit event |
|
public |
hasEventListener(id: *, cb: *): boolean check event listener registration |
|
public |
hasListenerForEventName(eventName: *): boolean check event listener by name |
|
public |
logEvents(enabled: boolean, logName: string) enable/disable logging of events for the class |
|
public |
removeEventListener(id: *, cb: *) rempve event listener registration |
Public Constructors
public constructor() source
Public Members
public off: * source
public on: * source
Private Members
private _eventCallbacks: {} source
private _listeners: {} source
private _log: * source
private _logEvents: boolean source
private _logName: string source
Public Methods
public addEventListener(which: *, cb: *, idPrefix: string): string source
add event listener
Params:
Name | Type | Attribute | Description |
which | * | event name |
|
cb | * | callback |
|
idPrefix | string | prefix for id, default empty |
Return:
string | event id |
public emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *) source
emit event
Params:
Name | Type | Attribute | Description |
which | string | event name |
|
param1 | * | ||
param2 | * | ||
param3 | * | ||
param4 | * | ||
param5 | * | ||
param6 | * |
public hasEventListener(id: *, cb: *): boolean source
check event listener registration
Params:
Name | Type | Attribute | Description |
id | * | event id |
|
cb | * | callback - deprecated |
Return:
boolean |
public hasListenerForEventName(eventName: *): boolean source
check event listener by name
Params:
Name | Type | Attribute | Description |
eventName | * | event name |
Return:
boolean |
public logEvents(enabled: boolean, logName: string) source
enable/disable logging of events for the class
Params:
Name | Type | Attribute | Description |
enabled | boolean | ||
logName | string |
public removeEventListener(id: *, cb: *) source
rempve event listener registration
Params:
Name | Type | Attribute | Description |
id | * | event id |
|
cb | * | callback - deprecated |