mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
LibHTML: Implement basic HTMLElement.title support
We now show a tooltip for the hovered node's enclosing HTML element's title attribute, if one is present. This patch also adds HTMLHeadingElement. The tags h1-h6 will now create the right kind of objects.
This commit is contained in:
@@ -6,4 +6,9 @@ class HTMLElement : public Element {
|
||||
public:
|
||||
HTMLElement(Document&, const String& tag_name);
|
||||
virtual ~HTMLElement() override;
|
||||
|
||||
String title() const { return attribute("title"); }
|
||||
|
||||
private:
|
||||
virtual bool is_html_element() const final { return true; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user