Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/scroll-marker-elementFromPoint.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: elementFromPoint for ::scroll-marker is scroller</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
body {
margin: 0;
}
#scroller {
scroll-marker-group: before;
width: 600px;
height: 300px;
overflow: auto;
white-space: nowrap;
}
#scroller div {
display: inline-block;
width: 600px;
height: 200px;
}
#scroller::scroll-marker-group {
display: flex;
height: 20px;
width: 40px;
}
#scroller div::scroll-marker {
content: "";
width: 100px;
height: 20px;
display: inline-block;
}
</style>
<div id="scroller">
<div id="target"></div>
<div></div>
</div>
<script>
test(() => {
assert_equals(document.elementFromPoint(10, 10), target);
});
</script>