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-4.html (837B)


      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 4: Start is in light DOM and end is the last assigned nodes for that slot.
      9      window.getSelection()
     10        .setBaseAndExtent(
     11          lightContent1.firstChild,
     12          3,
     13          slotted2.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="slotted1" slot="s1">Slotted1</span>
     26    <span id="slotted2" slot="s1">Slotted2</span>
     27  </div>
     28 </body>
     29 </html>