mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
docs(core): update comments for on, once, addEventListener and removeEventListener (#10545)
This commit is contained in:
14
packages/core/ui/web-view/index.d.ts
vendored
14
packages/core/ui/web-view/index.d.ts
vendored
@ -87,12 +87,16 @@ export class WebView extends View {
|
||||
reload();
|
||||
|
||||
/**
|
||||
* A basic method signature to hook an event listener (shortcut alias to the addEventListener method).
|
||||
* @param eventNames - String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by `,` (e.g. "propertyChange", "change").
|
||||
* @param callback - Callback function which will be executed when event is raised.
|
||||
* @param thisArg - An optional parameter which will be used as `this` context for callback execution.
|
||||
* 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` context when the callback is called. Falsy values will be not be
|
||||
* bound.
|
||||
*/
|
||||
on(eventNames: string, callback: (data: EventData) => void, thisArg?: any): void;
|
||||
on(eventName: string, callback: (data: EventData) => void, thisArg?: any): void;
|
||||
|
||||
/**
|
||||
* Raised when a loadFinished event occurs.
|
||||
|
Reference in New Issue
Block a user