mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb: Implement Window.prompt()
This commit is contained in:
parent
f10967e364
commit
5e07c27e25
14 changed files with 74 additions and 2 deletions
|
@ -71,6 +71,13 @@ bool Window::confirm(const String& message)
|
|||
return false;
|
||||
}
|
||||
|
||||
String Window::prompt(const String& message, const String& default_)
|
||||
{
|
||||
if (auto* page = m_document.page())
|
||||
return page->client().page_did_request_prompt(message, default_);
|
||||
return {};
|
||||
}
|
||||
|
||||
i32 Window::set_interval(JS::Function& callback, i32 interval)
|
||||
{
|
||||
auto timer = Timer::create_interval(*this, interval, callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue