mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibJS: Add PrivateEnvironment
This commit is contained in:
parent
eeb42c21d1
commit
13ead80ee6
Notes:
sideshowbarker
2024-07-18 02:08:09 +09:00
Author: https://github.com/davidot
Commit: 13ead80ee6
Pull-request: https://github.com/SerenityOS/serenity/pull/10470
Issue: https://github.com/SerenityOS/serenity/issues/7044
Issue: https://github.com/SerenityOS/serenity/issues/8574
Reviewed-by: https://github.com/linusg
13 changed files with 154 additions and 27 deletions
|
@ -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, JS::FunctionKind::Regular, false, false);
|
||||
auto* function = JS::ECMAScriptFunctionObject::create(target->script_execution_context()->realm().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, nullptr, JS::FunctionKind::Regular, false, false);
|
||||
VERIFY(function);
|
||||
listener = adopt_ref(*new DOM::EventListener(JS::make_handle(static_cast<JS::FunctionObject*>(function)), true));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue