Skip to main content Accessibility Feedback

Traversing the DOM

Element.childNodes

Get the immediate descendants of an element, including text fragments and other non-element nodes.

var elem = document.querySelector('#some-elem');
var descendants = wrapper.childNodes;

Works back to at least IE6.