diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/html/global_attributes%2Fis.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/html/global_attributes%2Fis.html')
| -rw-r--r-- | devdocs/html/global_attributes%2Fis.html | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/devdocs/html/global_attributes%2Fis.html b/devdocs/html/global_attributes%2Fis.html deleted file mode 100644 index dab03631..00000000 --- a/devdocs/html/global_attributes%2Fis.html +++ /dev/null @@ -1,79 +0,0 @@ -<header><h1>is</h1></header><div class="section-content"> -<p>The <code>is</code> <a href="../global_attributes">global attribute</a> allows you to specify that a standard HTML element should behave like a defined custom built-in element (see <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_custom_elements">Using custom elements</a> for more details).</p> <p>This attribute can only be used if the specified custom element name has been successfully <a href="https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define">defined</a> in the current document, and extends the element type it is being applied to.</p> -</div> -<h2 id="examples">Examples</h2> -<div class="section-content"> -<p>The following code is taken from our <a href="https://github.com/mdn/web-components-examples/tree/main/word-count-web-component" target="_blank">word-count-web-component</a> example (<a href="https://mdn.github.io/web-components-examples/word-count-web-component/" target="_blank">see it live also</a>).</p> <div class="code-example"> -<p class="example-header"><span class="language-name">js</span></p> -<pre data-signature="jVc95/umnT02cy/WQ+QXP/GX79Q/NzKV4VzHQjCaIMo=" data-language="js"><span class="token comment">// Create a class for the element</span> -<span class="token keyword">class</span> <span class="token class-name">WordCount</span> <span class="token keyword">extends</span> <span class="token class-name">HTMLParagraphElement</span> <span class="token punctuation">{</span> - <span class="token function">constructor</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> - <span class="token comment">// Always call super first in constructor</span> - <span class="token keyword">super</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span> - - <span class="token comment">// Constructor contents omitted for brevity</span> - <span class="token comment">// …</span> - <span class="token punctuation">}</span> -<span class="token punctuation">}</span> - -<span class="token comment">// Define the new element</span> -customElements<span class="token punctuation">.</span><span class="token function">define</span><span class="token punctuation">(</span><span class="token string">"word-count"</span><span class="token punctuation">,</span> WordCount<span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token keyword">extends</span><span class="token operator">:</span> <span class="token string">"p"</span> <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span> -</pre> -</div> <div class="code-example"> -<p class="example-header"><span class="language-name">html</span></p> -<pre data-signature="2HWc9XXr7N6633Peud0V5KO5Agg7fFBZQXZH96uYCqM=" data-language="html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>p</span> <span class="token attr-name">is</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>word-count<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>p</span><span class="token punctuation">></span></span> -</pre> -</div> -</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/custom-elements.html#attr-is">HTML Standard <br><small># attr-is</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>is</code></th> -<td class="bc-supports-yes">67</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">54</td> -<td class="bc-supports-no">No</td> -<td class="bc-supports-yes">67</td> -<td class="bc-supports-yes">67</td> -<td class="bc-supports-yes">63</td> -<td class="bc-supports-yes">48</td> -<td class="bc-supports-no">No</td> -<td class="bc-supports-yes">9.0</td> -</tr></tbody> -</table></div> -<h2 id="see_also">See also</h2> -<div class="section-content"><ul> <li>All <a href="../global_attributes">global attributes</a>.</li> </ul></div><div class="_attribution"> - <p class="_attribution-p"> - © 2005–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/is" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/is</a> - </p> -</div> |
