Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html reftest-print-range="selection">
<head>
<meta charset="utf-8">
<link id="style" href="print.css" rel="stylesheet">
<script>
function selectNodesInShadowTree() {
// Test 7: start is in light DOM and end is a slotted node (slotted nodes order mixed).
window.getSelection()
.setBaseAndExtent(
lightContent1.firstChild,
3,
slotted4.firstChild,
8);
}
</script>
</head>
<body onload="selectNodesInShadowTree()">
<p id="lightContent1">LightContent1</p>
<div id="host">Shouldn't show up (in the shadows)
<template shadowrootmode="open">
<slot name="s1"></slot>
<span id="inner">Inner</span>
<slot name="s2"></slot>
</template>
<span id="slotted1" slot="s1">Slotted1</span>
<span id="slotted3" slot="s2">Slotted3</span>
<span id="slotted2" slot="s1">Slotted2</span>
<span id="slotted4" slot="s2">Slotted4</span>
</div>
</body>
</html>