tor-browser

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

intercept-detach.html (613B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="i" src="/common/blank.html"></iframe>
      5 <script>
      6 async_test(t => {
      7  window.onload = t.step_func(() => {
      8    i.contentWindow.navigation.onnavigate = t.step_func_done(e => {
      9      let iframe_constructor = i.contentWindow.DOMException;
     10      i.remove();
     11      assert_throws_dom("InvalidStateError", iframe_constructor, () => e.intercept());
     12    });
     13 
     14    i.contentWindow.location.href = "#1";
     15  });
     16 }, "event.intercept() throws if used on an event from a detached iframe");
     17 </script>