* Adds a listener for the specified event name, which, once fired, will * remove itself. * * @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
(eventName: string, callback: (data: EventData) => void, thisArg?: any)
| 180 | * bound. |
| 181 | */ |
| 182 | public once(eventName: string, callback: (data: EventData) => void, thisArg?: any): void { |
| 183 | this.addEventListener(eventName, callback, thisArg, true); |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Removes the listener(s) for the specified event name. |