Skip to content

Commit

Permalink
add notes about current examples and status of imperative slot API
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Sep 5, 2022
1 parent c1dd220 commit fe94fe3
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions reports/2022.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ <h3>Table of Contents</h3>
<th><a href="#imperative-slot-assignment">Imperative Slot Assignment</a></th>
<td><a href="https://github.com/whatwg/html/issues/3534" target="_blank">whatwg/html#3534</a></td>
<td></td>
<td></td>
<td>Partial Implementation</td>
</tr>
<tr>
<th><a href="#css-properties-and-values-inside-shadow-root">CSS Properties and values inside shadow root</a></th>
Expand Down Expand Up @@ -1331,17 +1331,25 @@ <h3>Description</h3>
<h3>Status</h3>
<ul>
<li><a href="https://chromestatus.com/feature/5711021289242624" target="_blank">Chrome</a> (Shipped)</li>
<li><a href="" target="_blank">Firefox</a> (Shipped?)</li>
<li><a href="https://webkit.org/status/#feature-imperative-slot-api" target="_blank">Safari</a> (Shipped?)</li>
<li><a href="" target="_blank">Firefox</a> (Shipped)</li>
<li><a href="https://webkit.org/status/#feature-imperative-slot-api" target="_blank">Safari (Shipped?)</a></li>
</ul>
</section>
<section>
<h3>Initial API Summary/Quick API Proposal</h3>
<p>Summary or proposal based on current status; paragraph(s) and code.</p>
<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>
<pre class="html">
&lt;custom-tab show-panel="2"&gt;
&lt;tab-panel>&lt;/tab-panel&gt;
&lt;tab-panel>&lt;/tab-panel&gt;
&lt;tab-panel>&lt;/tab-panel&gt;
&lt;/custom-tab&gt;
</pre>
<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>
</section>
<section>
<h3>Key Scenarios</h3>
<p>---</p>
<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>
</section>
<section>
<h3>Concerns</h3>
Expand All @@ -1364,7 +1372,7 @@ <h3>Related Specs</h3>
<section>
<h3>Open Questions</h3>
<ul>
<li>---</li>
<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>
</ul>
</section>
</section>
Expand Down

0 comments on commit fe94fe3

Please sign in to comment.