MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / on

Method on

packages/core/data/observable/index.ts:167–169  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Calls 1

addEventListenerMethod · 0.95

Tested by

no test coverage detected