aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/treewalker/currentnode/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/treewalker/currentnode/index.html')
-rw-r--r--files/fr/web/api/treewalker/currentnode/index.html113
1 files changed, 113 insertions, 0 deletions
diff --git a/files/fr/web/api/treewalker/currentnode/index.html b/files/fr/web/api/treewalker/currentnode/index.html
new file mode 100644
index 0000000000..a560d8b7db
--- /dev/null
+++ b/files/fr/web/api/treewalker/currentnode/index.html
@@ -0,0 +1,113 @@
+---
+title: TreeWalker.currentNode
+slug: Web/API/TreeWalker/currentNode
+tags:
+ - API
+ - Arborescence
+ - DOM
+ - Noeuds
+ - Propriété
+translation_of: Web/API/TreeWalker/currentNode
+---
+<p>{{ APIRef("DOM") }}</p>
+
+<p>La propriété <code><strong>TreeWalker.currentNode</strong></code> représente le {{domxref("Node")}} (<em>noeud</em>) sur lequel le {{domxref("TreeWalker")}} est actuellement pointé.</p>
+
+<h2 id="Syntax" name="Syntax">Syntaxe</h2>
+
+<pre class="syntaxbox"><em>node</em> = <em>treeWalker</em>.currentNode;
+<code><em>treeWalker</em></code>.currentNode = <em>node</em>;
+</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
+);
+root = treeWalker.currentNode; // l'élément racine car c'est le premier élément!
+</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-currentnode', 'TreeWalker.currrentNode')}}</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-currentNode', 'TreeWalker.currentNode')}}</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")}}.</li>
+</ul>