summaryrefslogtreecommitdiff
path: root/Libraries/LibHTML/DOM/Node.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibHTML/DOM/Node.h')
-rw-r--r--Libraries/LibHTML/DOM/Node.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Libraries/LibHTML/DOM/Node.h b/Libraries/LibHTML/DOM/Node.h
index 506da734a5..3838efdfa0 100644
--- a/Libraries/LibHTML/DOM/Node.h
+++ b/Libraries/LibHTML/DOM/Node.h
@@ -13,6 +13,7 @@ enum class NodeType : unsigned {
DOCUMENT_NODE = 9,
};
+class Document;
class ParentNode;
class LayoutNode;
class StyleResolver;
@@ -33,8 +34,12 @@ public:
virtual String tag_name() const = 0;
+ Document& document() { return m_document; }
+ const Document& document() const { return m_document; }
+
protected:
- explicit Node(NodeType);
+ Node(Document&, NodeType);
+ Document& m_document;
NodeType m_type { NodeType::INVALID };
};