diff --git a/dom.bs b/dom.bs index bd8bfb874..b3d25e914 100644 --- a/dom.bs +++ b/dom.bs @@ -2203,6 +2203,36 @@ steps:
If slot is non-null, then run assign slotables 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 unit of related similar-origin browsing contexts has a @@ -2382,17 +2412,11 @@ 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 - slotable, 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 slotables 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 @@ -2422,7 +2446,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. @@ -2541,6 +2565,9 @@ within a parent, run these steps:
Insert node into parent before reference child 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 reference child. @@ -2574,6 +2601,9 @@ To replace all with a
If node is not 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 ». +
Queue a tree mutation record for parent with addedNodes, removedNodes, null, and null. @@ -2634,20 +2664,8 @@ with an optional suppress observers flag, run these steps:
If node is assigned, then run assign slotables 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 slotables for a tree with parent's root. - -
Run assign slotables for a tree with node's root. -
If the suppress observers flag is unset, then update slots with + « node », parent, and « ».
Run the removing steps with node and parent. @@ -2683,7 +2701,7 @@ with an optional suppress observers flag, run these steps: 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.