mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:05:08 +00:00
LibWeb: Added get source functionality and hook event
This commit is contained in:
parent
306501fd4a
commit
2f56a86a4e
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