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/hit-test-border-radius-and-perspective.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=padding style="padding-top: 100px;">
<div id=perspective style="perspective: 1px;">
<div id=overflow style="border-radius: 5px; overflow: hidden;">
<div id=target style="position: relative; background: green; width: 100px; height: 100px;"></div>
</div>
</div>
</div>
<script>
test(()=> {
assert_equals(document.elementFromPoint(50, 150), target);
}, "Hit testing should work on elements under perspective and border radius");
</script>