Andreas Kling
bbfde63f79
LibWeb: Only take runnable tasks from the HTML task queue
...
We were previously willing to execute tasks before they had become
runnable.
2021-10-03 16:42:34 +02:00
Andreas Kling
5cf439cce0
LibWeb: Run setTimeout() and setInterval() callbacks as HTML tasks
...
We now invoke DOM timer callbacks via HTML tasks. This brings callback
sequencing closer to the spec, although there are still many
imperfections in this area.
2021-10-03 13:36:40 +02:00
Andreas Kling
a248ec63e3
LibWeb: Implement window.queueMicrotask(callback)
...
This API allows authors to schedule a serialized JS callback that will
get invoked at the next spec-allowed opportunity.
2021-09-26 14:39:14 +02:00
Andreas Kling
68d1f5965a
LibWeb: Add HTML::Task::Source::PostedMessage
...
This is the task source used by MessagePort.postMessage().
2021-09-19 22:34:44 +02:00
Andreas Kling
64df30230d
LibWeb: Add HTML::Task::Source::IdleTask
...
This represents what the spec calls the "idle-task task source".
2021-09-17 13:20:18 +02:00
Andreas Kling
bc3a432cb2
LibWeb: Add HTML::Task::Source to model "generic task sources"
2021-09-09 02:18:31 +02:00
Andreas Kling
ecb72f3b57
LibWeb: Add a bare-bones HTML event loop with a task queue
...
This patch attaches a HTML::EventLoop to the main thread JS::VM used
for JavaScript bindings in the web engine.
The goal here is to model the various task scheduling mechanisms of the
HTML specification.
2021-09-09 02:18:31 +02:00