12

I tried my Google-fu but I can't seem to find any good answer to that question. Please help.

EDIT: Ok so I found this blog post. So they come from different DOM levels, but besides that it doesn't say much...

c00kiemonster
  • 20,805
  • 33
  • 89
  • 129

1 Answers1

8

As you said, NodeList is defined in DOM-Level-3-Core and HTMLCollection in DOM-Level-2-HTML.

Their interfaces are :

interface HTMLCollection {
  readonly attribute unsigned long   length;
  Node               item(in unsigned long index);
  Node               namedItem(in DOMString name);
};

interface NodeList {
  Node               item(in unsigned long index);
  readonly attribute unsigned long   length;
};

So NodeList is a successor of HTMLCollection in a more generic form (for xml).

voondo
  • 2,462
  • 1
  • 15
  • 19
  • 1
    http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75708506 and http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177 – voondo May 01 '13 at 08:07