diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index 37996e9706194e7..d1d402c8c36d7ab 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -100,6 +101,8 @@ void HTMLScriptElement::execute_script() // 1. Assert: document's currentScript attribute is null. VERIFY(!document().current_script()); + JS::VM::InterpreterExecutionScope scope(*JS::Interpreter::create_with_existing_realm(realm())); + // 2. Run the module script given by the script's script for scriptElement. (void)verify_cast(*m_script).run(); }