* Adds a listener for the specified event name. * * @param eventName The name of the event. * @param callback The event listener to add. Will be called when an event of * the given name is raised. * @param thisArg An optional parameter which, when set, will be bound as the * `this` conte
(eventName: string, callback: (data: EventData) => void, thisArg?: any)
| 165 | * bound. |
| 166 | */ |
| 167 | public on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void { |
| 168 | this.addEventListener(eventName, callback, thisArg); |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Adds a listener for the specified event name, which, once fired, will |