LibWeb: Fire a pointer event on synthetic clicks

This commit is contained in:
Shannon Booth 2024-04-07 19:52:39 +02:00 committed by Andreas Kling
commit db0519ddc1
Notes: sideshowbarker 2024-07-17 22:55:25 +09:00
3 changed files with 18 additions and 3 deletions

View file

@ -0,0 +1,15 @@
<script src="../include.js"></script>
<button id="myButton"></button>
<script>
asyncTest(done => {
function handleClick(event) {
println(`Event: ${event.constructor.name}`);
done();
}
let button = document.getElementById("myButton");
button.addEventListener("click", handleClick);
button.click();
});
</script>