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-8.html (1002B)


      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 8: Both start and end are slotted nodes, and their DOM
      9      // tree order is reversed compare to flat tree order.
     10      window.getSelection()
     11        .setBaseAndExtent(
     12          slotted1.firstChild,
     13          0,
     14          slotted4.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      <slot name="s2"></slot>
     26    </template>
     27    <span id="slotted3" slot="s2">Slotted3</span>
     28    <span id="slotted4" slot="s2">Slotted4</span>
     29    <span id="slotted1" slot="s1">Slotted1</span>
     30    <span id="slotted2" slot="s1">Slotted2</span>
     31  </div>
     32 </body>
     33 </html>