mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
LibWeb: support confirm() with no arguments
This commit is contained in:
parent
730ca98698
commit
d12f27b58e
Notes:
sideshowbarker
2024-07-19 07:24:25 +09:00
Author: https://github.com/nicktiberi Commit: https://github.com/SerenityOS/serenity/commit/d12f27b58ec Pull-request: https://github.com/SerenityOS/serenity/pull/1904
1 changed files with 4 additions and 4 deletions
|
@ -108,10 +108,10 @@ JS::Value WindowObject::confirm(JS::Interpreter& interpreter)
|
|||
auto* impl = impl_from(interpreter);
|
||||
if (!impl)
|
||||
return {};
|
||||
auto& arguments = interpreter.call_frame().arguments;
|
||||
if (arguments.size() < 1)
|
||||
return {};
|
||||
return JS::Value(impl->confirm(arguments[0].to_string()));
|
||||
String message = "";
|
||||
if (interpreter.argument_count())
|
||||
message = interpreter.argument(0).to_string();
|
||||
return JS::Value(impl->confirm(message));
|
||||
}
|
||||
|
||||
JS::Value WindowObject::set_interval(JS::Interpreter& interpreter)
|
||||
|
|
Loading…
Add table
Reference in a new issue