scrollIntoView-should-treat-slot-as-scroll-container.html (898B)
1 <!DOCTYPE html> 2 3 <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> 4 <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-control"> 5 <meta name="assert" content="scrollIntoView called on the descendant of shadow host with a slot should treat the slot as a pontential scroll container."> 6 <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> 7 8 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 9 <div id="host"> 10 <div style="height: 200px"></div> 11 <div id="target" style="height: 100px; width: 100px; background: green"></div> 12 </div> 13 <script> 14 var shadow = host.attachShadow({mode: "open"}); 15 var slot = document.createElement("slot"); 16 slot.style="display: block; overflow: hidden; width: 100px; height: 100px; background: red"; 17 shadow.appendChild(slot); 18 target.scrollIntoView(); 19 </script>