Skip to content

Commit 65aba37

Browse files
Imperative Slot Assignment (#55)
* fix typo * Slot assignment research WIP * add notes about current examples and status of imperative slot API
1 parent f86517c commit 65aba37

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

reports/2022.html

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ <h3>Table of Contents</h3>
177177
<td></td>
178178
</tr>
179179
<tr>
180-
<th><a href="#imperative-slot-assignement">Imperative Slot Assignement</a></th>
181-
<td></td>
182-
<td></td>
180+
<th><a href="#imperative-slot-assignment">Imperative Slot Assignment</a></th>
181+
<td><a href="https://github.com/whatwg/html/issues/3534" target="_blank">whatwg/html#3534</a></td>
183182
<td></td>
183+
<td>Partial Implementation</td>
184184
</tr>
185185
<tr>
186186
<th><a href="#css-properties-and-values-inside-shadow-root">CSS Properties and values inside shadow root</a></th>
@@ -1371,16 +1371,16 @@ <h3>Open Questions</h3>
13711371
</section>
13721372
</section>
13731373
<section>
1374-
<h2>Imperative Slot Assignement</h2>
1374+
<h2>Imperative Slot Assignment</h2>
13751375
<section>
13761376
<h3>Links</h3>
13771377
<dl>
13781378
<dt>Previous WCCG Report(s)</dt>
13791379
<dd>N/A</dd>
13801380
<dt>GitHub issues:</dt>
1381-
<dd>---</dd>
1381+
<dd><a href="https://github.com/whatwg/html/issues/3534">whatwg/html#3534</a></dd>
13821382
<dt>Browser positions:</dt>
1383-
<dd>---</dd>
1383+
<dd><a href="https://github.com/mozilla/standards-positions/issues/335" target="_blank">Firefox</a></dd>
13841384
</dl>
13851385
</section>
13861386
<section>
@@ -1390,16 +1390,26 @@ <h3>Description</h3>
13901390
<section>
13911391
<h3>Status</h3>
13921392
<ul>
1393-
<li>---</li>
1393+
<li><a href="https://chromestatus.com/feature/5711021289242624" target="_blank">Chrome</a> (Shipped)</li>
1394+
<li><a href="" target="_blank">Firefox</a> (Shipped)</li>
1395+
<li><a href="https://webkit.org/status/#feature-imperative-slot-api" target="_blank">Safari (Shipped?)</a></li>
13941396
</ul>
13951397
</section>
13961398
<section>
13971399
<h3>Initial API Summary/Quick API Proposal</h3>
1398-
<p>Summary or proposal based on current status; paragraph(s) and code.</p>
1400+
<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>
1401+
<pre class="html">
1402+
&lt;custom-tab show-panel="2"&gt;
1403+
&lt;tab-panel>&lt;/tab-panel&gt;
1404+
&lt;tab-panel>&lt;/tab-panel&gt;
1405+
&lt;tab-panel>&lt;/tab-panel&gt;
1406+
&lt;/custom-tab&gt;
1407+
</pre>
1408+
<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>
13991409
</section>
14001410
<section>
14011411
<h3>Key Scenarios</h3>
1402-
<p>---</p>
1412+
<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>
14031413
</section>
14041414
<section>
14051415
<h3>Concerns</h3>
@@ -1422,7 +1432,7 @@ <h3>Related Specs</h3>
14221432
<section>
14231433
<h3>Open Questions</h3>
14241434
<ul>
1425-
<li>---</li>
1435+
<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>
14261436
</ul>
14271437
</section>
14281438
</section>

0 commit comments

Comments
 (0)