Developer Documentation
Our new developer documentation is now available. Please check it out!

OdinRoom.addEventListener

public addEventListener(eventName: Event, handler: OdinEvents[Event]): void

Adds an event listener to the room for specific events.

Parameters

NameTypeDescription
eventNameEventThe event to listen for (see keys of OdinEvents for possible values)
handlerOdinEvents[Event]The callback to call when the event is fired.

Returns

TypeDescription
void