tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

file_bug1046022.html (1218B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>Bug 1046022 - test navigating inside onbeforeunload</title>
      6  </head>
      7  <body>
      8    Waiting for onbeforeunload to hit...
      9  </body>
     10 
     11  <script>
     12 var testFns = [
     13  function(e) {
     14    e.target.location.href = "otherpage-href-set.html";
     15    return "stop";
     16  },
     17  function(e) {
     18    e.target.location.reload();
     19    return "stop";
     20  },
     21  function(e) {
     22    e.currentTarget.stop();
     23    return "stop";
     24  },
     25  function(e) {
     26    e.target.location.replace("otherpage-location-replaced.html");
     27    return "stop";
     28  },
     29  function(e) {
     30    var link = e.target.createElement("a");
     31    link.href = "otherpage.html";
     32    e.target.body.appendChild(link);
     33    link.click();
     34    return "stop";
     35  },
     36  function(e) {
     37    var link = e.target.createElement("a");
     38    link.href = "otherpage.html";
     39    link.setAttribute("target", "_blank");
     40    e.target.body.appendChild(link);
     41    link.click();
     42    return "stop";
     43  },
     44  function(e) {
     45    var link = e.target.createElement("a");
     46    link.href = e.target.location.href;
     47    e.target.body.appendChild(link);
     48    link.setAttribute("target", "somearbitrarywindow");
     49    link.click();
     50    return "stop";
     51  },
     52 ];
     53  </script>
     54 </html>