1

When I tried following, the alert statements not fired.

var ref = $window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); });
ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); });
                        ref.addEventListener('exit', function(event) { alert(event.type); });
Nisha haridas
  • 332
  • 1
  • 8
  • 22
  • http://stackoverflow.com/questions/3030859/detecting-the-onload-event-of-a-window-opened-with-window-open – Andrew Donovan May 13 '16 at 11:07
  • But the loadstop and loadstart events were working on inapp browser plugin. Then how we can achieve the same loadstop callback in website? – Nisha haridas May 13 '16 at 11:24
  • Look at the answer, if you own both domains you are trying to access, you can `postMessage` to one another, to know when all is loaded. Otherwise i think you can't – Andrew Donovan May 13 '16 at 11:30

0 Answers0