tor-browser

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

host-with-namespace.xhtml (1100B)


      1 <!DOCTYPE html>
      2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" lang="en" >
      3 <head>
      4  <script src="/resources/testharness.js"></script>
      5  <script src="/resources/testharnessreport.js"></script>
      6 </head>
      7 <body>
      8  <div id="default-namespace"></div>
      9  <xhtml:div id="explicit-namespace"></xhtml:div>
     10 
     11  <script>
     12    <![CDATA[
     13      test(function() {
     14        const defaultNamespaceHost = document.getElementById('default-namespace');
     15        defaultNamespaceHost.attachShadow({mode: 'open'});
     16        assert_not_equals(defaultNamespaceHost.shadowRoot, null, "attachShadow should work on node with default namespace");
     17      }, 'attachShadow with a default-namespaced element');
     18 
     19      test(function() {
     20        const explicitNamespaceHost = document.getElementById('explicit-namespace');
     21        explicitNamespaceHost.attachShadow({mode: 'open'});
     22        assert_not_equals(explicitNamespaceHost.shadowRoot, null, "attachShadow should work on node with explicit namespace");
     23      }, 'Test attachShadow with a namespaced element');
     24    ]]>
     25  </script>
     26 </body>
     27 </html>