Re: [whatwg/dom] Introduce DOM post-insertion steps (PR #1261)

@smaug---- commented on this pull request.



> @@ -2752,6 +2810,16 @@ before a <var>child</var>, with an optional <i>suppress observers flag</i>, run
  <var>parent</var> with <var>nodes</var>, « », <var>previousSibling</var>, and <var>child</var>.
 
  <li><p>Run the <a>children changed steps</a> for <var>parent</var>.
+
+ <li>
+  <p>For each <var>node</var> in <var>nodes</var>, in <a>tree order</a>:
+
+  <ol>
+   <li><p>For each <a>shadow-including inclusive descendant</a> <var>inclusiveDescendant</var> of
+   <var>node</var>, in <a>shadow-including tree order</a>, run the <a>post-insertion steps</a> with
+   <var>inclusiveDescendant</var>.
+  </ol>
+ </li>

Adding the same comment here what I added to #whatwg matrix channel
" I don't know how the insertion step model works in case of mutations. Say, you have an element and it has 3 child elements. That subtree root element is inserted to document tree. Now child 1 has insertion steps which run some script which removes the child and adds it to be the last of the child nodes. So child list is now 2, 3, 1. Do the insertion steps get run on 1 again, because it is now after 2 and 3?"


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1261#pullrequestreview-1995158116
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1261/review/1995158116@github.com>

Received on Thursday, 11 April 2024 19:55:23 UTC