mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +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
|
@ -23,6 +23,8 @@ public:
|
|||
void add_sheet(const StyleSheet& sheet) { m_sheets.append(sheet); }
|
||||
const NonnullRefPtrVector<StyleSheet>& stylesheets() const { return m_sheets; }
|
||||
|
||||
virtual String tag_name() const override { return "#document"; }
|
||||
|
||||
private:
|
||||
OwnPtr<StyleResolver> m_style_resolver;
|
||||
NonnullRefPtrVector<StyleSheet> m_sheets;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue