diff --git a/dom.bs b/dom.bs index 00212ae6b..60c93c0be 100644 --- a/dom.bs +++ b/dom.bs @@ -2389,16 +2389,13 @@ of a node into a parent before a child, run the
Specifications may define insertion steps for all or some nodes. The -algorithm is passed insertedNode, as indicated in the insert -algorithm below. - +algorithm is passed insertedNode and deferredStepsQueue, as +indicated in the insert algorithm below.
Specifications may define children changed steps for all or some -nodes. The algorithm is passed no argument and is called from insert, -remove, and replace data. +nodes. The algorithm is passed deferredStepsQueue and is called from +insert, remove, and replace data.
To insert a node into a parent before a child, with an optional suppress observers flag, run these steps: @@ -2437,8 +2434,10 @@ before a child, with an optional suppress observers flag, run
Let previousSibling be child's previous sibling or parent's last child if child is null. +
Let deferredStepsQueue be an empty queue. +
For each node in nodes, in tree order: +
For each node in nodes:
If child is null, then append node to @@ -2461,7 +2460,8 @@ before a child, with an optional suppress observers flag, run node, in shadow-including tree order:
Run the insertion steps with inclusiveDescendant. +
Run the insertion steps with inclusiveDescendant and + deferredStepsQueue.
If inclusiveDescendant is connected, then: @@ -2487,7 +2487,11 @@ before a child, with an optional suppress observers flag, run
If suppress observers flag is unset, then queue a tree mutation record for parent with nodes, « », previousSibling, and child. -
Run the children changed steps for parent. +
Run the children changed steps for parent with + deferredStepsQueue. + +
While deferredStepsQueue is not empty, run the result of + dequeueing deferredStepsQueue.