1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00

LibWeb: Support window.alert() in multi-process context

Alerts are now delegated to the embedding GUI process.
This commit is contained in:
Andreas Kling 2020-09-12 11:56:13 +02:00
parent aba793fb3e
commit d9e39cb82d
11 changed files with 33 additions and 2 deletions

View file

@ -57,7 +57,9 @@ void Window::set_wrapper(Badge<Bindings::WindowObject>, Bindings::WindowObject&
void Window::alert(const String& message)
{
GUI::MessageBox::show(nullptr, message, "Alert", GUI::MessageBox::Type::Information);
if (!m_document.frame())
return;
m_document.frame()->page().client().page_did_request_alert(message);
}
bool Window::confirm(const String& message)