mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
LibWeb: Use queue_a_task() function to queue an element task
Remove direct usage of task_queue() and use a helper function instead
This commit is contained in:
parent
93b6334966
commit
d1a7caa35d
Notes:
github-actions[bot]
2024-07-25 14:59:25 +00:00
Author: https://github.com/TSultanov
Commit: d1a7caa35d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/812
1 changed files with 1 additions and 6 deletions
|
@ -856,12 +856,7 @@ void Element::make_html_uppercased_qualified_name()
|
||||||
// https://html.spec.whatwg.org/multipage/webappapis.html#queue-an-element-task
|
// https://html.spec.whatwg.org/multipage/webappapis.html#queue-an-element-task
|
||||||
int Element::queue_an_element_task(HTML::Task::Source source, Function<void()> steps)
|
int Element::queue_an_element_task(HTML::Task::Source source, Function<void()> steps)
|
||||||
{
|
{
|
||||||
auto task = HTML::Task::create(vm(), source, &document(), JS::create_heap_function(heap(), move(steps)));
|
return queue_a_task(source, HTML::main_thread_event_loop(), document(), JS::create_heap_function(heap(), move(steps)));
|
||||||
auto id = task->id();
|
|
||||||
|
|
||||||
HTML::main_thread_event_loop().task_queue().add(move(task));
|
|
||||||
|
|
||||||
return id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue