diff --git a/Userland/Libraries/LibXML/DOM/Node.h b/Userland/Libraries/LibXML/DOM/Node.h index b36e7c6e77..aed1b9f4db 100644 --- a/Userland/Libraries/LibXML/DOM/Node.h +++ b/Userland/Libraries/LibXML/DOM/Node.h @@ -36,5 +36,14 @@ struct Node { Variant content; Node* parent { nullptr }; + + bool is_text() const { return content.has(); } + Text const& as_text() const { return content.get(); } + + bool is_comment() const { return content.has(); } + Comment const& as_comment() const { return content.get(); } + + bool is_element() const { return content.has(); } + Element const& as_element() const { return content.get(); } }; }