diff options
Diffstat (limited to 'files/ca/web/html/element/shadow/index.html')
| -rw-r--r-- | files/ca/web/html/element/shadow/index.html | 164 |
1 files changed, 0 insertions, 164 deletions
diff --git a/files/ca/web/html/element/shadow/index.html b/files/ca/web/html/element/shadow/index.html deleted file mode 100644 index 59d02dcbf1..0000000000 --- a/files/ca/web/html/element/shadow/index.html +++ /dev/null @@ -1,164 +0,0 @@ ---- -title: <shadow> -slug: Web/HTML/Element/Shadow -tags: - - Element - - HTML - - Reference - - Web Components -translation_of: Web/HTML/Element/shadow ---- -<h2 id="Summary" name="Summary">Sumari</h2> - -<p>L'element <strong><a href="/en-US/docs/Web/HTML">HTML</a> <code><shadow></code></strong> s'utilitza com una ombra DOM {{glossary("insertion point")}}. És possible utilitzar-ho si s'han creat múltiples arrels d'ombra sota una ombra d'acollida. No és útil en HTML ordinari. S'utilitza amb <a href="/en-US/docs/Web/Web_Components">Components Web (Web Components)</a>.</p> - -<table class="properties"> - <tbody> - <tr> - <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Categories de contingut</a></th> - <td><a href="/en-US/docs/Web/HTML/Content_categories#Transparent_content_model" title="HTML/Content_categories#Transparent_content_model">Contingut transparent</a>.</td> - </tr> - <tr> - <th scope="row">Contingut permès</th> - <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Contingut dinàmic</a>.</td> - </tr> - <tr> - <th scope="row">Omissió de l'etiqueta</th> - <td>{{no_tag_omission}}</td> - </tr> - <tr> - <th scope="row">Elements pares permesos</th> - <td>Qualsevol element que accepti contingut dinàmic</td> - </tr> - <tr> - <th scope="row">Interfície DOM</th> - <td>{{domxref("HTMLShadowElement")}}</td> - </tr> - </tbody> -</table> - -<h2 id="Attributes" name="Attributes">Atributs</h2> - -<p>Aquest element inclou els <a href="/en-US/docs/Web/HTML/Global_attributes">atributs globals</a>.</p> - -<h2 id="Exemple">Exemple</h2> - -<p>Aquí teniu un exemple senzill de l'ús de l'element <code><shadow</code>>. És un arxiu HTML amb tot el necessari.</p> - -<div class="note"> -<p><strong>Nota:</strong> Aquesta és una tecnologia experimental. Perquè aquest codi funcioni, el navegador que ho mostri ha de ser compatible amb els components web. Veure <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components#Enabling_Web_Components_in_Firefox">Habilitan components web en Firefox (Enabling Web Components in Firefox).</a></p> -</div> - -<pre class="brush: html"><html> - <head></head> - <body> - - <!-- This <div> will hold the shadow roots. --> - <div> - <!-- This heading will not be displayed --> - <h4>My Original Heading</h4> - </div> - - <script> - // Get the <div> above with its content - var origContent = document.querySelector('div'); - // Create the first shadow root - var shadowroot1 = origContent.createShadowRoot(); - // Create the second shadow root - var shadowroot2 = origContent.createShadowRoot(); - - // Insert something into the older shadow root - shadowroot1.innerHTML = - '<p>Older shadow root inserted by &lt;shadow&gt;</p>'; - // Insert into younger shadow root, including <shadow>. - // The previous markup will not be displayed unless - // <shadow> is used below. - shadowroot2.innerHTML = - '<shadow></shadow> <p>Younger shadow root, displayed because it is the youngest.</p>'; - </script> - - </body> -</html> -</pre> - -<p>Si visualitzes això en un navegador web ha de ser similar al següent.</p> - -<p><img alt="shadow example" src="https://mdn.mozillademos.org/files/10083/shadow-example.png" style="height: 343px; width: 641px;"></p> - -<h2 id="Especificacions">Especificacions</h2> - -<table class="spec-table standard-table"> - <tbody> - <tr> - <th scope="col">Especificació</th> - <th scope="col">Estat</th> - <th scope="col">Comentari</th> - </tr> - <tr> - <td>{{SpecName('Shadow DOM', "#the-shadow-element", "shadow")}}</td> - <td>{{Spec2('Shadow DOM')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility" name="Browser_compatibility">Navegadors compatibles</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>35</td> - <td>{{CompatGeckoDesktop("28")}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>26</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Característica</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Suport bàsic</td> - <td>37</td> - <td>{{CompatGeckoMobile("28")}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Si Shadow DOM no està activat en Firefox, l'element <code><shadow></code> es comportarà com {{domxref("HTMLUnknownElement")}}. Shadow DOM es va implementar per primera vegada a Firefox 33 i està darrere d'una preferència, <code>dom.webcomponents.enabled</code>, que està desactivat per defecte.</p> - -<h2 id="See_also" name="See_also">Veure</h2> - -<ul> - <li><a href="/en-US/docs/Web/Web_Components">Web Components</a></li> - <li>{{HTMLElement("content")}}, {{HTMLElement("template")}}, {{HTMLElement("element")}}</li> -</ul> - -<div>{{HTMLRef}}</div> |
