Using InAppBrowser I wish to get the URL of the site the user is currently on, when he chooses to close the InAppBrowser.
Adding an eventlistener for the exit event doesn't seem to return the URL.
My first thought for a workaround was subscribing to the loadstart event, and getting the URL from there, thus always having the "most recent" URL. However this doesn't always fire when the user presses the back-button.
Any ideas how to solve this?
Using PhoneGap 2.8.0
you can hide the toolbar using the 'toolbar' option. you just need to set location to no and it'll hide the URL bar.
The InAppBrowser is a web browser view that displays when calling [window. open](window. open. html)() , or when opening a link formed as <a target="_blank"> . var ref = window.
Introducing InAppBrowser.com, a simple tool to list the JavaScript commands executed by the iOS app rendering the page. To try this this tool yourself: Open an app you want to analyze. Share the url https://InAppBrowser.com somewhere inside the app (e.g. send a DM to a friend, or post to your feed)
We can define the InAppBrowser as a native Cordova plugin that mainly used to add an in-app browser for any of the hybrid mobile applications. By using the InAppBrowser, we can open an external link from the Cordova application. It can easily load a webpage inside the Cordova app.
Using 3.1 it is fairly simple
you just add an event on load start. or load stop.
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert(event.url); });
see the cordova docs for more info Cordova docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With