You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 11, 2019. It is now read-only.
Fix#39: Part I: Always queue mutation records after said mutations.
Queuing of mutation records looks inconsistent. To replace a child with
node within a parent, the mutation record should be queued after the
removal of child and insertion of node.
See whatwg#60 for more details.
<li><p>Let <var>nodes</var> be <var>node</var>'s <a>children</a> if <var>node</var> is a <code><a>DocumentFragment</a></code> <a>node</a>, and a list containing solely <var>node</var> otherwise.
169
169
170
170
<li>
171
+
<li><p>If <var>node</var> is a <code><a>DocumentFragment</a></code> <a>node</a>, <a href="#node-remove">remove</a> its <a>children</a> with the <i>suppress observers flag</i> set.
171
172
<p>If <var>node</var> is a <code><a>DocumentFragment</a></code> <a>node</a>, <a>queue a mutation record</a> of "<code>childList</code>" for <var>node</var> with removedNodes <var>nodes</var>.
172
173
173
174
<p class="note">Note: This step intentionally does not pay attention to the <i>suppress observers flag</i>.
174
-
175
-
<li><p>If <var>node</var> is a <code><a>DocumentFragment</a></code> <a>node</a>, <a href="#node-remove">remove</a> its <a>children</a> with the <i>suppress observers flag</i> set.
176
-
177
-
<li><p>If <i>suppress observers flag</i> is unset, <a>queue a mutation record</a> of "<code>childList</code>" for <var>parent</var> with addedNodes <var>nodes</var>, nextSibling <var>child</var>, and previousSibling <var>child</var>'s <a href="#tree-previous-sibling">previous sibling</a> or <var>parent</var>'s <a>last child</a> if <var>child</var> is null.
178
-
179
175
<li>
180
176
<p>For each <var>newNode</var> in <var>nodes</var>, in <a>tree order</a>, run these substeps:
<li><p>Run the <a>insertion steps</a> with <var>newNode</var>.
186
182
</ol>
183
+
<li><p>If <i>suppress observers flag</i> is unset, <a>queue a mutation record</a> of "<code>childList</code>" for <var>parent</var> with addedNodes <var>nodes</var>, nextSibling <var>child</var>, and previousSibling <var>child</var>'s <a href="#tree-previous-sibling">previous sibling</a> or <var>parent</var>'s <a>last child</a> if <var>child</var> is null.
<li><p>If <i>suppress observers flag</i> is unset, <a>queue a mutation record</a> of "<code>childList</code>" for <var>parent</var> with removedNodes a list solely containing <var>node</var>, nextSibling <var>node</var>'s <a href="#tree-next-sibling">next sibling</a>,
288
286
and previousSibling <var>oldPreviousSibling</var>.
289
287
290
-
<li><p>For each <a>ancestor</a> <var>ancestor</var> of <var>node</var>, if <var>ancestor</var> has any <a>registered observers</a> whose <b>options</b>'s <code>subtree</code> is true, then for each such <a>registered observer</a> <var>registered</var>, append a <a>transient registered observer</a> whose <b>observer</b> and <b>options</b> are identical to those of <var>registered</var> and <b>source</b> which is <var>registered</var> to <var>node</var>'s list of <a>registered observers</a>.
291
-
292
288
<li><p>Remove <var>node</var> from its <var>parent</var>.
293
289
294
290
<li><p>Run the <a>removing steps</a> with <var>node</var>, <var>parent</var>, and <var>oldPreviousSibling</var>.
291
+
<li><p>For each <a>ancestor</a> <var>ancestor</var> of <var>node</var>, if <var>ancestor</var> has any <a>registered observers</a> whose <b>options</b>'s <code>subtree</code> is true, then for each such <a>registered observer</a> <var>registered</var>, append a <a>transient registered observer</a> whose <b>observer</b> and <b>options</b> are identical to those of <var>registered</var> and <b>source</b> which is <var>registered</var> to <var>node</var>'s list of <a>registered observers</a>.
0 commit comments