summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/sync_xmlhttprequest_during_unload.html
blob: 6b726b1d4c21f45399dd5ad94224acf019f8273c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html> 
  <head>
    <title>Loading...</title>
  </head>
  <body onload="attachUnloadListener()"> 
    <script> 
      function attachUnloadListener() {
        window.addEventListener('unload', onUnload, false);
        document.title = "sync xhr on unload";
      }

      var req = new XMLHttpRequest();
      function onUnload() {
        req.open('GET','download-test1.lib', false);
        req.send(null);
      }
    </script> 
    <p>Navigate to another page to trigger synch xmlhttprequest</p>
  </body> 
</html>