1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-29 14:15:08 +00:00

LibWeb+WebContent: Move pending dialog handling from PageHost to Page

Currently, all handling of pending dialogs occurs in PageHost. In order
to re-use this functionality to run WebDriver in a headless move, move
it to Page.
This commit is contained in:
Timothy Flynn 2022-11-21 15:18:42 -05:00 committed by Linus Groh
parent 7c00619e47
commit 1f08cb7020
7 changed files with 189 additions and 126 deletions

View file

@ -426,20 +426,20 @@ WebIDL::ExceptionOr<JS::GCPtr<HTML::WindowProxy>> Window::open_impl(StringView u
void Window::alert_impl(String const& message)
{
if (auto* page = this->page())
page->client().page_did_request_alert(message);
page->did_request_alert(message);
}
bool Window::confirm_impl(String const& message)
{
if (auto* page = this->page())
return page->client().page_did_request_confirm(message);
return page->did_request_confirm(message);
return false;
}
String Window::prompt_impl(String const& message, String const& default_)
{
if (auto* page = this->page())
return page->client().page_did_request_prompt(message, default_);
return page->did_request_prompt(message, default_);
return {};
}