inappbrowser only fires the first event when I press a href button.
I'm using cordova inappbrowser like so:
var authWindow = window.open(domain+"/login", '_blank');
$(authWindow).on('loadstart', function(e) {
console.log("hello world");
}
Then inside the login page, open by the inappbrowser, I have
<a href="subscribe">subscribe</a>
When i press that, the loadstart
event is not fired.
Also, when I finish the subscription, and the server redirect me, the event is not fired still.
When I login, without pressing the href, inappbrowser does fire the loadstart
event when the server does a 302 redirect. It is only after pressing the href that it stop issuing the event.
What can I do to change that?
I need to catch all url changes in the inappbrowser.
Or at least the 302 redirect that the browser issues.
Thanks for your time and kind concern.
jenia
try the addEventListener
authWindow.addEventListener('loadstart', function(event) { alert(event.url); });