mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-09 17:51:03 +00:00
27 lines
575 B
HTML
27 lines
575 B
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<style>
|
||
|
|
#a {
|
||
|
|
margin-bottom: -20px;
|
||
|
|
}
|
||
|
|
body {
|
||
|
|
border: 1px solid blue;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script src="../include.js"></script>
|
||
|
|
<div id="a"><a href="#" id="target">You should be able to click this link</a></div>just some text
|
||
|
|
<script>
|
||
|
|
test(() => {
|
||
|
|
logHitTest = (x, y) => {
|
||
|
|
const hit = internals.hitTest(x, y);
|
||
|
|
printElement(hit.node);
|
||
|
|
println(`index: ${hit.indexInNode}`);
|
||
|
|
printElement(hit.node.parentNode);
|
||
|
|
println('---');
|
||
|
|
}
|
||
|
|
|
||
|
|
logHitTest(40, 18);
|
||
|
|
logHitTest(185, 18);
|
||
|
|
logHitTest(600, 18);
|
||
|
|
});
|
||
|
|
</script>
|