mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
LibWeb+WebContent: Add on_load_finish hook to web views
This isn't entirely symmetrical with on_load_start as it will also fire on reloads and back/forward navigations. However, it's good enough for some basic use cases, and we can do more sophisticated notifications later on when we need them.
This commit is contained in:
parent
52dbdf4245
commit
eda9fb13cc
Notes:
sideshowbarker
2024-07-19 00:58:14 +09:00
Author: https://github.com/awesomekling
Commit: eda9fb13cc
12 changed files with 31 additions and 7 deletions
|
@ -209,6 +209,13 @@ void OutOfProcessWebView::notify_server_did_start_loading(Badge<WebContentClient
|
|||
on_load_start(url);
|
||||
}
|
||||
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_finish_loading(Badge<WebContentClient>, const URL& url)
|
||||
{
|
||||
if (on_load_finish)
|
||||
on_load_finish(url);
|
||||
}
|
||||
|
||||
void OutOfProcessWebView::notify_server_did_request_context_menu(Badge<WebContentClient>, const Gfx::IntPoint& content_position)
|
||||
{
|
||||
if (on_context_menu_request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue