querySelectorAll() the best JavaScript function in the world!

Can querySelectorAll() return a live or static NodeList?

1 answer

  1. querySelectorAll() returns a static NodeList, not a live NodeList. A static NodeList is a snapshot of the elements at the time the NodeList was created and does not automatically update if the DOM changes. A live NodeList, on the other hand, automatically updates whenever elements are added or removed from the DOM.

Related Questions