HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Web SDK - EventEmitter.addEventListener()

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

ParameterTypeDescription
eventNameTNameThe name of the event.
handlerEventHandler<TEvents, TName>The event handler.

Returns:

void