Skip to content

Commit fe94fe3

Browse files
add notes about current examples and status of imperative slot API
1 parent c1dd220 commit fe94fe3

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

reports/2022.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ <h3>Table of Contents</h3>
161161
<th><a href="#imperative-slot-assignment">Imperative Slot Assignment</a></th>
162162
<td><a href="https://github.com/whatwg/html/issues/3534" target="_blank">whatwg/html#3534</a></td>
163163
<td></td>
164-
<td></td>
164+
<td>Partial Implementation</td>
165165
</tr>
166166
<tr>
167167
<th><a href="#css-properties-and-values-inside-shadow-root">CSS Properties and values inside shadow root</a></th>
@@ -1331,17 +1331,25 @@ <h3>Description</h3>
13311331
<h3>Status</h3>
13321332
<ul>
13331333
<li><a href="https://chromestatus.com/feature/5711021289242624" target="_blank">Chrome</a> (Shipped)</li>
1334-
<li><a href="" target="_blank">Firefox</a> (Shipped?)</li>
1335-
<li><a href="https://webkit.org/status/#feature-imperative-slot-api" target="_blank">Safari</a> (Shipped?)</li>
1334+
<li><a href="" target="_blank">Firefox</a> (Shipped)</li>
1335+
<li><a href="https://webkit.org/status/#feature-imperative-slot-api" target="_blank">Safari (Shipped?)</a></li>
13361336
</ul>
13371337
</section>
13381338
<section>
13391339
<h3>Initial API Summary/Quick API Proposal</h3>
1340-
<p>Summary or proposal based on current status; paragraph(s) and code.</p>
1340+
<p>Currently the Slot API only supports a declarative API, meaning that slot usage can only be expressed through adding the name attribute on an element. But there are valid cases where from multiple sources of slotted content, the Web Components author may want to programmatically set the content of a slot instead. Take <a href="https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Imperative-Shadow-DOM-Distribution-API.md" target="_blank">this example</a> from the proposal.</p>
1341+
<pre class="html">
1342+
&lt;custom-tab show-panel="2"&gt;
1343+
&lt;tab-panel>&lt;/tab-panel&gt;
1344+
&lt;tab-panel>&lt;/tab-panel&gt;
1345+
&lt;tab-panel>&lt;/tab-panel&gt;
1346+
&lt;/custom-tab&gt;
1347+
</pre>
1348+
<p>Without an imperative API, how would an author be able to set the contents of a single available slot to the selected panel index?</p>
13411349
</section>
13421350
<section>
13431351
<h3>Key Scenarios</h3>
1344-
<p>---</p>
1352+
<p>Some of the scenarios called out in the proposal include not having to pre-compute the slot names ahead of time, as well as being able to conditionally load content into a slot.</p>
13451353
</section>
13461354
<section>
13471355
<h3>Concerns</h3>
@@ -1364,7 +1372,7 @@ <h3>Related Specs</h3>
13641372
<section>
13651373
<h3>Open Questions</h3>
13661374
<ul>
1367-
<li>---</li>
1375+
<li>What is Safari's timeline for shipping? Their feature tracker confirms it is supported, but <a href="https://codepen.io/Westbrook/pen/GRvbWzM">this example</a> doesn't work on iOS.</li>
13681376
</ul>
13691377
</section>
13701378
</section>

0 commit comments

Comments
 (0)