mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 07:24:59 +00:00

Introduces `internals.hitTest(x, y)` that is going to allow us write tests for hit testing :)
17 lines
314 B
HTML
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>
|