diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-04-11 10:54:11 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-11 18:24:34 +0200 |
commit | 1ef48d50ff9b6adeb13186799555ff11d6c7af9d (patch) | |
tree | d1b3c9e66976d592b46527a44605fa1d8cb9db09 /Userland/Libraries/LibWeb/InProcessWebView.cpp | |
parent | e54837add5e260e2546a1a43966607b2ef039816 (diff) | |
download | serenity-1ef48d50ff9b6adeb13186799555ff11d6c7af9d.zip |
LibWeb+WebContent: Hook document.cookie to the backend cookie storage
Diffstat (limited to 'Userland/Libraries/LibWeb/InProcessWebView.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/InProcessWebView.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/InProcessWebView.cpp b/Userland/Libraries/LibWeb/InProcessWebView.cpp index 758f9a47a4..4c2b49bdf8 100644 --- a/Userland/Libraries/LibWeb/InProcessWebView.cpp +++ b/Userland/Libraries/LibWeb/InProcessWebView.cpp @@ -433,4 +433,17 @@ String InProcessWebView::page_did_request_prompt(const String& message, const St return {}; } +String InProcessWebView::page_did_request_cookie(const URL& url) +{ + if (on_get_cookie) + return on_get_cookie(url); + return {}; +} + +void InProcessWebView::page_did_set_cookie(const URL& url, const String& cookie) +{ + if (on_set_cookie) + on_set_cookie(url, cookie); +} + } |