tor-browser

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

navigation-api-rejected.tentative.html (871B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Detect a rejected intercepted navigate event.</title>
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="/resources/testdriver.js"></script>
      9 <script src="/resources/testdriver-vendor.js"></script>
     10 <script src="resources/soft-navigation-helper.js"></script>
     11 </head>
     12 <body>
     13  <main id=main>
     14  <a href="foobar.html" id=link>Click me!</a>
     15  </main>
     16  <script>
     17    const link = document.getElementById("link");
     18    testNavigationApi("Test intercepted and rejected navigate event", e => {
     19        e.intercept({handler: async () => {
     20          await addImageToMain();
     21          throw new Error("This navigation handler rejected");
     22        }});
     23        timestamps[counter]["eventEnd"] = performance.now();
     24      }, link);
     25  </script>
     26 </body>
     27 </html>