mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-25 01:19:45 +00:00
Now, along with the mouse events we also dispatch pointerup, pointerdown and pointermove. With this change shape painting works on https://excalidraw.com/
24 lines
599 B
HTML
24 lines
599 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
asyncTest(done => {
|
|
function logEvent(event) {
|
|
println(`${event.type} at (${event.clientX}, ${event.clientY})`);
|
|
if (event.type === "mouseup") {
|
|
done();
|
|
}
|
|
}
|
|
|
|
const eventsToLog = [
|
|
'pointerdown',
|
|
'pointerup',
|
|
'mousedown',
|
|
'mouseup',
|
|
];
|
|
eventsToLog.forEach(eventType => {
|
|
window.addEventListener(eventType, logEvent);
|
|
});
|
|
|
|
internals.click(10, 20);
|
|
});
|
|
</script>
|