Question

Do you have any idea why event.url always undefined? This is for loadstart and loadstop.

The google page was displayed fine on pop up window.

var ref = window.open('http://google.com', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
ref.addEventListener('exit', function() { alert(event.type); });
Was it helpful?

Solution

var ref = window.open('http://google.com', '_blank', 'location=yes');
ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });
ref.addEventListener('exit', function(event) { alert(event.type); });

The callback function is called when the event is fired. The function is passed an InAppBrowserEvent object.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top