mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibWeb: Added get source functionality and hook event
This commit is contained in:
parent
306501fd4a
commit
2f56a86a4e
Notes:
sideshowbarker
2024-07-18 21:59:36 +09:00
Author: https://github.com/xeons
Commit: 2f56a86a4e
Pull-request: https://github.com/SerenityOS/serenity/pull/5477
Reviewed-by: https://github.com/awesomekling
5 changed files with 20 additions and 0 deletions
|
@ -314,6 +314,12 @@ String OutOfProcessWebView::notify_server_did_request_prompt(Badge<WebContentCli
|
|||
return {};
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_get_source(const URL& url, const String& source)
|
||||
{
|
||||
if (on_get_source)
|
||||
on_get_source(url, source);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::did_scroll()
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect()));
|
||||
|
@ -340,4 +346,9 @@ void OutOfProcessWebView::debug_request(const String& request, const String& arg
|
|||
client().post_message(Messages::WebContentServer::DebugRequest(request, argument));
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::get_source()
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::GetSource());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue