mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
fix(inappbrowser): fix event listener
closes 419
This commit is contained in:
parent
ecbe5faef8
commit
618d866bfe
@ -97,7 +97,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);
|
||||||
return () => this._objectInstance.removeEventListener(event, observer.next.bind);
|
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user