2 <html reftest-print-range=
"selection">
5 <link id=
"style" href=
"print.css" rel=
"stylesheet">
7 function selectNodesInShadowTree() {
8 let host
= document
.getElementById("host");
9 host
.attachShadow({ mode
: "open" }).innerHTML
= `
10 <link id="style" href="print.css" rel="stylesheet">
11 <p id="shadowContent1">ShadowContent1</p>
12 <p id="shadowContent2">ShadowContent2</p>
13 <p id="shadowContent3">ShadowContent3</p>
16 // A shadow-crossing selection where the start node is in light DOM,
17 // and the end node is in shadow DOM.
20 lightContent1
.firstChild
,
22 host
.shadowRoot
.getElementById("shadowContent1").firstChild
,
27 <body onload=
"selectNodesInShadowTree()">
28 <p id=
"lightContent1">LightContent1
</p>
29 <div id=
"host">Shouldn't show up (in the shadows)
</div>
30 <p id=
"lightContent2">LightContent2
</p>