EventEmitter

Properties

PropertyDescription

eventSource

(get) eventSource: EventSource<any>
(set) (Not Available)


The EventSource associated with this EventEmitter object.
The EventSource will not have any events in it until emit() has been called.

Methods

MethodDescription

dispose

dispose(): void


Disposes of the native resources associated with the EventEmitter object.
The EventEmitter object will still exist as a JavaScript object but will not receive updates through future calls to emit().
Do not call dispose() until you're certain that the eventSource is no longer required.

emit

emit(payload?: any): void


Emits a single event with a given payload.
If called multiple times in a frame, events will be queued.

set

set(eventSource: EventSource<any>): void


Used to bind the emitter to an event source.
When called multiple times in a frame, only the last call will win.

  • eventSource - the EventSource to bind to this emitter.