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-5.html (870B)


      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 5: Start is in light DOM and end is a
      9      // slotted node with endOffset includes the entire slotted node
     10      window.getSelection()
     11        .setBaseAndExtent(
     12          lightContent1.firstChild,
     13          3,
     14          slotted2.firstChild,
     15          8);
     16    }
     17  </script>
     18 </head>
     19 <body onload="selectNodesInShadowTree()">
     20  <p id="lightContent1">LightContent1</p>
     21  <div id="host">Shouldn't show up (in the shadows)
     22    <template shadowrootmode="open">
     23      <slot name="s1"></slot>
     24      <span id="inner">Inner</span>
     25    </template>
     26    <span id="slotted1" slot="s1">Slotted1</span>
     27    <span id="slotted2" slot="s1">Slotted2</span>
     28  </div>
     29 </body>
     30 </html>