1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 07:24:59 +00:00
serenity/Tests/LibWeb/Text/input/hit_testing/basic.html
Aliaksandr Kalenik bf4e2f3e9c LibWeb: Add hit testing API in internals object
Introduces `internals.hitTest(x, y)` that is going to allow us write
tests for hit testing :)
2023-08-09 17:26:44 +02:00

17 lines
314 B
HTML

<style>
* {
border: 1px solid black;
}
#box {
width: 100px;
height: 100px;
}
</style>
<div id="box"></div>
<script src="../include.js"></script>
<script>
test(() => {
println(internals.hitTest(50, 50).node === document.getElementById("box"));
});
</script>