.childNodes
NodeList Node.childNodes
A property holding the child nodes of an element, including text nodes. This property is read-only - it cannot be set.
let children = node.childNodes;
See also: .children
Example
HTML:
<p>
All
<strong>large</strong>
goats
<em>are</em>
delicious!
</p>
JavaScript:
let childNodes = document.query("p").childNodes;
Result is a NodeList of length five, consisting of the text node "all"
, the element <strong>large</strong>
, the text node "goats"
, the element <em>are</em>
, and the text node "delicious"
.