tor-browser

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

ShadowRoot-delegatesFocus.html (974B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>ShadowRoot's  delegatesFocus attribute</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div id="host1"></div>
      7 <div id="host2"></div>
      8 <div id="host3"></div>
      9 <script>
     10 test(t => {
     11  const host = document.getElementById("host1");
     12  const shadowRoot = host.attachShadow({mode: "closed"});
     13  assert_equals(shadowRoot.delegatesFocus, false);
     14 }, "default delegatesFocus value");
     15 
     16 test(t => {
     17  const host = document.getElementById("host2");
     18  const shadowRoot = host.attachShadow({mode: "closed", delegatesFocus: false});
     19  assert_equals(shadowRoot.delegatesFocus, false);
     20 }, "delegatesFocus set to false in init dict");
     21 
     22 test(t => {
     23  const host = document.getElementById("host3");
     24  const shadowRoot = host.attachShadow({mode: "closed", delegatesFocus: true});
     25  assert_equals(shadowRoot.delegatesFocus, true);
     26 }, "delegatesFocus set to true in init dict");
     27 </script>