Most node lists in the DOM (for example, returned from getElementsBy*, querySelectorAlland Node.childNodes) are not simple arrays, but rather NodeListobjects. NodeListobjects usually live because changes to the document automatically propagate to the object NodeList. (An exception is a result querySelectorAllthat is not alive!)
, , NodeList a, a , a NodeList.
NodeList . , :
var NodeListA = document.getElementsByTagName('a');
for (var i=0; i<NodeListA.length; ++i) {
NodeListA[i].parentNode.removeChild(NodeListA[i]);
}
, ! NodeList, NodeList ( ), .
NodeLists Mozilla MDC.