diff --git a/Userland/Libraries/LibWeb/Selection/Selection.cpp b/Userland/Libraries/LibWeb/Selection/Selection.cpp index f3ba361965..6305d5fec2 100644 --- a/Userland/Libraries/LibWeb/Selection/Selection.cpp +++ b/Userland/Libraries/LibWeb/Selection/Selection.cpp @@ -429,4 +429,9 @@ DeprecatedString Selection::to_deprecated_string() const return m_range->to_deprecated_string(); } +JS::GCPtr Selection::range() const +{ + return m_range; +} + } diff --git a/Userland/Libraries/LibWeb/Selection/Selection.h b/Userland/Libraries/LibWeb/Selection/Selection.h index 81fb7dd16f..a96a6e4fc1 100644 --- a/Userland/Libraries/LibWeb/Selection/Selection.h +++ b/Userland/Libraries/LibWeb/Selection/Selection.h @@ -50,6 +50,9 @@ public: DeprecatedString to_deprecated_string() const; + // Non-standard convenience accessor for the selection's range. + JS::GCPtr range() const; + private: Selection(JS::NonnullGCPtr, JS::NonnullGCPtr);