DEV Community

Discussion on: Difference between HTMLCollection and NodeList

Collapse
 
kabirsumn profile image
kabirsumn

I have a confusion here. is it a necessity that every Nodelist must be static? (sorry for my English)

Collapse
 
janezkos profile image
janezkos

"NodeLists behave differently depending on how you access them; if you access elements using childNodes, the returned list is live and will update as more elements are added to the node. If it’s accessed using querySelectorAll(), the returned list is static and will not update if more elements are added to the node."
medium.com/@layne_celeste/htmlcoll...