mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47: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
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibHTML/TreeNode.h>
|
||||
|
||||
|
@ -30,6 +31,8 @@ public:
|
|||
RefPtr<LayoutNode> create_layout_node(const StyleResolver&, const StyleProperties* parent_properties) const;
|
||||
RefPtr<LayoutNode> create_layout_tree(const StyleResolver&, const StyleProperties* parent_properties) const;
|
||||
|
||||
virtual String tag_name() const = 0;
|
||||
|
||||
protected:
|
||||
explicit Node(NodeType);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue