La propriété en lecture seule NodeIterator.root
représente le Node
qui est la racine de ce que le NodeIterator
traverse.
Syntaxe
root = nodeIterator.root;
Exemple
var nodeIterator = document.createNodeIterator(
document.body,
NodeFilter.SHOW_ELEMENT,
{ acceptNode: function(node) { return NodeFilter.FILTER_ACCEPT; } },
false
);
root = nodeIterator.root; // document.body dans ce cas
Spécifications
Spécification | Statut | Commentaire |
---|---|---|
DOM La définition de 'NodeIterator.root' dans cette spécification. |
Standard évolutif | Pas de changement de Document Object Model (DOM) Level 2 Traversal and Range Specification. |
Document Object Model (DOM) Level 2 Traversal and Range Specification La définition de 'NodeIterator.root' dans cette spécification. |
Obsolete | Définition initiale. |
Compatibilité des navigateurs
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Voir aussi
- L'interface à laquelle elle appartient :
NodeIterator
.