tor-browser

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

beforeUnload.html (448B)


      1 <!doctype html>
      2 <meta name="viewport" content="width=device-width, initial-scale=1" />
      3 <p>
      4  Focus on the text field, then focus on the url bar and navigate to another
      5  site.
      6  <br />
      7  <input id="nameInput" />
      8  <script>
      9    nameInput.addEventListener("focus", event => {
     10      addEventListener("beforeunload", e => {
     11        document.body.innerHTML = "<h1>beforeunload fired</h1>";
     12        e.preventDefault();
     13      });
     14    });
     15  </script>
     16 </p>