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-1.html (723B)


      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      // Test1: Start is in Light DOM and end is a slotted node
      9      window.getSelection()
     10        .setBaseAndExtent(
     11          lightContent1.firstChild,
     12          3,
     13          slotted.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    </template>
     24    <span id="slotted" slot="s1">Slotted</span>
     25  </div>
     26 </body>
     27 </html>