mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Schedule Microtasks on Microtask queue
This commit is contained in:
parent
3802d9ccc4
commit
93b6334966
Notes:
github-actions[bot]
2024-07-25 14:59:31 +00:00
Author: https://github.com/TSultanov Commit: https://github.com/LadybirdBrowser/ladybird/commit/93b6334966a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/812
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ int queue_a_task(HTML::Task::Source source, JS::GCPtr<EventLoop> event_loop, JS:
|
||||||
auto task = HTML::Task::create(event_loop->vm(), source, document, steps);
|
auto task = HTML::Task::create(event_loop->vm(), source, document, steps);
|
||||||
|
|
||||||
// 8. Let queue be the task queue to which source is associated on event loop.
|
// 8. Let queue be the task queue to which source is associated on event loop.
|
||||||
auto& queue = event_loop->task_queue();
|
auto& queue = source == HTML::Task::Source::Microtask ? event_loop->microtask_queue() : event_loop->task_queue();
|
||||||
|
|
||||||
// 9. Append task to queue.
|
// 9. Append task to queue.
|
||||||
queue.add(task);
|
queue.add(task);
|
||||||
|
|
Loading…
Reference in a new issue