diff options
author | tristantheb <tristantheb@users.noreply.github.com> | 2021-04-02 13:50:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 13:50:14 +0200 |
commit | 99efa5cfa34c3f9d38b75352881acdfc99508ebf (patch) | |
tree | 15a37e05bf05f0daff2893f0a2f1c8a3673ac86b /files/fr/web/api/document | |
parent | c37cf5ec1bb9d4f6c51d12eaeef1bd5af12695f8 (diff) | |
download | translated-content-99efa5cfa34c3f9d38b75352881acdfc99508ebf.tar.gz translated-content-99efa5cfa34c3f9d38b75352881acdfc99508ebf.tar.bz2 translated-content-99efa5cfa34c3f9d38b75352881acdfc99508ebf.zip |
UPDATE: FR-ONLY - Remove all old CompatibilityTable to replace with {{Compat()}} (#311)
* UPDATE: Removing CompatibilityTable script - Part 1
* UPDATE: Removing CompatibilityTable script - Part 2
* UPDATE: Removing CompatibilityTable script - Part 3
* UPDATE: Removing CompatibilityTable script - Part 4
* UPDATE: Removing CompatibilityTable script - Part 5/5
* FIX: Repair the EOL of one page
* FIX: Fix conflicting file
Diffstat (limited to 'files/fr/web/api/document')
31 files changed, 192 insertions, 1810 deletions
diff --git a/files/fr/web/api/document/caretrangefrompoint/index.html b/files/fr/web/api/document/caretrangefrompoint/index.html index 02ec1616a9..e0166becb3 100644 --- a/files/fr/web/api/document/caretrangefrompoint/index.html +++ b/files/fr/web/api/document/caretrangefrompoint/index.html @@ -81,64 +81,6 @@ for (i=0 ; i < paragraphs.length; i++) { <p>{{ EmbedLiveSample('Example', '', '', '', 'Web/API/Document/caretRangeFromPoint') }}</p> -<p> </p> - <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Edge</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(43.0)}}</td> - <td>20+</td> - <td>{{CompatNo()}}</td> - <td>12</td> - <td>15+</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatNo}}</td> - <td>{{CompatChrome(43.0)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="sect1"> </h2> +<p>{{Compat("api.Document.caretRangeFromPoint")}}</p> diff --git a/files/fr/web/api/document/createdocumentfragment/index.html b/files/fr/web/api/document/createdocumentfragment/index.html index 63d8203bb7..806a9db921 100644 --- a/files/fr/web/api/document/createdocumentfragment/index.html +++ b/files/fr/web/api/document/createdocumentfragment/index.html @@ -76,60 +76,7 @@ element<span class="punctuation token">.</span><span class="function token">appe <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> </div> - -<div id="compat-mobile"> -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Edge</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>Edge</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.createDocumentFragment")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> </div> diff --git a/files/fr/web/api/document/createelementns/index.html b/files/fr/web/api/document/createelementns/index.html index f882f231b9..74f17956dd 100644 --- a/files/fr/web/api/document/createelementns/index.html +++ b/files/fr/web/api/document/createelementns/index.html @@ -104,72 +104,7 @@ translation_of: Web/API/Document/createElementNS <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td><code>options</code> argument</td> - <td>{{CompatVersionUnknown}}<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoDesktop(50)}}<sup>[2][3]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</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>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Dans les versions précédentes de la spécification, cet argument était juste une chaîne de caractères dont la valeur était un nom d'élément personnalisé. <span id="result_box" lang="fr"><span>Par souci de compatibilité ascendante, Chrome accepte les deux formes</span></span> .</p> - -<p>[2] Voir [1] <span id="result_box" lang="fr"><span>ci-dessus : comme Chrome, Firefox accepte une chaîne au lieu d'un objet ici, mais seulement à partir de la version 51 et suivantes.</span> <span>Dans la version 50, les <code>options</code> doivent être un objet.</span></span></p> - -<p>[3] <span id="result_box" lang="fr"><span>Pour expérimenter avec des éléments personnalisés dans Firefox, vous devez définir les préférences</span></span> <code>dom.webcomponents.enabled</code> et <code>dom.webcomponents.customelements.enabled</code> à <code>true</code> (<em>vrai</em>).</p> +<p>{{Compat("api.Document.createElementNS")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/createtextnode/index.html b/files/fr/web/api/document/createtextnode/index.html index 8f16aa0440..2455a75c30 100644 --- a/files/fr/web/api/document/createtextnode/index.html +++ b/files/fr/web/api/document/createtextnode/index.html @@ -75,54 +75,4 @@ translation_of: Web/API/Document/createTextNode <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</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>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.createTextNode")}}</p> diff --git a/files/fr/web/api/document/createtreewalker/index.html b/files/fr/web/api/document/createtreewalker/index.html index 87dbad7998..66c736285f 100644 --- a/files/fr/web/api/document/createtreewalker/index.html +++ b/files/fr/web/api/document/createtreewalker/index.html @@ -148,95 +148,7 @@ while(treeWalker.nextNode()) nodeList.push(treeWalker.currentNode); <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>1.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("1.8.1")}}</td> - <td>9.0</td> - <td>9.0</td> - <td>3.0</td> - </tr> - <tr> - <td><code>whatToShow</code> and <code>filter</code> optional</td> - <td>1.0</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("12")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>3.0</td> - </tr> - <tr> - <td><code>expandEntityReferences</code></td> - <td>1.0</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("1.8.1")}}<br> - Removed in {{CompatGeckoDesktop("12")}}</td> - <td>9.0</td> - <td>9.0</td> - <td>3.0</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("1.8.1")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9.0</td> - <td>3.0</td> - </tr> - <tr> - <td><code>whatToShow</code> and <code>filter</code> optional</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("12")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>3.0</td> - </tr> - <tr> - <td><code>expandEntityReferences</code></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("1.8.1")}}<br> - Removed in {{CompatGeckoDesktop("12")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9.0</td> - <td>3.0</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.createTreeWalker")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/currentscript/index.html b/files/fr/web/api/document/currentscript/index.html index 68fd2e0f4b..d0758e6c1e 100644 --- a/files/fr/web/api/document/currentscript/index.html +++ b/files/fr/web/api/document/currentscript/index.html @@ -55,59 +55,7 @@ translation_of: Web/API/Document/currentScript <h2 id="Compatibilité_navigateur">Compatibilité navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(29.0)}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>{{CompatNo}}</td> - <td>16</td> - <td>8</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>4.4</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>8</td> - </tr> - </tbody> -</table> -</div> +<div>{{Compat("api.Document.currentScript")}}</div> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/designmode/index.html b/files/fr/web/api/document/designmode/index.html index f3bac92585..e91fdfdf7a 100644 --- a/files/fr/web/api/document/designmode/index.html +++ b/files/fr/web/api/document/designmode/index.html @@ -24,79 +24,32 @@ document.designMode = "off";</pre> <pre>iframe_node.contentDocument.designMode = "on"; </pre> -<h2 id="Spécifications">Spécifications</h2> +<h2 id="Specifications">Spécifications</h2> <table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('HTML WHATWG', '#making-entire-documents-editable:-the-designmode-idl-attribute', 'designMode')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td>Initial definition.</td> - </tr> - </tbody> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + <th scope="col">Commentaire</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', '#making-entire-documents-editable:-the-designmode-idl-attribute', 'designMode')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>Définition initiale.</td> + </tr> + </tbody> </table> -<h2 id="Compatibilité_des_navigateurs" style="font-size: 2.14285714285714rem;">Compatibilité des navigateurs</h2> +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> -<p>{{ CompatibilityTable() }}</p> +<p>{{Compat("api.Document.designMode")}}</p> -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Chrome</th> - <th style="line-height: 16px;">Firefox (Gecko)</th> - <th style="line-height: 16px;">Internet Explorer</th> - <th style="line-height: 16px;">Opera</th> - <th style="line-height: 16px;">Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th style="line-height: 16px;">Feature</th> - <th style="line-height: 16px;">Android</th> - <th style="line-height: 16px;">Chrome for Android</th> - <th style="line-height: 16px;">Firefox Mobile (Gecko)</th> - <th style="line-height: 16px;">IE Mobile</th> - <th style="line-height: 16px;">Opera Mobile</th> - <th style="line-height: 16px;">Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="See_also" name="See_also">Voir aussi</h2> +<h2 id="See_also">Voir aussi</h2> <ul> - <li><a href="/en-US/docs/Rich-Text_Editing_in_Mozilla">Rich-Text Editing in Mozilla</a></li> - <li>{{domxref("HTMLElement.contentEditable")}}</li> - <li><a href="https://msdn.microsoft.com/en-us/library/ms533720(v=vs.85).aspx">designMode property</a> on MSDN</li> + <li><a href="/fr/docs/Web/Guide/HTML/Editable_content/Rich-Text_Editing_in_Mozilla">Rich-Text Editing in Mozilla</a></li> + <li>{{domxref("HTMLElement.contentEditable")}}</li> </ul> diff --git a/files/fr/web/api/document/document/index.html b/files/fr/web/api/document/document/index.html index 92f2305c02..b3da3b5f6b 100644 --- a/files/fr/web/api/document/document/index.html +++ b/files/fr/web/api/document/document/index.html @@ -40,54 +40,4 @@ translation_of: Web/API/Document/Document <h2 id="Compatibilité_Navigateurs">Compatibilité Navigateurs</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</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>{{CompatChrome(60)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOpera(47)}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(60)}}</td> - <td>{{CompatChrome(60)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOperaMobile(47)}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<div>{{Compat("api.Document.Document")}}</div> diff --git a/files/fr/web/api/document/drag_event/index.html b/files/fr/web/api/document/drag_event/index.html index 7bd2710641..958df729b3 100644 --- a/files/fr/web/api/document/drag_event/index.html +++ b/files/fr/web/api/document/drag_event/index.html @@ -244,59 +244,7 @@ translation_of: Web/API/Document/drag_event <h2 id="Compatibilités_navigateur">Compatibilités navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.drag_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/dragend_event/index.html b/files/fr/web/api/document/dragend_event/index.html index 74508d8303..ac2681db24 100644 --- a/files/fr/web/api/document/dragend_event/index.html +++ b/files/fr/web/api/document/dragend_event/index.html @@ -242,66 +242,10 @@ translation_of: Web/API/Document/dragend_event <h2 id="Compatibilités_navigateurs">Compatibilités navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}<sup>[1]</sup></td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Avec Gecko, <strong>dragend</strong> n'est pas envoyé si la source du nœud est déplacée ou supprimée durant l'opération de glissement (par ex. durant un événement <strong>drop</strong> ou <strong>dragover</strong>). Voir {{bug("460801")}}.</p> +<p>{{Compat("api.Document.dragend_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> -<p> </p> - <ul> <li>{{event("drag")}}</li> <li>{{event("dragstart")}}</li> @@ -312,5 +256,3 @@ translation_of: Web/API/Document/dragend_event <li>{{event("dragexit")}}</li> <li>{{event("drop")}}</li> </ul> - -<p> </p> diff --git a/files/fr/web/api/document/dragenter_event/index.html b/files/fr/web/api/document/dragenter_event/index.html index 50739f9415..2bdc66e42e 100644 --- a/files/fr/web/api/document/dragenter_event/index.html +++ b/files/fr/web/api/document/dragenter_event/index.html @@ -244,61 +244,7 @@ translation_of: Web/API/Document/dragenter_event <h2 id="Compatiblités_navigateurs">Compatiblités navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}<sup>[1]</sup></td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] <span id="summary_alias_container"><span id="short_desc_nonedit_display">L'événement <strong>dragenter</strong> est déclenché deux fois quand la zone de drop est parente de draggable ou gissable elle même. Voir </span></span>{{bug("804036")}}.</p> +<p>{{Compat("api.Document.dragenter_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/dragleave_event/index.html b/files/fr/web/api/document/dragleave_event/index.html index ef32a3fe75..dfccbbc044 100644 --- a/files/fr/web/api/document/dragleave_event/index.html +++ b/files/fr/web/api/document/dragleave_event/index.html @@ -242,59 +242,7 @@ translation_of: Web/API/Document/dragleave_event <h2 id="Compatibilités_navigateur">Compatibilités navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.dragleave_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/dragover_event/index.html b/files/fr/web/api/document/dragover_event/index.html index 2efc385956..86df0e5440 100644 --- a/files/fr/web/api/document/dragover_event/index.html +++ b/files/fr/web/api/document/dragover_event/index.html @@ -243,59 +243,7 @@ translation_of: Web/API/Document/dragover_event <h2 id="Compatibilités_navigateur">Compatibilités navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.dragover_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> @@ -309,5 +257,3 @@ translation_of: Web/API/Document/dragover_event <li>{{event("dragexit")}}</li> <li>{{event("drop")}}</li> </ul> - -<p> </p> diff --git a/files/fr/web/api/document/dragstart_event/index.html b/files/fr/web/api/document/dragstart_event/index.html index fb43328e8b..4eed44888d 100644 --- a/files/fr/web/api/document/dragstart_event/index.html +++ b/files/fr/web/api/document/dragstart_event/index.html @@ -247,59 +247,7 @@ translation_of: Web/API/Document/dragstart_event <h2 id="Compatibilités_navigateur">Compatibilités navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.dragstart_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/drop_event/index.html b/files/fr/web/api/document/drop_event/index.html index a67eb0684b..68d66c8116 100644 --- a/files/fr/web/api/document/drop_event/index.html +++ b/files/fr/web/api/document/drop_event/index.html @@ -245,59 +245,7 @@ translation_of: Web/API/Document/drop_event <h2 id="Compatibilités_navigateur">Compatibilités navigateur</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basique</td> - <td>4</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>10</td> - <td>12</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Navigateur</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatIE("10")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.drop_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/exitfullscreen/index.html b/files/fr/web/api/document/exitfullscreen/index.html index a5c8172182..e91d987e34 100644 --- a/files/fr/web/api/document/exitfullscreen/index.html +++ b/files/fr/web/api/document/exitfullscreen/index.html @@ -50,62 +50,7 @@ document.onclick = function (event) { <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}<br> - {{CompatChrome(45)}} (unprefixed)</td> - <td>{{CompatGeckoDesktop("9.0")}} as <code>mozCancelFullScreen</code><sup>[1]</sup><br> - {{CompatGeckoDesktop("47.0")}}<sup>[1]</sup> (behind <code>full-screen-api.unprefix.enabled</code></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android Webkit</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}<br> - {{CompatChrome(45)}} (unprefixed)</td> - <td>{{CompatVersionUnknown}}{{property_prefix("-webkit")}}<br> - {{CompatChrome(45)}} (unprefixed)</td> - <td>{{CompatGeckoMobile("9.0")}} as <code>mozCancelFullScreen</code><sup>[1]</sup><br> - {{CompatGeckoMobile("47.0")}}<sup>[1]</sup> (behind <code>full-screen-api.unprefix.enabled</code></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] La "pile" du mode plein écran qui permet d'annuler le plein écran pour un élément et de le restaurer pour un élément précédent automatiquement, a été implémentée dans Gecko 11.0 {{geckoRelease("11.0")}}.</p> +<p>{{Compat("api.Document.exitFullscreen")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/exitpointerlock/index.html b/files/fr/web/api/document/exitpointerlock/index.html index 3337e00ae7..72a24c5f2f 100644 --- a/files/fr/web/api/document/exitpointerlock/index.html +++ b/files/fr/web/api/document/exitpointerlock/index.html @@ -39,66 +39,7 @@ translation_of: Web/API/Document/exitPointerLock <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Support simple</td> - <td>{{CompatVersionUnknown}} {{property_prefix("webkit")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}} {{property_prefix("moz")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>Prise en charge sans préfixe</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop(50)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support simple</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.exitPointerLock")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/hasfocus/index.html b/files/fr/web/api/document/hasfocus/index.html index 4b70cdaf0a..f33a56bb10 100644 --- a/files/fr/web/api/document/hasfocus/index.html +++ b/files/fr/web/api/document/hasfocus/index.html @@ -65,7 +65,7 @@ translation_of: Web/API/Document/hasFocus <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>body</span><span class="punctuation token">></span></span> <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>html</span><span class="punctuation token">></span></span></code></pre> -<h2 id="Sp.C3.A9cification" name="Sp.C3.A9cification">Spécification</h2> +<h2 id="Specifications">Spécification</h2> <table class="standard-table"> <thead> @@ -84,68 +84,12 @@ translation_of: Web/API/Document/hasFocus </tbody> </table> -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> -<p>{{ CompatibilityTable() }}</p> +<p>{{Compat("api.Document.hasFocus")}}</p> -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>30</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoDesktop("1.9") }}</td> - <td>6.0</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatGeckoMobile("1.9") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<h2 id="Voir_aussi">Voir aussi</h2> +<h2 id="See_also">Voir aussi</h2> <ul> - <li><a href="https://developer.mozilla.org/fr/docs/Web/API/Page_Visibility_API">Using the Page Visibility API</a></li> + <li><a href="/fr/docs/Web/API/Page_Visibility_API">Utilisation de l'API de visibilité des pages</a></li> </ul> - -<p> </p> - -<div class="noinclude"> </div> - -<p> </p> diff --git a/files/fr/web/api/document/head/index.html b/files/fr/web/api/document/head/index.html index 1fa6aa3fa3..9927db3f3b 100644 --- a/files/fr/web/api/document/head/index.html +++ b/files/fr/web/api/document/head/index.html @@ -8,11 +8,16 @@ tags: translation_of: Web/API/Document/head --- <h2 id="Summary" name="Summary">Résumé</h2> + <p>Retourne l'élément {{HTMLElement("head")}} du document courant. S'il y a plus d'un élément <head>, le premier est retourné.</p> + <h2 id="Syntax" name="Syntax">Syntaxe</h2> + <pre class="syntaxbox"><em>var objRef</em> = document.head; </pre> + <h2 id="Example" name="Example">Exemple</h2> + <pre class="brush: js">// en HTML: <head id="my-document-head"> var aHead = document.head; @@ -20,56 +25,46 @@ alert(aHead.id); // "my-document-head"; alert( document.head === document.querySelector("head") ); // true </pre> + <h2 id="Example" name="Example">Notes</h2> + <p><code>document.head</code> est en lecture seule. Essayer d'assigner une valeur à cettre propriété échouera en silence ou lancera une <code>TypeError</code> si le mode strict d'ECMAScript est activé dans un navigateur Gecko.</p> -<h2 id="Compatibilité">Compatibilité</h2> -<div> - {{CompatibilityTable}}</div> -<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</th> - </tr> - <tr> - <td>Basic support</td> - <td>4.0</td> - <td>{{CompatGeckoDesktop("2")}}</td> - <td>9.0</td> - <td>11.0</td> - <td>5.0</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 Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2")}}</td> - <td>9.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> - </table> -</div> -<h2 id="Specification" name="Specification">Spécification</h2> + +<h2 id="Specifications">Spécifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + <th scope="col">Commentaire</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML5.1','dom.html#dom-document-head','Document.head')}}</td> + <td>{{Spec2('HTML5.1')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C','dom.html#dom-document-head','Document.head')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName('HTML WHATWG','dom.html#dom-document-head','Document.head')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> + +<p>{{Compat("api.Document.head")}}</p> + +<h2 id="See_also">Voir aussi</h2> + <ul> - <li><a href="http://www.w3.org/TR/html5/dom.html#dom-tree-accessors" title="http://www.w3.org/TR/html5/dom.html#dom-document-head">HTML5: DOM Tree Accessors</a></li> + <li>{{domxref("document.body")}}</li> </ul> diff --git a/files/fr/web/api/document/location/index.html b/files/fr/web/api/document/location/index.html index afd9341feb..932929b720 100644 --- a/files/fr/web/api/document/location/index.html +++ b/files/fr/web/api/document/location/index.html @@ -55,53 +55,7 @@ document.location = 'http://www.mozilla.org' // équivalent à document.location <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonction</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support de base</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonction</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support de base</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.location")}}</p> <h2 id="Voir_également">Voir également</h2> diff --git a/files/fr/web/api/document/onfullscreenchange/index.html b/files/fr/web/api/document/onfullscreenchange/index.html index 2736f848e7..a3251b0188 100644 --- a/files/fr/web/api/document/onfullscreenchange/index.html +++ b/files/fr/web/api/document/onfullscreenchange/index.html @@ -42,61 +42,7 @@ document.documentElement.onclick = function () { <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support basic</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("47")}}<sup>[1] </sup> (behind <code>full-screen-api.unprefix.enabled</code></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Support basique</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("47")}}<sup> [1]</sup> (behind <code>full-screen-api.unprefix.enabled</code></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Depuis Firefox 49, c'était techniquement sur {{domxref("GlobalEventHandlers")}}, mais certains gestionnaires d'événements n'étaient jamais appelés lorsqu'un {{domxref("Element")}} était défini.</p> +<p>{{Compat("api.Document.onfullscreenchange")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/open/index.html b/files/fr/web/api/document/open/index.html index a4b16f90e4..bb5aba9bc3 100644 --- a/files/fr/web/api/document/open/index.html +++ b/files/fr/web/api/document/open/index.html @@ -40,79 +40,37 @@ document.open(); <p>Si vous ne voulez pas créer une entrée d'historique, remplacez <code>open()</code> par <code>open("text/html", "replace")</code>.</p> -<h2 id="Sp.C3.A9cification" name="Sp.C3.A9cification">Spécifications</h2> +<h2 id="Specifications">Spécifications</h2> <table class="standard-table"> - <tbody> - <tr> - <th scope="col">Spécification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName("DOM2 HTML", "html.html#ID-72161170", "document.open()")}}</td> - <td>{{Spec2("DOM2 HTML")}}</td> - <td>Définition initiale.</td> - </tr> - </tbody> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName("HTML WHATWG", "#dom-document-open", "document.open()")}}</td> + <td>{{Spec2("HTML WHATWG")}}</td> + <td></td> + </tr> + <tr> + <td>{{SpecName("DOM2 HTML", "html.html#ID-72161170", "document.open()")}}</td> + <td>{{Spec2("DOM2 HTML")}}</td> + <td>Définition initiale.</td> + </tr> + </tbody> </table> -<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> - -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</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>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> -<h2 id="Notes_propres_à_Gecko">Notes propres à Gecko</h2> +<p>{{Compat("api.Document.open")}}</p> -<p><span id="result_box" lang="fr"><span>À partir de Gecko 1.9, cette méthode est soumise à la même règle d'origine que les autres propriétés et ne fonctionne pas si cela change l'origine du document.</span></span></p> +<h2 id="See_also">Voir aussi</h2> -<p><span id="result_box" lang="fr"><span>À partir de Gecko 1.9.2, <code>document.open()</code> utilise le <a href="https://developer.mozilla.org/fr/docs/Mozilla/Gecko/Script_security#Security_checks">principal</a> du document dont il utilise l'URI, au lieu de récupérer le principal hors de la pile.</span> <span>Par conséquent, vous ne pouvez plus appeler {{domxref ("document.write ()")}} dans un document non approuvé à partir de chrome, même en utilisant <code><a href="https://developer.mozilla.org/fr/docs/wrappedJSObject">wrappedJSObject</a></code>.</span></span></p> +<ul> + <li>{{domxref("Document")}}</li> + <li>{{domxref("Window.open()")}}</li> +</ul> diff --git a/files/fr/web/api/document/origin/index.html b/files/fr/web/api/document/origin/index.html index 54fed5b8e3..646f4e1242 100644 --- a/files/fr/web/api/document/origin/index.html +++ b/files/fr/web/api/document/origin/index.html @@ -49,55 +49,7 @@ var origin = document.origin; <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(41)}}</td> - <td>{{CompatNo}} {{bug(931884)}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +<div>{{Compat("api.Document.origin")}}</div> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/querycommandstate/index.html b/files/fr/web/api/document/querycommandstate/index.html index 7875db98fb..ee8af716d0 100644 --- a/files/fr/web/api/document/querycommandstate/index.html +++ b/files/fr/web/api/document/querycommandstate/index.html @@ -37,59 +37,7 @@ translation_of: Web/API/Document/queryCommandState <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +<p>{{Compat("api.Document.queryCommandState")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/querycommandsupported/index.html b/files/fr/web/api/document/querycommandsupported/index.html index a46e4374d5..986cbd52e3 100644 --- a/files/fr/web/api/document/querycommandsupported/index.html +++ b/files/fr/web/api/document/querycommandsupported/index.html @@ -63,59 +63,7 @@ if(flg) { <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>17</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("9.0")}}<sup>[1]</sup></td> - <td>4.0</td> - <td>{{CompatUnknown}}</td> - <td>6.1.6</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("9.0")}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Avant Firefox 41, pour la commande <code>'paste'</code> (<em>coller</em>), Firefox renvoyait incorrectement <code>true</code> (<em>vrai</em>) quand la fonctionnalité coller était disponible même si le script appelant avait des privilèges insuffisants pour réaliser l'action.</p> +<p>{{Compat("api.Document.queryCommandSupported")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/queryselector/index.html b/files/fr/web/api/document/queryselector/index.html index b466aaad25..4d25c91d2b 100644 --- a/files/fr/web/api/document/queryselector/index.html +++ b/files/fr/web/api/document/queryselector/index.html @@ -111,61 +111,9 @@ translation_of: Web/API/Document/querySelector </tbody> </table> -<h2 id="Browser_Compatibility" name="Browser_Compatibility">Compatibilité des navigateurs</h2> +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable()}}</p> - -<div id="compat-desktop"> -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Support de base</td> - <td>1</td> - <td>{{CompatVersionUnknown}}</td> - <td>3.5</td> - <td>8</td> - <td>10</td> - <td>3.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>machin</td> - <td>2.1</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9</td> - <td>10.0</td> - <td>3.2</td> - </tr> - </tbody> -</table> -</div> -</div> +<div>{{Compat("api.Document.querySelector")}}</div> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/queryselectorall/index.html b/files/fr/web/api/document/queryselectorall/index.html index b9c36f07e7..6347a584c8 100644 --- a/files/fr/web/api/document/queryselectorall/index.html +++ b/files/fr/web/api/document/queryselectorall/index.html @@ -19,14 +19,14 @@ translation_of: Web/API/Document/querySelectorAll <h2 id="Syntax" name="Syntax">Syntaxe</h2> -<pre class="brush: js">elements = document.querySelectorAll(selecteurs); +<pre class="brush: js"><var>elementList</var> = <em>parentNode</em>.querySelectorAll(<var>selectors</var>); </pre> <h3 id="Paramètres">Paramètres</h3> <dl> <dt><code>selecteurs</code></dt> - <dd>une {{domxref("DOMString")}} (<em>chaîne de caractères</em>) qui contient un ou plusieurs <a href="https://developer.mozilla.org/fr/docs/Web/CSS/S%C3%A9lecteurs_CSS">sélecteurs CSS</a> ; s'il n'y en a pas, une exception <code>SyntaxError</code> est lancée. Voir <a href="https://developer.mozilla.org/fr/docs/Web/API/Document_Object_Model/Localisation_des_%C3%A9l%C3%A9ments_DOM_avec_les_s%C3%A9lecteurs">localisation des éléments DOM avec les sélecteurs</a> pour plus d'informations sur l'utilisation des sélecteurs en vue d'identifier les éléments. Plusieurs sélecteurs peuvent être spécifiés, séparés par une virgule.</dd> + <dd>une {{domxref("DOMString")}} (<em>chaîne de caractères</em>) qui contient un ou plusieurs <a href="/fr/docs/Web/CSS/CSS_Selectors">sélecteurs CSS</a> ; s'il n'y en a pas, une exception <code>SyntaxError</code> est lancée. Voir <a href="/fr/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors">localisation des éléments DOM avec les sélecteurs</a> pour plus d'informations sur l'utilisation des sélecteurs en vue d'identifier les éléments. Plusieurs sélecteurs peuvent être spécifiés, séparés par une virgule.</dd> </dl> <div class="note"> @@ -38,7 +38,7 @@ translation_of: Web/API/Document/querySelectorAll <p>Une {{domxref("NodeList")}} statique contenant un objet {{domxref("Element")}} pour chaque élément qui correspond à au-moins un des sélecteurs spécifiés ou une {{domxref("NodeList")}} vide si aucune correspondance n'est trouvée .</p> <div class="note"> -<p><strong>Note : </strong> si les <code><em>selectors</em></code> spécifiés contiennent un <a href="https://developer.mozilla.org/fr/docs/Web/CSS/Pseudo-elements">pseudo-element CSS</a>, la liste retournée sera toujours vide.</p> +<p><strong>Note : </strong> si les <code><em>selectors</em></code> spécifiés contiennent un <a href="/fr/docs/Web/CSS/Pseudo-elements">pseudo-element CSS</a>, la liste retournée sera toujours vide.</p> </div> <h3 id="Exceptions">Exceptions</h3> @@ -52,26 +52,26 @@ translation_of: Web/API/Document/querySelectorAll <p>Pour obtenir une {{domxref("NodeList")}} (<em>liste de noeuds</em>) de tous les éléments {{HTMLElement("p")}} dans le document :</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> matches <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">"p"</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +<pre class="brush: js">const matches = document.querySelectorAll("p");</pre> <p>Cet exemple renvoie la liste de tous les éléments <code>div</code> du <code>document</code> dont l'attribut de classe a pour valeur "<code>note</code>" ou "<code>alert</code>" :</p> -<pre class="brush: js">var matches = document.querySelectorAll("div.note, div.alert"); +<pre class="brush: js">const matches = document.querySelectorAll("div.note, div.alert"); </pre> <p>Ici, nous obtenons une liste des éléments <code><p></code> dont l'élément parent immédiat est un {{domxref("div")}} avec la classe <code>"highlighted"</code> et qui sont situés dans un conteneur dont l'identifiant est <code>"test"</code>.</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> container <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelector</span><span class="punctuation token">(</span><span class="string token">"#test"</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="keyword token">var</span> matches <span class="operator token">=</span> container<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">"div.highlighted > p"</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +<pre class="brush: js">const container = document.querySelector("#test"); +const matches = container.querySelectorAll("div.highlighted > p");</pre> <p>Cet exemple utilise un <a href="https://developer.mozilla.org/fr/docs/Web/CSS/S%C3%A9lecteurs_d_attribut">sélecteur d'attribut</a> pour renvoyer une liste d'éléments {{domxref("iframe")}} dans le document qui contient un attribut nommé <code>"data-src"</code> :</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> matches <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">"iframe[data-src]"</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +<pre class="brush: js">const matches = document.querySelectorAll("iframe[data-src]");</pre> <p>Ici, un sélecteur d'attribut est utilisé pour renvoyer une liste d'éléments de liste contenus dans une liste dont l'identifiant est <code>"userlist"</code> lequel a un attribut <code>"data-active"</code> dont la valeur est <code>"1"</code>:</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> container <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelector</span><span class="punctuation token">(</span><span class="string token">"#userlist"</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="keyword token">var</span> matches <span class="operator token">=</span> container<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">"li[data-active=1]"</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +<pre class="brush: js">const container = document.querySelector("#userlist"); +const matches = container.querySelectorAll("li[data-active='1']");</pre> <h3 id="Accès_aux_correspondances">Accès aux correspondances</h3> @@ -79,11 +79,11 @@ translation_of: Web/API/Document/querySelectorAll <p>Sinon, vous pouvez simplement utiliser la notation de tableau standard pour accéder au contenu de la liste. Vous pouvez utiliser n'importe quelle instruction de boucle commune, telle que :</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> highlightedItems <span class="operator token">=</span> userList<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">".highlighted"</span><span class="punctuation token">)</span><span class="punctuation token">;</span> +<pre class="brush: js">const highlightedItems = userList.querySelectorAll(".highlighted"); -highlightedItems<span class="punctuation token">.</span><span class="function token">forEach</span><span class="punctuation token">(</span><span class="keyword token">function</span><span class="punctuation token">(</span>userItem<span class="punctuation token">)</span> <span class="punctuation token">{</span> - <span class="function token">deleteUser</span><span class="punctuation token">(</span>userItem<span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="punctuation token">}</span><span class="punctuation token">)</span><span class="punctuation token">;</span></code></pre> +highlightedItems.forEach(function(userItem) { + deleteUser(userItem); +});</pre> <h2 id="Notes" name="Notes">Notes d'utilisation</h2> @@ -93,26 +93,26 @@ highlightedItems<span class="punctuation token">.</span><span class="function to <p>Considérez ce HTML, avec ses trois blocs {{HTMLElement("div")}} imbriqués.</p> -<pre class="brush: html line-numbers language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>div</span> <span class="attr-name token">class</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>outer<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>div</span> <span class="attr-name token">class</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>select<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>div</span> <span class="attr-name token">class</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>inner<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>div</span><span class="punctuation token">></span></span> - <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>div</span><span class="punctuation token">></span></span> -<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>div</span><span class="punctuation token">></span></span></code></pre> +<pre class="brush: html"><div class="outer"> + <div class="select"> + <div class="inner"> + </div> + </div> +</div></pre> <h3 id="JavaScript">JavaScript</h3> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> select <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelector</span><span class="punctuation token">(</span><span class="string token">'.select'</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="keyword token">var</span> inner <span class="operator token">=</span> select<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">'.outer .inner'</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -inner<span class="punctuation token">.</span>length<span class="punctuation token">;</span> <span class="comment token">// 1, pas 0!</span></code></pre> +<pre class="brush: js">const select = document.querySelector('.select'); +const inner = select.querySelectorAll('.outer .inner'); +inner.length; // 1, not 0!</pre> <p>Dans cet exemple, lors de la sélection de <code>".outer .inner"</code> dans le contexte, le <code><div></code> avec la classe <code>"select"</code>, l'élément avec la classe <code>".inner"</code> est toujours trouvé, même si <code>.outer</code> n'est pas un descendant de l'élément de base sur lequel la recherche <code>(".select")</code> est effectuée. Par défaut, <code>querySelectorAll()</code> vérifie uniquement que le dernier élément du sélecteur se trouve dans la portée de la recherche.</p> <p>La pseudo-classe {{cssxref (":scope")}} restaure le comportement attendu, ne faisant correspondre les sélecteurs que sur les descendants de l'élément de base :</p> -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">var</span> select <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">querySelector</span><span class="punctuation token">(</span><span class="string token">'.select'</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -<span class="keyword token">var</span> inner <span class="operator token">=</span> select<span class="punctuation token">.</span><span class="function token">querySelectorAll</span><span class="punctuation token">(</span><span class="string token">':scope .outer .inner'</span><span class="punctuation token">)</span><span class="punctuation token">;</span> -inner<span class="punctuation token">.</span>length<span class="punctuation token">;</span> <span class="comment token">// 0</span></code></pre> +<pre class="brush: js">const select = document.querySelector('.select'); +const inner = select.querySelectorAll(':scope .outer .inner'); +inner.length; // 0</pre> <h2 id="Spécification">Spécification</h2> @@ -148,85 +148,17 @@ inner<span class="punctuation token">.</span>length<span class="punctuation toke <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<div>{{CompatibilityTable}}</div> - -<div id="compat-desktop"> -<div id="compat-desktop"> -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</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>1</td> - <td>{{CompatGeckoDesktop("1.9.1")}}</td> - <td>8</td> - <td>10</td> - <td>3.2 (525.3)</td> - </tr> - <tr> - <td><code>:scope</code> pseudo-class</td> - <td>{{ CompatVersionUnknown }}</td> - <td>32</td> - <td>{{CompatNo}}</td> - <td>15<sup>[1]</sup></td> - <td>7.0</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</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>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("1.9.1")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td><code>:scope</code> pseudo-class</td> - <td>{{ CompatUnknown }}</td> - <td>32</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>7.0</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Pris en charge dans Opera 15+ en activant les marques "<strong>Enable <style scoped></strong>" ou "<strong>Enable experimental Web Platform features</strong>" dans <code>chrome://flags</code>.</p> -</div> +<p>{{Compat("api.Document.querySelectorAll")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> -</div> <ul> - <li><a href="https://developer.mozilla.org/fr/docs/Web/API/Document_Object_Model/Localisation_des_%C3%A9l%C3%A9ments_DOM_avec_les_s%C3%A9lecteurs">Localisation des éléments DOM avec les sélecteurs</a></li> - <li><a href="https://developer.mozilla.org/fr/docs/Web/CSS/S%C3%A9lecteurs_d_attribut">Sélecteurs d'attribut</a> dans le guide CSS</li> - <li><a href="https://developer.mozilla.org/fr/docs/Learn/CSS/Introduction_to_CSS/Attribute_selectors">Sélecteurs d'attribut</a> dans la zone d'apprentissage de MDN</li> + <li><a href="/fr/docs/Web/API/Document_object_model/Locating_DOM_elements_using_selectors">Localisation des éléments DOM avec les sélecteurs</a></li> + <li><a href="/fr/docs/Web/CSS/Attribute_selectors">Sélecteurs d'attribut</a> dans le guide CSS</li> + <li><a href="/fr/docs/Learn/CSS/Introduction_to_CSS/Attribute_selectors">Sélecteurs d'attribut</a> dans la zone d'apprentissage de MDN</li> <li>{{domxref("Element.querySelectorAll")}} et {{domxref("Element.querySelectorAll()")}}</li> <li>{{domxref("document.querySelector")}}</li> <li>{{domxref("DocumentFragment.querySelector()")}} et {{domxref("DocumentFragment.querySelectorAll()")}}</li> <li>{{domxref("ParentNode.querySelector()")}} et {{domxref("ParentNode.querySelectorAll()")}}</li> - <li><a href="/en-US/docs/Code_snippets/QuerySelector">Extraits de code pour <code>querySelector</code></a></li> + <li><a href="/fr/docs/Code_snippets/QuerySelector">Extraits de code pour <code>querySelector</code></a></li> </ul> diff --git a/files/fr/web/api/document/registerelement/index.html b/files/fr/web/api/document/registerelement/index.html index 8f937a8180..352cc8b6e9 100644 --- a/files/fr/web/api/document/registerelement/index.html +++ b/files/fr/web/api/document/registerelement/index.html @@ -58,55 +58,7 @@ montag.textContent = "Je suis un élément mon-tag."; <h2 id="Compatibilité_avec_les_navigateurs">Compatibilité avec les navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>35</td> - <td>31<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>25</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>4.4.4</td> - <td>31<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>25</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Cette API est implantée mais doit être activée dans les préférences.</p> +<p>{{Compat("api.Document.registerElement")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/scripts/index.html b/files/fr/web/api/document/scripts/index.html index 1e7fe75f40..e6b957e69d 100644 --- a/files/fr/web/api/document/scripts/index.html +++ b/files/fr/web/api/document/scripts/index.html @@ -1,72 +1,55 @@ --- title: Document.scripts slug: Web/API/Document/scripts +tags: + - API + - Document + - HTML DOM + - Property + - Reference translation_of: Web/API/Document/scripts --- -<div> - {{ApiRef}}</div> -<h2 id="Summary" name="Summary"> </h2> -<p>Retourne une liste des scripts (éléments {{HTMLElement("script")}}) présents dans le document. L'objet retourné est une liste du type {{domxref("HTMLCollection")}}.</p> -<h2 id="Syntax" name="Syntax">Syntaxe</h2> -<pre class="syntaxbox"><code>var <em>scriptList</em></code> = document.scripts; +<div>{{ApiRef}}</div> + +<p class="summary">Retourne une liste des scripts (éléments {{HTMLElement("script")}}) présents dans le document. L'objet retourné est une liste du type {{domxref("HTMLCollection")}}.</p> + +<h2 id="Syntax">Syntaxe</h2> + +<pre class="brush: js">var <var>scriptList</var> = document.scripts; </pre> + <p>La liste <code>scriptList</code> est un objet {{domxref("HTMLCollection")}} qu'on peut utiliser comme un tableau pour accéder aux éléments qu'elle contient.</p> -<h2 id="Exemple">Exemple</h2> + +<h2 id="Example">Exemple</h2> + <p>Cet exemple détecte la présence d'éléments {{HTMLElement("script")}} dans le document.</p> + <pre class="brush:js">var scripts = document.scripts; if (scripts.length) { alert("This page has scripts!"); } </pre> -<h2 id="Specification" name="Specification">Browser compatibility</h2> -<div> - {{CompatibilityTable}}</div> -<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</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("9.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> - </table> -</div> -<div id="compat-mobile"> - <table class="compat-table"> + +<h2 id="Specifications">Spécifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Spécification</th> + <th scope="col">Statut</th> + <th scope="col">Commentaire</th> + </tr> + </thead> <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("9.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> + <tr> + <td>{{SpecName('HTML WHATWG', '#dom-document-scripts', 'Document.scripts')}}</td> + <td>{{ Spec2('HTML WHATWG') }}</td> + <td></td> + </tr> </tbody> - </table> -</div> -<h2 id="Specification" name="Specification">Specification</h2> -<ul> - <li>{{spec("http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-scripts", "DOM: document scripts")}}</li> -</ul> +</table> + +<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> + +<div>{{Compat("api.Document.scripts")}}</div> diff --git a/files/fr/web/api/document/touchend_event/index.html b/files/fr/web/api/document/touchend_event/index.html index f7067637ab..f31ff40c44 100644 --- a/files/fr/web/api/document/touchend_event/index.html +++ b/files/fr/web/api/document/touchend_event/index.html @@ -114,68 +114,7 @@ translation_of: Web/API/Document/touchend_event <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome("22.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("18.0")}}<sup>[1]</sup><br> - {{CompatGeckoDesktop("52.0")}}<sup>[2]</sup></td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</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>Android Webview</th> - <th>Chrome for Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("6.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>11</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Les Touch events ont été implémentés dans Gecko 18.0, mais ont été supprimés dans la version 24.0 {{geckoRelease("24.0")}} dans la version bureau en raison de problèmes d'incompatibilités ({{bug(888304)}}).</p> - -<p>[2] Depuis 52.0, le support des Touch events a été réparé et réactivé dans les versions bureau de Windows.</p> +<p>{{Compat("api.Document.touchend_event")}}</p> <h2 id="Voir_aussi">Voir aussi</h2> diff --git a/files/fr/web/api/document/visibilitystate/index.html b/files/fr/web/api/document/visibilitystate/index.html index 4f8c7ec071..2ff5dcc883 100644 --- a/files/fr/web/api/document/visibilitystate/index.html +++ b/files/fr/web/api/document/visibilitystate/index.html @@ -54,70 +54,4 @@ translation_of: Web/API/Document/visibilityState <h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</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>13 {{property_prefix("webkit")}}<br> - 33</td> - <td>{{CompatGeckoDesktop(18)}} [2]</td> - <td>10</td> - <td>12.10[1]</td> - <td>7</td> - </tr> - <tr> - <td><code>prerender</code></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop(49)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Fonctionnalité</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>4.4 {{property_prefix("webkit")}}</td> - <td>{{CompatGeckoMobile(18)}} [2]</td> - <td>{{CompatUnknown}}</td> - <td>12.10[1]</td> - <td>7</td> - </tr> - <tr> - <td><code>prerender</code></td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile(49)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Ne lance pas l'évènement {{event('visibilitychange')}} lorsque la fenêtre du navigateur est réduite, ni si <code>hidden</code> est défini à <code>true</code>.</p> - -<p>[2] De Firefox 10 à Firefox 51 inclus, cette propriété peut être utilisée avec le préfixe <code>-moz-</code>.</p> +<p>{{Compat("api.Document.visibilityState")}}</p> |