mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 13:15:02 +00:00
LibWeb: Use proper helper for appending to scripts to run after parsing
Instead of appending manually to the scripts_to_execute_when_parsing_has_finished list, lets use the proper, currently unused function for this.
This commit is contained in:
parent
4aa5816651
commit
89ea444967
1 changed files with 1 additions and 1 deletions
|
@ -492,7 +492,7 @@ void HTMLScriptElement::prepare_script()
|
|||
// 4. Otherwise, if el has a defer attribute or el's type is "module":
|
||||
else if (has_attribute(HTML::AttributeNames::defer) || m_script_type == ScriptType::Module) {
|
||||
// 1. Append el to its parser document's list of scripts that will execute when the document has finished parsing.
|
||||
m_parser_document->scripts_to_execute_when_parsing_has_finished().append(*this);
|
||||
m_parser_document->add_script_to_execute_when_parsing_has_finished({}, *this);
|
||||
|
||||
// 2. Set el's steps to run when the result is ready to the following:
|
||||
m_steps_to_run_when_the_result_is_ready = [this] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue