LibWeb: Fix setTimeout() when there's no active script

Implements https://github.com/whatwg/html/pull/9712
Fixes https://github.com/SerenityOS/serenity/issues/20970
This commit is contained in:
Luke Wilde
2023-09-12 23:14:38 +01:00
committed by Andreas Kling
parent 9335524f15
commit 56f0b10d14
Notes: sideshowbarker 2024-07-16 23:13:25 +09:00
4 changed files with 44 additions and 28 deletions

View File

@@ -0,0 +1,9 @@
<script src="include.js"></script>
<script>
test(() => {
queueMicrotask(setTimeout.bind(this, () => {}));
queueMicrotask(() => {
println("didn't crash!");
});
});
</script>