fix(inappbrowser): fix event listener

closes 419
This commit is contained in:
Ibby Hadeed 2016-08-13 11:19:46 -04:00
parent ecbe5faef8
commit 618d866bfe

View File

@ -97,7 +97,7 @@ export class InAppBrowser {
on(event: string): Observable<InAppBrowserEvent> {
return new Observable<InAppBrowserEvent>((observer) => {
this._objectInstance.addEventListener(event, observer.next.bind);
return () => this._objectInstance.removeEventListener(event, observer.next.bind);
return () => this._objectInstance.removeEventListener(event, observer.next.bind(observer));
});
}
}