Add a listener for a given event.
The event name.
The listener function.
Optionalcontext: any
The context to invoke the listener with. Default this.
Removes all listeners.
Calls each of the listeners registered for a given event.
The event name.
Additional arguments that will be passed to the event handler.
Return an array listing the events for which the emitter has registered listeners.
Return the number of listeners listening to a given event.
The event name.
Return the listeners registered for a given event.
The event name.
Remove the listeners of a given event.
The event name.
Optionalfn: Function
Only remove the listeners that match this function.
Optionalcontext: any
Only remove the listeners that have this context.
Optionalonce: boolean
Only remove one-time listeners.
Add a listener for a given event.
The event name.
The listener function.
Optionalcontext: any
The context to invoke the listener with. Default this.
Add a one-time listener for a given event.
The event name.
The listener function.
Optionalcontext: any
The context to invoke the listener with. Default this.
Remove all listeners, or those of the specified event.
Optionalevent: string | symbol
The event name.
Remove the listeners of a given event.
The event name.
Optionalfn: Function
Only remove the listeners that match this function.
Optionalcontext: any
Only remove the listeners that have this context.
Optionalonce: boolean
Only remove one-time listeners.
Removes all listeners.
EventEmitter is a Scene Systems plugin compatible version of eventemitter3.