mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
LibWeb: Create an execution context before registering import map
Fixes #6297
This commit is contained in:
Notes:
github-actions[bot]
2025-11-06 22:08:40 +00:00
Author: https://github.com/danielbprice 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3a70a4735a2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6712 Reviewed-by: https://github.com/tcl3 Reviewed-by: https://github.com/trflynn89
@@ -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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user