Debian Codegraph @

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

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