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)
Returns the first element that is a @@ -2883,6 +2893,19 @@ must run these steps:
  • Append node to this. +

    The replaceChildren(nodes) method, when invoked, +must run these steps: + +

      +
    1. Let node be the result of converting nodes into a node given + nodes and this's node document. + +

    2. Ensure pre-insertion validity of node into this before + null. + +

    3. 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.