diff --git a/Userland/Libraries/LibWeb/DOM/HTMLCollection.h b/Userland/Libraries/LibWeb/DOM/HTMLCollection.h
index 999b3f9e72..9a4241edb9 100644
--- a/Userland/Libraries/LibWeb/DOM/HTMLCollection.h
+++ b/Userland/Libraries/LibWeb/DOM/HTMLCollection.h
@@ -53,6 +53,8 @@ public:
protected:
HTMLCollection(ParentNode& root, Function filter);
+ NonnullRefPtr root() { return m_root; }
+
private:
NonnullRefPtr m_root;
Function m_filter;