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.
20 lines
499 B
HTML
20 lines
499 B
HTML
<!DOCTYPE html>
|
|
<script src="include.js"></script>
|
|
😭foobar😭
|
|
<script>
|
|
asyncTest(done => {
|
|
window.addEventListener('load', () => {
|
|
internals.mouseDown(55, 20);
|
|
internals.mouseMove(110, 20);
|
|
|
|
const activeRange = window.getSelection().getRangeAt(0);
|
|
printElement(activeRange.startContainer);
|
|
println(activeRange.startOffset);
|
|
printElement(activeRange.endContainer);
|
|
println(activeRange.endOffset);
|
|
|
|
done();
|
|
});
|
|
});
|
|
</script>
|