1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:48:13 +00:00

LibWeb: Add "scripts to execute in order as soon as possible"

Previously, we had accidentally conflated this set with the
similar-but-distinct "scripts to execute as soon as possible".
This commit is contained in:
Andreas Kling 2022-09-17 17:36:47 +02:00
parent df7e64d103
commit 07c4bf03b5
3 changed files with 25 additions and 5 deletions

View file

@ -1244,6 +1244,16 @@ Vector<JS::Handle<HTML::HTMLScriptElement>> Document::take_scripts_to_execute_as
return move(m_scripts_to_execute_as_soon_as_possible);
}
void Document::add_script_to_execute_in_order_as_soon_as_possible(Badge<HTML::HTMLScriptElement>, HTML::HTMLScriptElement& script)
{
m_scripts_to_execute_in_order_as_soon_as_possible.append(JS::make_handle(script));
}
Vector<JS::Handle<HTML::HTMLScriptElement>> Document::take_scripts_to_execute_in_order_as_soon_as_possible(Badge<HTML::HTMLParser>)
{
return move(m_scripts_to_execute_in_order_as_soon_as_possible);
}
// https://dom.spec.whatwg.org/#dom-document-importnode
ExceptionOr<JS::NonnullGCPtr<Node>> Document::import_node(JS::NonnullGCPtr<Node> node, bool deep)
{