mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Update IntersectionObserver::intersection_root() for navigables
This commit is contained in:
committed by
Andreas Kling
parent
10b2ce49dc
commit
69513de1ad
Notes:
sideshowbarker
2024-07-17 08:34:29 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/69513de1ad Pull-request: https://github.com/SerenityOS/serenity/pull/18219
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user