LibWeb: Implement the "queue a task" steps as a distinct AO

This will be needed by EventSource.
This commit is contained in:
Timothy Flynn
2024-04-05 11:07:32 -04:00
committed by Andreas Kling
parent b6f824a313
commit 9cc186b929
2 changed files with 27 additions and 4 deletions

View File

@@ -116,6 +116,7 @@ private:
};
EventLoop& main_thread_event_loop();
int queue_a_task(HTML::Task::Source, JS::GCPtr<EventLoop>, JS::GCPtr<DOM::Document>, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps);
int queue_global_task(HTML::Task::Source, JS::Object&, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps);
void queue_a_microtask(DOM::Document const*, JS::NonnullGCPtr<JS::HeapFunction<void()>> steps);
void perform_a_microtask_checkpoint();