summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-19 15:39:40 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-19 15:39:40 +0200
commite649144a90ec8b8ec1c7c5bc11790e711abc648f (patch)
tree8ba16875f86b8c604a3bef5a059b8ad5428f2a43 /Userland/Libraries/LibWeb/DOM/EventTarget.cpp
parent7a6ad1b19c95ea47686b08e0f58f8e92d7d668f3 (diff)
downloadserenity-e649144a90ec8b8ec1c7c5bc11790e711abc648f.zip
LibWeb: Replace ScriptExecutionContext::interpreter() with realm()
Here goes another step towards Document not having a JS::Interpreter.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/EventTarget.cpp')
-rw-r--r--Userland/Libraries/LibWeb/DOM/EventTarget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
index 755637e1aa..142a48d96b 100644
--- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
+++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
@@ -133,7 +133,7 @@ void EventTarget::set_event_handler_attribute(FlyString const& name, HTML::Event
dbgln("Failed to parse script in event handler attribute '{}'", name);
return;
}
- auto* function = JS::OrdinaryFunctionObject::create(target->script_execution_context()->interpreter().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
+ auto* function = JS::OrdinaryFunctionObject::create(target->script_execution_context()->realm().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
VERIFY(function);
listener = adopt_ref(*new DOM::EventListener(JS::make_handle(static_cast<JS::FunctionObject*>(function))));
}