+ 1
What is meaning of childnode?
related to DOM
2 ответов
+ 2
The Node.childNodes read-only property returns a live collection of child nodes of the given element where the first child node is assigned index 0. childNodes includes all child nodes, including non-element nodes like text and comment nodes.
extracted from https://cheeze.club/6q64
0
The childNodes property returns a collection of a node's child nodes, as a NodeList object.
The nodes in the collection are sorted as they appear in the source code and can be accessed by index numbers. The index starts at 0.
Note: Whitespace inside elements is considered as text, and text is considered as nodes. Comments are also considered as nodes.