fix(in-app-browser): remove duplicated method (#4838)

This commit is contained in:
Maxim Belov 2024-10-13 17:45:14 +03:00 committed by GitHub
parent c40a73407d
commit 3a64cd4bcd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,7 +125,8 @@ export type InAppBrowserEventType =
| 'exit'
| 'beforeload'
| 'message'
| 'customscheme';
| 'customscheme'
| string
export interface InAppBrowserEvent extends Event {
/** the event name */
@ -245,19 +246,6 @@ export class InAppBrowserObject {
});
}
/**
* A method that allows you to listen to events happening in the browser.
*
* @param event {string} Name of the event
* @returns {Observable<InAppBrowserEvent>} Returns back an observable that will listen to the event on subscribe, and will stop listening to the event on unsubscribe.
*/
@InstanceCheck()
on(event: string): Observable<InAppBrowserEvent> {
return new Observable<InAppBrowserEvent>((observer: Observer<InAppBrowserEvent>) => {
this._objectInstance.addEventListener(event, observer.next.bind(observer));
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
});
}
}
/**