mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:28:11 +00:00
LibWeb: support confirm() with no arguments
This commit is contained in:
parent
730ca98698
commit
d12f27b58e
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);
|
auto* impl = impl_from(interpreter);
|
||||||
if (!impl)
|
if (!impl)
|
||||||
return {};
|
return {};
|
||||||
auto& arguments = interpreter.call_frame().arguments;
|
String message = "";
|
||||||
if (arguments.size() < 1)
|
if (interpreter.argument_count())
|
||||||
return {};
|
message = interpreter.argument(0).to_string();
|
||||||
return JS::Value(impl->confirm(arguments[0].to_string()));
|
return JS::Value(impl->confirm(message));
|
||||||
}
|
}
|
||||||
|
|
||||||
JS::Value WindowObject::set_interval(JS::Interpreter& interpreter)
|
JS::Value WindowObject::set_interval(JS::Interpreter& interpreter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue