mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibWeb: Implement getting "inclusive ancestor navigables" of a document
This commit is contained in:
parent
e211f6c925
commit
01cc14714e
2 changed files with 14 additions and 0 deletions
|
@ -2584,6 +2584,19 @@ Vector<JS::Handle<HTML::Navigable>> Document::ancestor_navigables()
|
|||
return ancestors;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/document-sequences.html#inclusive-ancestor-navigables
|
||||
Vector<JS::Handle<HTML::Navigable>> Document::inclusive_ancestor_navigables()
|
||||
{
|
||||
// 1. Let navigables be document's ancestor navigables.
|
||||
auto navigables = ancestor_navigables();
|
||||
|
||||
// 2. Append document's node navigable to navigables.
|
||||
navigables.append(*navigable());
|
||||
|
||||
// 3. Return navigables.
|
||||
return navigables;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#list-of-the-descendant-browsing-contexts
|
||||
Vector<JS::Handle<HTML::BrowsingContext>> Document::list_of_descendant_browsing_contexts() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue