mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Remove uses of obsolete PlatformObject::global_object()
This API is a relic from the time when it was important for objects to have easy access to the Window, and to know it was the global object. We now have more spec-related concepts like relevant_global_object and current_global_object to pull the Window out of thin air.
This commit is contained in:
committed by
Andreas Kling
parent
4df280689b
commit
02a56f6480
@@ -175,7 +175,7 @@ Variant<JS::Handle<DOM::Element>, JS::Handle<DOM::Document>> IntersectionObserve
|
||||
}
|
||||
|
||||
// otherwise, it is the top-level browsing context’s document node, referred to as the implicit root.
|
||||
return JS::make_handle(global_object().page().top_level_browsing_context().active_document());
|
||||
return JS::make_handle(verify_cast<HTML::Window>(HTML::relevant_global_object(*this)).page().top_level_browsing_context().active_document());
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/intersection-observer/#intersectionobserver-root-intersection-rectangle
|
||||
|
||||
Reference in New Issue
Block a user