dom/xhr/tests/iframe_sync_xhr_unload.html
author Andrea Marchesini <amarchesini@mozilla.com>
Sun, 16 Oct 2016 08:46:10 +0200
changeset 875974 d33b1329a44d70645ee3bfc7b87063de4da8c54a
child 934861 31c43904fba5f7e1ddf04a7feb7edb1f49865952
permissions -rw-r--r--
Bug 1307122 - Introducing a timeout for sync XHR when unload events are dispatched, r=smaug a=gchang

<!DOCTYPE HTML>
<html>
<body>
  <script type="application/javascript">

function o() {
 var xhr = new XMLHttpRequest();
 xhr.open("GET", "sync_xhr_unload.sjs", false);
 try { xhr.send(); } catch(e) {}
}

window.addEventListener("beforeunload", o, false);
window.addEventListener("unload", o, false)

  </script>
</body>
</html>