aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/shadowroot/host
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-10-02 17:20:24 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-02 17:30:20 +0200
commit1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch)
tree30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/shadowroot/host
parentc05efa8d7ae464235cf83d7c0956e42dc6974103 (diff)
downloadtranslated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip
convert content to md
Diffstat (limited to 'files/fr/web/api/shadowroot/host')
-rw-r--r--files/fr/web/api/shadowroot/host/index.md53
1 files changed, 21 insertions, 32 deletions
diff --git a/files/fr/web/api/shadowroot/host/index.md b/files/fr/web/api/shadowroot/host/index.md
index 8b23a74117..5b3bf045e6 100644
--- a/files/fr/web/api/shadowroot/host/index.md
+++ b/files/fr/web/api/shadowroot/host/index.md
@@ -9,47 +9,36 @@ tags:
- shadow dom
translation_of: Web/API/ShadowRoot/host
---
-<div>{{APIRef("Shadow DOM")}}</div>
+{{APIRef("Shadow DOM")}}
-<p>La propriété <strong><code>host</code></strong> est une propriété en lecture seule, rattachée à l'interface {{domxref("ShadowRoot")}} et qui représente une référence à l'élément du DOM auquel la racine <code>ShadowRoot</code> est attachée.</p>
+La propriété **`host`** est une propriété en lecture seule, rattachée à l'interface {{domxref("ShadowRoot")}} et qui représente une référence à l'élément du DOM auquel la racine `ShadowRoot` est attachée.
-<h2 id="Syntaxe">Syntaxe</h2>
+## Syntaxe
-<pre class="syntaxbox">var <em>element</em> = <em>shadowRoot</em>.host</pre>
+ var element = shadowRoot.host
-<h3 id="Valeur">Valeur</h3>
+### Valeur
-<p>Un élément du DOM sous la forme d'un objet {{domxref('Element')}}.</p>
+Un élément du DOM sous la forme d'un objet {{domxref('Element')}}.
-<h2 id="Exemples">Exemples</h2>
+## Exemples
-<pre class="brush: js">let customElem = document.querySelector('mon-element-shadow-dom');
+```js
+let customElem = document.querySelector('mon-element-shadow-dom');
let shadow = customElem.shadowRoot;
...
// renvoie l'élément hôte
-let hostElem = shadow.host;</pre>
-
-<h2 id="Spécifications">Spécifications</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Spécification</th>
- <th scope="col">État</th>
- <th scope="col">Commentaires</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName('DOM WHATWG','#dom-shadowroot-host','ShadowRoot.host')}}</td>
- <td>{{Spec2('DOM WHATWG')}}</td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
-
-<p>{{Compat("api.ShadowRoot.host")}}</p>
+let hostElem = shadow.host;
+```
+
+## Spécifications
+
+| Spécification | État | Commentaires |
+| ---------------------------------------------------------------------------------------- | -------------------------------- | ------------ |
+| {{SpecName('DOM WHATWG','#dom-shadowroot-host','ShadowRoot.host')}} | {{Spec2('DOM WHATWG')}} | |
+
+## Compatibilité des navigateurs
+
+{{Compat("api.ShadowRoot.host")}}