tor-browser

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

test-print-selection-shadow-crossing-flat-3.html (788B)


      1 <!DOCTYPE html>
      2 <html reftest-print-range="selection">
      3 <head>
      4  <meta charset="utf-8">
      5  <link id="style" href="print.css" rel="stylesheet">
      6  <script>
      7    function selectNodesInShadowTree() {
      8      // Test 3: Start is a slotted node and end is a shadow node.
      9      window.getSelection()
     10        .setBaseAndExtent(
     11          slotted.firstChild,
     12          3,
     13          host.shadowRoot.getElementById("inner").firstChild,
     14          4);
     15    }
     16  </script>
     17 </head>
     18 <body onload="selectNodesInShadowTree()">
     19  <p id="lightContent1">LightContent1</p>
     20  <div id="host">Shouldn't show up (in the shadows)
     21    <template shadowrootmode="open">
     22      <slot name="s1"></slot>
     23      <span id="inner">Inner</span>
     24    </template>
     25    <span id="slotted" slot="s1">Slotted</span>
     26  </div>
     27 </body>
     28 </html>