ladybird/Tests/LibWeb/Text/input/hit_testing/inline-content-inside-anonymous-container.html

27 lines
575 B
HTML
Raw Normal View History

<!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>