mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibJS: Use an enum class instead of 'bool is_generator'
This avoid confusion in the order of the multiple boolean parameters that exist.
This commit is contained in:
parent
5ffe23e4f3
commit
8b3f8879c1
Notes:
sideshowbarker
2024-07-18 12:25:42 +09:00
Author: https://github.com/alimpfard
Commit: 8b3f8879c1
Pull-request: https://github.com/SerenityOS/serenity/pull/7981
9 changed files with 46 additions and 29 deletions
|
@ -246,7 +246,7 @@ void WebSocket::set_event_handler_attribute(const FlyString& name, HTML::EventHa
|
|||
dbgln("Failed to parse script in event handler attribute '{}'", name);
|
||||
return;
|
||||
}
|
||||
auto* function = JS::ScriptFunction::create(script_execution_context()->interpreter().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, false, false, false);
|
||||
auto* function = JS::ScriptFunction::create(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::Function*>(function))));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue