Home > @rainway/web > EventEmitter > addEventListener
EventEmitter.addEventListener() method
Add an event listener for a particular event type.
Signature:
addEventListener<TName extends EventName<TEvents>>(eventName: TName, handler: EventHandler<TEvents, TName>): void;
Parameters
Parameter | Type | Description |
---|---|---|
eventName | TName | The name of the event. |
handler | EventHandler<TEvents, TName> | The event handler. |
Returns:
void