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-2.html (841B)


      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 2: Start is in Light DOM and end is a shadow node. There's
      9      // a slot element in between them.
     10      window.getSelection()
     11        .setBaseAndExtent(
     12          lightContent1.firstChild,
     13          3,
     14          host.shadowRoot.getElementById("inner").firstChild,
     15          4);
     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="slotted" slot="s1">Slotted</span>
     27  </div>
     28 </body>
     29 </html>