mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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.
20 lines
528 B
HTML
20 lines
528 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
span:hover {
|
|
text-shadow: 0 0 3px #58a1e6;
|
|
}
|
|
</style>
|
|
<script src="./include.js"></script>
|
|
<span>Hover over this span</span>
|
|
<script>
|
|
test(() => {
|
|
// hover
|
|
internals.mouseMove(10, 10);
|
|
println("hovered text-shadow: " + getComputedStyle(document.querySelector("span")).textShadow);
|
|
|
|
// unhover
|
|
internals.mouseMove(0, 0);
|
|
println("unhovered text-shadow: " + getComputedStyle(document.querySelector("span")).textShadow);
|
|
});
|
|
</script>
|