Files
ladybird/Tests/LibWeb/Text/input/ShadowDOM/css-hover-shadow-dom.html
Jelle Raaijmakers f55fe69d4d LibWeb: Rework Internals' mouse control
Instead of defining somewhat high level mouse actions, allow granular
control of mouse clicks and mouse down/up/move events. We will want to
simulate things like holding down a mouse button after double clicking
and then dragging the mouse to another position in the future, and this
enables that.
2026-02-06 14:18:10 +00:00

25 lines
581 B
HTML

<!DOCTYPE html>
<style>
#myShadowHost:hover {
background: green;
}
#myShadowHost {
position: absolute;
width: 100px;
height: 100px;
}
</style>
<body><div id="myShadowHost"><template shadowrootmode="open"><div>hover me</div></template></div></body>
<script src="../include.js"></script>
<script>
test(() => {
if (window.internals && window.internals.mouseMove)
internals.mouseMove(50, 50);
let s = getComputedStyle(myShadowHost);
println("hovered bg: " + s.backgroundColor);
myShadowHost.remove();
});
</script>