Re: [whatwg/dom] Manage slot manipulation centrally and special case replace operations (#695)

annevk commented on this pull request.



> @@ -2203,6 +2203,36 @@ steps:
  <li><p>If <var>slot</var> is non-null, then run <a>assign slotables</a> for <var>slot</var>.
 </ol>
 
+<p>To <dfn noexport>update slots</dfn>, given <var>removedNodes</var>, <var>parent</var>, and
+<var>addedNodes</var>, run these steps:
+
+<ol>
+ <li>
+  <p>For each <var>removedNode</var> in <var>removedNodes</var>:
+
+  <ol>
+   <li><p>If <var>removedNode</var> is <a for=slotable>assigned</a>, then run
+   <a>assign slotables</a> for <var>removedNode</var>'s <a>assigned slot</a>.
+
+   <li><p>If <var>removedNode</var> has an <a>inclusive descendant</a> that is a <a>slot</a>, then
+   run <a>assign slotables for a tree</a> with <var>removedNode</var>.

Thanks! @rniwa do you have any thoughts on order? I looked this through with Edgar and either way we are going to change the order here in order to centralize some of this work for "replace all". I don't care strongly for which slot we signal things first.

And also, given that browsers are already different, it probably does not matter much?

Not sure who to copy from Chrome. @domenic?

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

Received on Tuesday, 7 May 2019 12:46:12 UTC