cordova-plugin-inappbrowser icon indicating copy to clipboard operation
cordova-plugin-inappbrowser copied to clipboard

Problem with function close()

Open kogutu opened this issue 6 years ago • 5 comments
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);
});

kogutu avatar Feb 11 '19 15:02 kogutu