aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/html/element/shadow/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/html/element/shadow/index.html
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/de/web/html/element/shadow/index.html')
-rw-r--r--files/de/web/html/element/shadow/index.html159
1 files changed, 159 insertions, 0 deletions
diff --git a/files/de/web/html/element/shadow/index.html b/files/de/web/html/element/shadow/index.html
new file mode 100644
index 0000000000..4072f6237b
--- /dev/null
+++ b/files/de/web/html/element/shadow/index.html
@@ -0,0 +1,159 @@
+---
+title: <shadow>
+slug: Web/HTML/Element/Shadow
+translation_of: Web/HTML/Element/shadow
+---
+<h2 id="Summary" name="Summary">Zusammenfassung</h2>
+
+<p>Das <strong><a href="/en-US/docs/Web/HTML">HTML</a> <code>&lt;shadow&gt;</code></strong> Element wird als shadow DOM {{glossary("insertion point")}} genutzt. Es kann eventuell gesehen werden, wenn mehrerere shadow roots unter einem shadow host erstellt wurden. Es wird mit <a href="/en-US/docs/Web/Web_Components">Web Components</a> genutzt.</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories">Kategorien des Inhalts</a></th>
+ <td><a href="/en-US/docs/Web/HTML/Content_categories#Transparent_content_model" title="HTML/Content_categories#Transparent_content_model">Transparenter Inhalt</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Zulässiger Inhalt</th>
+ <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">Tags</th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row">Zulässige Eltern-Elemente</th>
+ <td>Any element that accepts flow content.</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM Schnittstelle</th>
+ <td>{{domxref("HTMLShadowElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Attributes" name="Attributes">Attribute</h2>
+
+<p>Dieses Element inkludiert die <a href="/en-US/docs/Web/HTML/Global_attributes">Globalen Attribute</a>.</p>
+
+<h2 id="Beispiel">Beispiel</h2>
+
+<p>Hier ist ein einfaches Beispiel, welches das <code>&lt;shadow&gt;</code> Element verwendet. Es ist eine HTML-Datei mit allem was benötigt wird.</p>
+
+<div class="note">
+<p><strong>Notiz:</strong> Dies ist eine experimentelle Technologie. Damit dieser Code funktioniert muss ihr Browser Web Components unterstützen.  <a href="/en-US/docs/Web/Web_Components#Enabling_Web_Components_in_Firefox">Aktivieren von Web Components in Firefox</a>.</p>
+</div>
+
+<pre class="brush: html">&lt;html&gt;
+ &lt;head&gt;&lt;/head&gt;
+ &lt;body&gt;
+
+  &lt;!-- This &lt;div&gt; will hold the shadow roots. --&gt;
+  &lt;div&gt;
+    &lt;!-- This heading will not be displayed --&gt;
+    &lt;h4&gt;My Original Heading&lt;/h4&gt;
+  &lt;/div&gt;
+
+  &lt;script&gt;
+    // Get the &lt;div&gt; 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 =
+      '&lt;p&gt;Older shadow root inserted by &amp;lt;shadow&amp;gt;&lt;/p&gt;';
+    // Insert into younger shadow root, including &lt;shadow&gt;.
+    // The previous markup will not be displayed unless
+    // &lt;shadow&gt; is used below.
+    shadowroot2.innerHTML =
+      '&lt;shadow&gt;&lt;/shadow&gt; &lt;p&gt;Younger shadow root, displayed because it is the youngest.&lt;/p&gt;';
+  &lt;/script&gt;
+
+ &lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<p>Das obige Beispiel sollte folgendes anzeigen.</p>
+
+<p><img alt="shadow example" src="https://mdn.mozillademos.org/files/10083/shadow-example.png" style="height: 343px; width: 641px;"></p>
+
+<h2 id="Spezifikationen">Spezifikationen</h2>
+
+<table class="spec-table standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</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">Browser Kompatibilität</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</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>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</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] Wenn Shadow DOM nicht in Firefox aktiviert ist, verhalten sich <code>&lt;shadow&gt;</code> Elemente wie {{domxref("HTMLUnknownElement")}}. Shadow DOM wurde erstmals in Firefox 33 implementiert und steckt hinter der Einstellung <code>dom.webcomponents.enabled</code>, welche standardmäßig aktiviert ist.</p>
+
+<h2 id="See_also" name="See_also">Siehe auch</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>