mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Update Window::length()
to use navigables
This commit is contained in:
parent
7daa462ef8
commit
089a23a1f2
Notes:
sideshowbarker
2024-07-16 22:22:13 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/089a23a1f2 Pull-request: https://github.com/SerenityOS/serenity/pull/18219
2 changed files with 3 additions and 3 deletions
|
@ -880,10 +880,10 @@ JS::NonnullGCPtr<WindowProxy> Window::frames() const
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#dom-length
|
||||
u32 Window::length() const
|
||||
u32 Window::length()
|
||||
{
|
||||
// The length getter steps are to return this's associated Document's document-tree child navigables's size.
|
||||
return static_cast<u32>(document_tree_child_browsing_context_count());
|
||||
return associated_document().document_tree_child_navigables().size();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-top
|
||||
|
|
|
@ -136,7 +136,7 @@ public:
|
|||
void focus();
|
||||
|
||||
JS::NonnullGCPtr<WindowProxy> frames() const;
|
||||
u32 length() const;
|
||||
u32 length();
|
||||
JS::GCPtr<WindowProxy const> top() const;
|
||||
JS::GCPtr<WindowProxy const> parent() const;
|
||||
JS::GCPtr<DOM::Element const> frame_element() const;
|
||||
|
|
Loading…
Reference in a new issue