tor-browser

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

throws-exception.html (689B)


      1 <!DOCTYPE html>
      2 <title>moveBefore exception conditions</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <body>
      6 
      7 <div></div>
      8 
      9 <script>
     10 test(t => {
     11  const iframe = document.createElement('iframe');
     12  document.body.append(iframe);
     13  const connectedCrossDocChild = iframe.contentDocument.createElement('div');
     14  const connectedLocalParent = document.querySelector('div');
     15 
     16  assert_throws_dom("HIERARCHY_REQUEST_ERR", () => {
     17    connectedLocalParent.moveBefore(connectedCrossDocChild, null);
     18  }, "moveBefore on a cross-document target node throws an exception");
     19 }, "moveBefore() on a cross-document target node");
     20 </script>