scroll-marker-elementFromPoint.html (1042B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Overflow: elementFromPoint for ::scroll-marker is scroller</title> 4 <link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker"> 5 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-document-elementfrompoint"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <style> 9 body { 10 margin: 0; 11 } 12 13 #scroller { 14 scroll-marker-group: before; 15 width: 600px; 16 height: 300px; 17 overflow: auto; 18 white-space: nowrap; 19 } 20 21 #scroller div { 22 display: inline-block; 23 width: 600px; 24 height: 200px; 25 } 26 27 #scroller::scroll-marker-group { 28 display: flex; 29 height: 20px; 30 width: 40px; 31 } 32 33 #scroller div::scroll-marker { 34 content: ""; 35 width: 100px; 36 height: 20px; 37 display: inline-block; 38 } 39 </style> 40 <div id="scroller"> 41 <div id="target"></div> 42 <div></div> 43 </div> 44 <script> 45 test(() => { 46 assert_equals(document.elementFromPoint(10, 10), target); 47 }); 48 </script>