summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/HtmlView.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-10-19 21:21:29 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-10-19 21:25:49 +0200
commit884ae8069907209d6b1eadb3b51a1fec31f07994 (patch)
tree71d6065a6888bf24a8170bcad2349878a8edde52 /Libraries/LibHTML/HtmlView.h
parent73af2f8d02cfba1bf910d96bf955b1d6ce510a86 (diff)
downloadserenity-884ae8069907209d6b1eadb3b51a1fec31f07994.zip
LibHTML+Browser: Show target URL of hovered links in Browser statusbar
HtmlView will now invoke the on_link_hover hook when the cursor enters or leaves a DOM node that has an enclosing link element. This patch also updates the meaning of Node::enclosing_link_element() to find the nearest HTMLAnchorElementAncestor *with an href attribute*.
Diffstat (limited to 'Libraries/LibHTML/HtmlView.h')
-rw-r--r--Libraries/LibHTML/HtmlView.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibHTML/HtmlView.h b/Libraries/LibHTML/HtmlView.h
index 19c18e7335..b0d3d05d34 100644
--- a/Libraries/LibHTML/HtmlView.h
+++ b/Libraries/LibHTML/HtmlView.h
@@ -29,6 +29,7 @@ public:
void set_should_show_line_box_borders(bool value) { m_should_show_line_box_borders = value; }
Function<void(const String&)> on_link_click;
+ Function<void(const String&)> on_link_hover;
Function<void(const String&)> on_title_change;
Function<void(const URL&)> on_load_start;