LibWeb: Schedule HTML::EventLoop processing when there are queued tasks

Since we can't simply give HTML::EventLoop control of the whole program,
we have to integrate with Core::EventLoop.

We do this by having a single-shot 0ms Core::Timer that we start when
a task is added to the queue, and restart after processing the queue and
there are still tasks in the queue.
This commit is contained in:
Andreas Kling 2021-09-09 00:38:43 +02:00
commit 909e522cf7
Notes: sideshowbarker 2024-07-18 04:24:27 +09:00
5 changed files with 35 additions and 2 deletions

View file

@ -65,6 +65,7 @@ class CanvasRenderingContext2D;
class CloseEvent;
class DOMParser;
struct EventHandler;
class EventLoop;
class HTMLAnchorElement;
class HTMLAreaElement;
class HTMLAudioElement;