HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Node.js SDK - EventEmitter.addEventListener()

Home > @rainway/native > 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