Issue #1585 - Replace node.rootNode with node.getRootNode()

This removes the (default disabled) node.rootNode readonly attribute
and replaces it with a node.getRootNode() function per WhatWG
spec discussion.
Based on work by John Dai <jdai@mozilla.com>
This commit is contained in:
Moonchild 2020-06-10 01:19:37 +00:00 committed by Roy Tam
commit 7900742344
9 changed files with 128 additions and 89 deletions

View file

@ -38,8 +38,8 @@ interface Node : EventTarget {
readonly attribute boolean isConnected;
[Pure]
readonly attribute Document? ownerDocument;
[Pure, Pref="dom.node.rootNode.enabled"]
readonly attribute Node rootNode;
[Pure]
Node getRootNode(optional GetRootNodeOptions options);
[Pure]
readonly attribute Node? parentNode;
[Pure]
@ -113,3 +113,8 @@ interface Node : EventTarget {
readonly attribute AccessibleNode? accessibleNode;
#endif
};
dictionary GetRootNodeOptions {
boolean composed = false;
};