aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/treewalker/previoussibling
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/web/api/treewalker/previoussibling
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/web/api/treewalker/previoussibling')
-rw-r--r--files/fr/web/api/treewalker/previoussibling/index.html113
1 files changed, 113 insertions, 0 deletions
diff --git a/files/fr/web/api/treewalker/previoussibling/index.html b/files/fr/web/api/treewalker/previoussibling/index.html
new file mode 100644
index 0000000000..69b99d3c6d
--- /dev/null
+++ b/files/fr/web/api/treewalker/previoussibling/index.html
@@ -0,0 +1,113 @@
+---
+title: TreeWalker.previousSibling()
+slug: Web/API/TreeWalker/previousSibling
+tags:
+ - API
+ - Arborescence
+ - DOM
+ - Méthodes
+ - Noeuds
+translation_of: Web/API/TreeWalker/previousSibling
+---
+<p>{{ APIRef("DOM") }}</p>
+
+<p>La méthode <strong><code>TreeWalker.previousSibling()</code></strong> déplace le {{domxref("Node")}} courant vers son frère précédent, le cas échéant, et renvoie le frère trouvé. S'il n'y en a pas, elle renvoie <code>null</code> et le noeud actuel est inchangé.</p>
+
+<h2 id="Syntax" name="Syntax">Syntaxe</h2>
+
+<pre class="syntaxbox"><em>node</em> = <em>treeWalker</em>.previousSibling();
+</pre>
+
+<h2 id="Example" name="Example">Exemple</h2>
+
+<pre class="brush: js">var treeWalker = document.createTreeWalker(
+ document.body,
+ NodeFilter.SHOW_ELEMENT,
+ { acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
+ false
+);
+var node = treeWalker.previousSibling(); // renvoie null car il n'y a pas de frère précédent
+
+</pre>
+
+<h2 id="Specification" name="Specification">Spécifications</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM WHATWG', '#dom-treewalker-previoussibling', 'TreeWalker.previousSibling')}}</td>
+ <td>{{Spec2('DOM WHATWG')}}</td>
+ <td>Pas de changement de {{SpecName('DOM2 Traversal_Range')}}</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 Traversal_Range', 'traversal.html#Traversal-TreeWalker-previousSibling', 'TreeWalker.previousSibling')}}</td>
+ <td>{{Spec2('DOM2 Traversal_Range')}}</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</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>
+ </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>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li>L'interface {{domxref("TreeWalker")}} à laquelle elle appartient.</li>
+</ul>