mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibWeb: Update IntersectionObserver::intersection_root() for navigables
This commit is contained in:
parent
10b2ce49dc
commit
69513de1ad
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/HTML/TraversableNavigable.h>
|
||||
#include <LibWeb/IntersectionObserver/IntersectionObserver.h>
|
||||
|
||||
namespace Web::IntersectionObserver {
|
||||
|
@ -155,7 +156,7 @@ Variant<JS::Handle<DOM::Element>, JS::Handle<DOM::Document>, Empty> Intersection
|
|||
Variant<JS::Handle<DOM::Element>, JS::Handle<DOM::Document>> 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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue