Hey there, I am having trouble retrieving the current URL of an in-app browser when clicking the close button or at any time after loading a URL. Here's my code:
var ref = window.open('http://google.com', '_blank', 'hidden=yes');
ref.show();
ref.addEventListener('exit', function(event) {
alert(JSON.stringify(event)); // no data related to URL
});
ref.addEventListener('loadstop', function(){
alert(window.location.href); // always get local address ie File:/// ....
});
Can anyone please assist me with this issue? I came across this Stack Overflow question, but couldn't find a solution.