mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25: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.
13 lines
390 B
HTML
13 lines
390 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
<p id="text">Lorem ipsum dolor sit amet</p>
|
|
<script>
|
|
test(() => {
|
|
internals.click(85, 20, 2);
|
|
|
|
const selection = document.getSelection().getRangeAt(0);
|
|
// FIXME: This should output 6-15 instead of 10-15
|
|
println(`Selected range: ${selection.startOffset} - ${selection.endOffset}`);
|
|
});
|
|
</script>
|