summaryrefslogtreecommitdiff
path: root/devdocs/html/global_attributes%2Fslot.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/html/global_attributes%2Fslot.html
new repository
Diffstat (limited to 'devdocs/html/global_attributes%2Fslot.html')
-rw-r--r--devdocs/html/global_attributes%2Fslot.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/devdocs/html/global_attributes%2Fslot.html b/devdocs/html/global_attributes%2Fslot.html
new file mode 100644
index 00000000..93ce3bdb
--- /dev/null
+++ b/devdocs/html/global_attributes%2Fslot.html
@@ -0,0 +1,60 @@
+<header><h1>slot</h1></header><div class="section-content">
+<p>The <code>slot</code> <a href="../global_attributes">global attribute</a> assigns a slot in a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM">shadow DOM</a> shadow tree to an element: An element with a <code>slot</code> attribute is assigned to the slot created by the <a href="../element/slot"><code>&lt;slot&gt;</code></a> element whose <a href="../element/slot#name"><code>name</code></a> attribute's value matches that <code>slot</code> attribute's value.</p> <p>For examples, see our <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots">Using templates and slots</a> guide.</p>
+</div>
+<h2 id="specifications">Specifications</h2>
+<div class="_table"><table class="standard-table">
+<thead><tr><th scope="col">Specification</th></tr></thead>
+<tbody>
+<tr><td><a href="https://html.spec.whatwg.org/multipage/dom.html#attr-slot">HTML Standard <br><small># attr-slot</small></a></td></tr>
+<tr><td><a href="#">DOM Standard <br><small># ref-for-dom-element-slot①</small></a></td></tr>
+</tbody>
+</table></div>
+<h2 id="browser_compatibility">Browser compatibility</h2>
+<div class="_table"><table>
+<thead>
+<tr id="bct-browser-type">
+<th></th>
+<th colspan="6">Desktop</th>
+<th colspan="6">Mobile</th>
+</tr>
+<tr id="bct-browsers">
+<th></th>
+<th>Chrome</th>
+<th>Edge</th>
+<th>Firefox</th>
+<th>Internet Explorer</th>
+<th>Opera</th>
+<th>Safari</th>
+<th>WebView Android</th>
+<th>Chrome Android</th>
+<th>Firefox for Android</th>
+<th>Opera Android</th>
+<th>Safari on IOS</th>
+<th>Samsung Internet</th>
+</tr>
+</thead>
+<tbody><tr>
+<th><code>slot</code></th>
+<td class="bc-supports-yes">53</td>
+<td class="bc-supports-yes">≤79</td>
+<td class="bc-supports-yes">63</td>
+<td class="bc-supports-no">No</td>
+<td class="bc-supports-yes">40</td>
+<td class="bc-supports-yes">10</td>
+<td class="bc-supports-yes">53</td>
+<td class="bc-supports-yes">53</td>
+<td class="bc-supports-yes">63</td>
+<td class="bc-supports-yes">41</td>
+<td class="bc-supports-yes">10</td>
+<td class="bc-supports-yes">6.0</td>
+</tr></tbody>
+</table></div>
+<h2 id="see_also">See also</h2>
+<div class="section-content"><ul> <li>HTML <a href="../global_attributes">global attributes</a>
+</li> <li>HTML <a href="../element/slot"><code>&lt;slot&gt;</code></a> element</li> <li>HTML <a href="../element/template"><code>&lt;template&gt;</code></a> element</li> <li>CSS <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/::slotted"><code>::slotted</code></a> pseudo-element</li> <li>
+<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_scoping">CSS scoping</a> module</li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components">Web components</a></li> </ul></div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2005&ndash;2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
+ <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/slot</a>
+ </p>
+</div>