diff --git a/dom.bs b/dom.bs index afe7880a0..6f6c183e2 100644 --- a/dom.bs +++ b/dom.bs @@ -2797,6 +2797,7 @@ interface mixin ParentNode { [CEReactions, Unscopable] void prepend((Node or DOMString)... nodes); [CEReactions, Unscopable] void append((Node or DOMString)... nodes); + [CEReactions, Unscopable] void replaceChildren((Node or DOMString)... nodes); Element? querySelector(DOMString selectors); [NewObject] NodeList querySelectorAll(DOMString selectors); @@ -2836,6 +2837,15 @@ Element includes ParentNode; the node tree are violated. +
node . replaceChildren(nodes)
+ Replace all children of node with nodes, + while replacing strings in nodes with equivalent {{Text}} nodes. + +
Throws a "{{HierarchyRequestError!!exception}}" {{DOMException}} if the constraints of + the node tree are violated. + +
node . querySelector(selectors)
The replaceChildren(nodes)
method, when invoked,
+must run these steps:
+
+
Let node be the result of converting nodes into a node given + nodes and this's node document. + +
Ensure pre-insertion validity of node into this before + null. + +
Replace all with node within this. +
The querySelector(selectors)
method,
when invoked, must return the first result of running scope-match a selectors string
selectors against this, if the result is not an empty list, and null otherwise.