|
@@ -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
|
|
|
{
|