mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 04:45:06 +00:00
WebContent: Plumb link clicks to the WebContentView :^)
You can now react to links being clicked via the on_link_click hook.
This commit is contained in:
parent
fd65a24834
commit
32243e1df2
8 changed files with 48 additions and 1 deletions
|
@ -137,6 +137,18 @@ void WebContentView::notify_server_did_unhover_link(Badge<WebContentClient>)
|
|||
on_link_hover({});
|
||||
}
|
||||
|
||||
void WebContentView::notify_server_did_click_link(Badge<WebContentClient>, const URL& url, const String& target, unsigned int modifiers)
|
||||
{
|
||||
if (on_link_click)
|
||||
on_link_click(url, target, modifiers);
|
||||
}
|
||||
|
||||
void WebContentView::notify_server_did_middle_click_link(Badge<WebContentClient>, const URL& url, const String& target, unsigned int modifiers)
|
||||
{
|
||||
if (on_link_middle_click)
|
||||
on_link_middle_click(url, target, modifiers);
|
||||
}
|
||||
|
||||
void WebContentView::did_scroll()
|
||||
{
|
||||
client().post_message(Messages::WebContentServer::SetViewportRect(visible_content_rect()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue