Cette traduction est incomplète. Aidez à traduire cet article depuis l'anglais.
La propriété ParentNode.childElementCount en lecture seule renvoie un unsigned long représentant le nombre d'élèments fils de l'élèment donné.
Cette propriété a été définies dans la pure interface ElementTraversal.
Aussi cette interface contient deux differents jeux de propriété, l'une visant a Node laquelle a des enfants...
var elCount = elementNodeReference.childElementCount;
Spécification
| Spécification | Status | Comment |
|---|---|---|
| DOM La définition de 'ParentNode.childElementCount' dans cette spécification. |
Standard évolutif | Splitted the ElementTraversal interface in ChildNode and ParentNode. This method is now defined on the latter.The Document and DocumentFragment implemented the new interfaces. |
| Element Traversal Specification La définition de 'ElementTraversal.childElementCount' dans cette spécification. |
Recommendation | Added its initial definition to the ElementTraversal pure interface and use it on Element. |
Compatibilité des navigateur
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
Basic support (on Element) |
1.0 | 3.5 (1.9.1) | 9.0 [1] | 10.0 | 4.0 |
Support on Document and DocumentFragment |
29.0 | 25.0 (25.0) | Pas de support | 16.0 | Pas de support |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
Basic support (on Element) |
(Oui) | 1.0 (1.9.1) | (Oui) | (Oui) | (Oui) |
Support on Document and DocumentFragment |
(Oui) | 25.0 (25.0) | Pas de support | 16.0 | Pas de support |
[1] Internet Explorer 6, 7 and 8 supported it, but erroneously counts Comment nodes.
Voir aussi
- Les interfaces pures
ParentNodeetChildNode.

