Debian Codegraph @

testing/web-platform/mozilla/tests/selection/cross-shadow-boundary-slot-3.html

raw
1 <!doctype html>
2 <head>
3 <link rel="match" href="cross-shadow-boundary-slot-3-ref.html"/>
4 </head>
5 <span id="outer">Outer</span>
6 <div id="host">
7 <template shadowrootmode="open">
8 <span>Inner</span>
9 <div id="innerHost">
10 <template shadowrootmode="open">
11 <slot></slot>
12 <span>Nested</span>
13 </template>
14 <span id="slotted">Slotted</span>
15 </div>
16 </template>
17 </div>
18 <script>
19 // Selected texts are
20 // er
21 // Inner
22 // Slot Nested
23 const start = outer.firstChild;
24 const end = host.shadowRoot.getElementById("slotted").firstChild;
25 window.getSelection()
26 .setBaseAndExtent(start, 3, end, 4);
27 </script>