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

@domfarolino 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>

OK thanks for the discussion @smaug----. Anne and I (among others) also discussed this a bit at the last WHATNOT meeting. The latest commit adds a static node list that we populate with all of the inserted nodes. Then we call the post-insertion steps on each of them in that list (if they are connected), so that we don't perform any live tree traversal operations in between post-insertion steps. PTAL!

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

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

Received on Wednesday, 1 May 2024 16:16:22 UTC