diff --git a/README.md b/README.md index 66707c2..f496f03 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ Closes the currently active browser. It can be used to close browsers launched t addListener(eventName: 'browserClosed' | 'browserPageLoaded', listenerFunc: () => void) => Promise ``` -Adds a listener for the specified browser event. +Adds a listener for the specified browser events, with no data being returned. | Param | Type | Description | | ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------ | @@ -178,12 +178,12 @@ Adds a listener for the specified browser event. addListener(eventName: 'browserPageNavigationCompleted', listenerFunc: (data: BrowserPageNavigationCompletedEventData) => void) => Promise ``` -Adds a listener for the specified browser event. +Adds a listener for the specified browser event, which receives data. -| Param | Type | Description | -| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| **`eventName`** | 'browserPageNavigationCompleted' | The name of the browser event to listen for: 'browserPageNavigationCompleted'. | -| **`listenerFunc`** | (data: BrowserPageNavigationCompletedEventData) => void | The function to be called when the event occurs. | +| Param | Type | Description | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | +| **`eventName`** | 'browserPageNavigationCompleted' | The name of the browser event to listen for: 'browserPageNavigationCompleted'. Applies only to openInWebView. | +| **`listenerFunc`** | (data: BrowserPageNavigationCompletedEventData) => void | The function to be called when the event occurs. | **Returns:** Promise<PluginListenerHandle> diff --git a/src/definitions.ts b/src/definitions.ts index 821356f..2bbf1d1 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -202,7 +202,7 @@ export interface InAppBrowserPlugin { close(): Promise; /** - * Adds a listener for the specified browser event. + * Adds a listener for the specified browser events, with no data being returned. * @param eventName The name of the browser event to listen for: 'browserClosed' or 'browserPageLoaded'. * @param listenerFunc The function to be called when the event occurs. */ @@ -212,8 +212,8 @@ export interface InAppBrowserPlugin { ): Promise; /** - * Adds a listener for the specified browser event. - * @param eventName The name of the browser event to listen for: 'browserPageNavigationCompleted'. + * Adds a listener for the specified browser event, which receives data. + * @param eventName The name of the browser event to listen for: 'browserPageNavigationCompleted'. Applies only to openInWebView. * @param listenerFunc The function to be called when the event occurs. */ addListener(