mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibHTML: Add virtual Node::tag_name()
This is analogous to the DOM's Node.tagName and makes it easy to ask "hey, what kinda thing is this Node?"
This commit is contained in:
parent
a768724270
commit
fb4702dd49
4 changed files with 8 additions and 1 deletions
|
@ -26,7 +26,7 @@ public:
|
|||
explicit Element(const String& tag_name);
|
||||
virtual ~Element() override;
|
||||
|
||||
const String& tag_name() const { return m_tag_name; }
|
||||
virtual String tag_name() const override { return m_tag_name; }
|
||||
|
||||
String attribute(const String& name) const;
|
||||
void set_attribute(const String& name, const String& value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue