Re: [whatwg/dom] Add Imperative Slot API (#860)

@mfreed7 commented on this pull request.



>    readonly attribute Element host;
   attribute EventHandler onslotchange;
 };
 
 enum ShadowRootMode { "open", "closed" };
+enum SlotAssignmentMode { "manual", "name" };

Does someone know when `"auto"` became `"name"`? The Chromium (shipped) [implementation](https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/dom/shadow_root_init.idl;l=8;drc=56d5b2938952df0e68bf54baaa41d6cfc3a63401) uses `"auto"`. Usage is low, so we can probably still change this, but I'm curious if this was an accident.

> @@ -2195,7 +2199,16 @@ for a given <a>slot</a> <var>slot</var>, run these steps:</p>
  <a for=DocumentFragment>host</a>.</p></li>
 
  <li>
-  <p>For each <a>slottable</a> <a for=tree>child</a> of <var>host</var>, <var>slottable</var>, in
+  <p>If <var>slot</var>'s <a for=/>shadow root</a>'s <a for=ShadowRoot>slot assignment</a> is "<code>manual</code>",
+  then:</p>
+
+  <ol>
+   <li><p>Set <var>result</var> to <var>slot</var>'s <a>manually assigned nodes</a>.</p></li>

Ok, I have the changes made locally, but:
 a) I don't think I have permission to push to this PR, so I'll need to create a fresh one. Is that correct?
 b) It seems that `master` became `main`, and while I support that change, my Git-fu precludes me from being able to get changes. I'm going to pull a fresh fork and see if that helps. I wish git and GitHub were less hostile.

Suggestions for either of the above appreciated. 

> @@ -2668,6 +2681,11 @@ indicated in the <a for=/>remove</a> algorithm below.
   <p>If <var>node</var> has an <a>inclusive descendant</a> that is a <a>slot</a>, then:
 
   <ol>
+   <li><p>for each <a>slot</a> <var>slot</var> in <var>node</var>'s <a for=tree>inclusive descendants</a>,
+   if <var>slot</var>'s <a for=tree>root</a> is a <a for=/>shadow root</a> whose <a for=tree>root</a>'s
+   <a for=ShadowRoot>slot assignment</a> is "<code>manual</code>", then set <var>slot</var>'s
+   <a>manually assigned nodes</a> to an empty set.

Removed.

> @@ -2660,6 +2682,11 @@ indicated in the <a for=/>remove</a> algorithm below.
   <p>If <var>node</var> has an <a>inclusive descendant</a> that is a <a>slot</a>, then:
 
   <ol>
+   <li><p>for each <a>slot</a> <var>slot</var> in <var>node</var>'s <a for=tree>inclusive descendants</a>,

Done.

-- 
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/860#pullrequestreview-627393393

Received on Friday, 2 April 2021 23:09:47 UTC