summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/DOM/EventDispatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/DOM/EventDispatcher.cpp')
-rw-r--r--Libraries/LibWeb/DOM/EventDispatcher.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Libraries/LibWeb/DOM/EventDispatcher.cpp
index 45b30f008f..bbdbbbc065 100644
--- a/Libraries/LibWeb/DOM/EventDispatcher.cpp
+++ b/Libraries/LibWeb/DOM/EventDispatcher.cpp
@@ -27,6 +27,7 @@
#include <LibJS/Runtime/Function.h>
#include <LibWeb/Bindings/EventTargetWrapper.h>
#include <LibWeb/Bindings/EventTargetWrapperFactory.h>
+#include <LibWeb/Bindings/ScriptExecutionContext.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/EventDispatcher.h>
#include <LibWeb/DOM/EventListener.h>
@@ -43,7 +44,8 @@ void EventDispatcher::dispatch(EventTarget& target, NonnullRefPtr<Event> event)
auto& function = listener.listener->function();
auto& global_object = function.global_object();
auto* this_value = Bindings::wrap(global_object, target);
- auto& interpreter = function.interpreter();
+
+ auto& interpreter = target.script_execution_context()->interpreter();
(void)interpreter.call(function, this_value, Bindings::wrap(global_object, target));
if (interpreter.exception())
interpreter.clear_exception();