diff options
author | Andreas Kling <kling@serenityos.org> | 2021-06-27 22:15:58 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-27 22:36:04 +0200 |
commit | c8270dbe2e9eac702a596709584a815f23a84e0f (patch) | |
tree | b27c294d65db3a4fd17bdf4ab779bde6c587a875 /Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp | |
parent | ba9d5c4d54d2e58c14eafe1e8960c3832fac46c7 (diff) | |
download | serenity-c8270dbe2e9eac702a596709584a815f23a84e0f.zip |
LibJS: Rename ScriptFunction => OrdinaryFunctionObject
These are basically what the spec calls "ordinary function objects",
so let's have the name reflect that. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp b/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp index 6ab8133a33..d1ff701b95 100644 --- a/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp +++ b/Userland/Libraries/LibWeb/HTML/GlobalEventHandlers.cpp @@ -6,7 +6,7 @@ #include <LibJS/Interpreter.h> #include <LibJS/Parser.h> -#include <LibJS/Runtime/ScriptFunction.h> +#include <LibJS/Runtime/OrdinaryFunctionObject.h> #include <LibWeb/DOM/Document.h> #include <LibWeb/DOM/EventListener.h> #include <LibWeb/HTML/EventHandler.h> @@ -49,7 +49,7 @@ void GlobalEventHandlers::set_event_handler_attribute(const FlyString& name, HTM dbgln("Failed to parse script in event handler attribute '{}'", name); return; } - auto* function = JS::ScriptFunction::create(self.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(self.script_execution_context()->interpreter().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)))); } |