diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-10 08:48:28 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-10 09:13:30 +0100 |
commit | 1ad65b173b71271bbe91f154478c77e0ee607242 (patch) | |
tree | 53f34b9dd0ea19cddd4df650adde4234a6d6c9ad /Userland/Services/WebContent | |
parent | abf7c02acb4761a833726fed33ad88fc0c8177a3 (diff) | |
download | serenity-1ad65b173b71271bbe91f154478c77e0ee607242.zip |
LibWeb+WebContent: Support window.confirm() in OOPWV
Diffstat (limited to 'Userland/Services/WebContent')
-rw-r--r-- | Userland/Services/WebContent/PageHost.cpp | 5 | ||||
-rw-r--r-- | Userland/Services/WebContent/PageHost.h | 1 | ||||
-rw-r--r-- | Userland/Services/WebContent/WebContentClient.ipc | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index 929cfac044..427361fb84 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -176,4 +176,9 @@ void PageHost::page_did_request_alert(const String& message) m_client.send_sync<Messages::WebContentClient::DidRequestAlert>(message); } +bool PageHost::page_did_request_confirm(const String& message) +{ + return m_client.send_sync<Messages::WebContentClient::DidRequestConfirm>(message)->result(); +} + } diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h index 580685cfdb..85a7f53066 100644 --- a/Userland/Services/WebContent/PageHost.h +++ b/Userland/Services/WebContent/PageHost.h @@ -68,6 +68,7 @@ private: virtual void page_did_start_loading(const URL&) override; virtual void page_did_finish_loading(const URL&) override; virtual void page_did_request_alert(const String&) override; + virtual bool page_did_request_confirm(const String&) override; explicit PageHost(ClientConnection&); diff --git a/Userland/Services/WebContent/WebContentClient.ipc b/Userland/Services/WebContent/WebContentClient.ipc index 2e2f63d831..0eb5886a9c 100644 --- a/Userland/Services/WebContent/WebContentClient.ipc +++ b/Userland/Services/WebContent/WebContentClient.ipc @@ -15,4 +15,5 @@ endpoint WebContentClient = 90 DidRequestContextMenu(Gfx::IntPoint content_position) =| DidRequestLinkContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =| DidRequestAlert(String message) => () + DidRequestConfirm(String message) => (bool result) } |