diff --git a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.cpp b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.cpp index b359bbc1c8..1fd2de8c32 100644 --- a/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.cpp +++ b/Userland/Libraries/LibWeb/IntersectionObserver/IntersectionObserver.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace Web::IntersectionObserver { @@ -155,7 +156,7 @@ Variant, JS::Handle, Empty> Intersection Variant, JS::Handle> IntersectionObserver::intersection_root() const { if (!m_root.has_value()) - return JS::make_handle(global_object().browsing_context()->top_level_browsing_context()->active_document()); + return JS::make_handle(global_object().navigable()->traversable_navigable()->active_document()); return m_root.value(); }