cordova-plugin-inappbrowser
cordova-plugin-inappbrowser copied to clipboard
Problem with function close()
trafficstars
Hello I have problem with inapp, I want close browser after when event fire. I try use close() but function not working. What Im doing wrong?
This is my code: const browser = this.inAppBrowser.create(url, '_blank', options);
const browser = this.inAppBrowser.create(url, '_self', options);
browser.on("loadstart")
.subscribe(
(e) => {
let u = e.url
if(u.includes("search")) {
alert("Close");
browser.close();
}
},
err => {
console.log("InAppBrowser Loadstop Event Error: " + err);
});