summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-01-18 23:47:11 +0000
committerLinus Groh <mail@linusgroh.de>2022-01-19 20:33:08 +0000
commit1ee7e97e24fd1672a7ee8bd12abf36965da731ce (patch)
treee231d6c2817d81498b67f7dc74cb5fb79c7ff362 /Userland/Libraries/LibWeb
parent6e5097b2011e8bbc07c8c4733f51dafd1283f6d7 (diff)
downloadserenity-1ee7e97e24fd1672a7ee8bd12abf36965da731ce.zip
LibJS: Pass source text to ECMAScriptFunctionObject::create()
Diffstat (limited to 'Userland/Libraries/LibWeb')
-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 5f81bc13e6..ef26616437 100644
--- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
+++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp
@@ -134,7 +134,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::ECMAScriptFunctionObject::create(target->script_execution_context()->realm().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, nullptr, JS::FunctionKind::Normal, false, false);
+ auto* function = JS::ECMAScriptFunctionObject::create(target->script_execution_context()->realm().global_object(), name, program->source_text(), program->body(), program->parameters(), program->function_length(), nullptr, nullptr, JS::FunctionKind::Normal, false, false);
VERIFY(function);
listener = adopt_ref(*new DOM::EventListener(JS::make_handle(static_cast<JS::FunctionObject*>(function)), true));
}