mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
fix(inappbrowser): fix event listener
This commit is contained in:
parent
115c167cfa
commit
4b08d854bd
@ -96,7 +96,7 @@ export class InAppBrowser {
|
|||||||
*/
|
*/
|
||||||
on(event: string): Observable<InAppBrowserEvent> {
|
on(event: string): Observable<InAppBrowserEvent> {
|
||||||
return new Observable<InAppBrowserEvent>((observer) => {
|
return new Observable<InAppBrowserEvent>((observer) => {
|
||||||
this._objectInstance.addEventListener(event, observer.next.bind);
|
this._objectInstance.addEventListener(event, observer.next.bind(observer));
|
||||||
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user