diff --git a/dom.bs b/dom.bs index 2a7c77e07..ff8cefaff 100644 --- a/dom.bs +++ b/dom.bs @@ -2279,6 +2279,36 @@ steps:
If slot is non-null, then run assign slottables for slot. +
To update slots, given removedNodes, parent, and +addedNodes, run these steps: + +
For each removedNode in removedNodes: + +
If removedNode is assigned, then run + assign slotables for removedNode's assigned slot. + +
If removedNode has an inclusive descendant that is a slot, then + run assign slotables for a tree with removedNode. +
If parent's root is a shadow root and + parent is a slot whose assigned nodes is the empty list, then run + signal a slot change for parent. + +
Run assign slotables for a tree with parent's root. + +
For each addedNode in addedNodes: + +
If parent is a shadow host and addedNode is a + slotable, then assign a slot for addedNode. +
Each similar-origin window agent has signal slots @@ -2432,14 +2462,8 @@ before a child, with an optional suppress observers flag, run
Otherwise, insert node into parent's children before child's index. -
If parent is a shadow host and node is a - slottable, then assign a slot for node. - -
If parent's root is a shadow root, and - parent is a slot whose assigned nodes is the empty list, - then run signal a slot change for parent. - -
Run assign slottables for a tree with node's root. +
If the suppress observers flag is unset, then update slots with « », + parent, and « node ».
For each shadow-including inclusive descendant inclusiveDescendant of @@ -2469,7 +2493,7 @@ before a child, with an optional suppress observers flag, run
If suppress observers flag is unset, then queue a tree mutation record for +
If the 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. @@ -2559,6 +2583,9 @@ within a parent, run these steps:
Insert node into parent before referenceChild with the suppress observers flag set. +
Update slots with « removedNodes », parent, and + « nodes ». +
Queue a tree mutation record for parent with nodes, removedNodes, previousSibling, and referenceChild. @@ -2585,6 +2612,9 @@ within a parent, run these steps:
If node is non-null, then insert node into parent before null with the suppress observers flag set. +
If the suppress observers flag is unset, then update slots with + « removedNodes », parent, and « addedNodes ». +
If either addedNodes or removedNodes is not empty, then queue a tree mutation record for parent with addedNodes, removedNodes, null, and null. @@ -2649,21 +2679,8 @@ indicated in the remove algorithm below.
If node is assigned, then run assign slottables for - node's assigned slot. - -
If parent's root is a shadow root, and - parent is a slot whose assigned nodes is the empty list, - then run signal a slot change for parent. - -
If node has an inclusive descendant that is a slot, then: - -
Run assign slottables for a tree with parent's root. - -
Run assign slottables for a tree with node. -
If the suppress observers flag is unset, then update slots with + « node », parent, and « ».
Run the removing steps with node and parent. @@ -2701,7 +2718,7 @@ indicated in the remove algorithm below. source is registered to node's registered observer list. -
If suppress observers flag is unset, then queue a tree mutation record for +
If the suppress observers flag is unset, then queue a tree mutation record for parent with « », « node », oldPreviousSibling, and oldNextSibling.