cross-shadow-boundary-3.html (486B)
1 <!doctype html> 2 <head> 3 <link rel="match" href="cross-shadow-boundary-3-ref.html" /> 4 </head> 5 OuterText 6 <div id="host1"></div> 7 OuterText 8 <div id="host2"></div> 9 <script> 10 const root1 = document.getElementById("host1").attachShadow({ mode: "open" }); 11 root1.innerHTML = "innerText1"; 12 13 const root2 = document.getElementById("host2").attachShadow({ mode: "open" }); 14 root2.innerHTML = "innerText2"; 15 16 getSelection().setBaseAndExtent(root1.firstChild, 3, root2.firstChild, 3); 17 </script>