mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Create an execution context before registering import map
Fixes #6297
This commit is contained in:
parent
aff642053a
commit
3a70a4735a
Notes:
github-actions[bot]
2025-11-06 22:08:40 +00:00
Author: https://github.com/danielbprice 🔰
Commit: 3a70a4735a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6712
Reviewed-by: https://github.com/tcl3
Reviewed-by: https://github.com/trflynn89
2 changed files with 66 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include <LibWeb/HTML/Scripting/ClassicScript.h>
|
||||
#include <LibWeb/HTML/Scripting/Fetching.h>
|
||||
#include <LibWeb/HTML/Scripting/ImportMapParseResult.h>
|
||||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/Infra/CharacterTypes.h>
|
||||
#include <LibWeb/Infra/Strings.h>
|
||||
|
|
@ -154,6 +155,8 @@ void HTMLScriptElement::execute_script()
|
|||
}
|
||||
// -> "importmap"
|
||||
else if (m_script_type == ScriptType::ImportMap) {
|
||||
HTML::TemporaryExecutionContext execution_context { realm() };
|
||||
|
||||
// 1. Register an import map given el's relevant global object and el's result.
|
||||
m_result.get<GC::Ref<ImportMapParseResult>>()->register_import_map(as<Window>(relevant_global_object(*this)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue