Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

11
  • 2
    @user1032531: Well, if you make any change to one of the selected DOM elements (e.g. adding a child), then you will of course see the change since it's one and the same DOM element. But, assuming you selected all td elements, adding a new td element later on will not update the selection automatically to contain the new element. Commented Apr 2, 2013 at 12:18
  • 2
    @FelixKling: You should mention that not all NodeLists are live.
    – Bergi
    Commented Apr 2, 2013 at 12:27
  • 4
    I wish they were all arrays Commented Mar 26, 2015 at 15:43
  • 9
    It seems also that methods "keys", "entries" and "forEach" i present in NodeList, but missing in HTMLCollection Commented Aug 12, 2016 at 14:10
  • 2
    @KrzysztofGrzybek That's right and it's super annoying. Why the heck one of them has .forEach() and the other doesn't?
    – Robo Robok
    Commented Mar 24, 2018 at 10:44