Message from JavaScript discussions

November 2017

— Right, I never keep arrays of nodes in memory over longer periods of time anyway

— 

Usually if I need a nodelist / collection / array I'll map it to something and throwaway the original instantly

— Heh, I had to check MDN:

var item = myNodeList[i];  // Calling myNodeList.item(i) isn't necessary in JavaScript

Message permanent page

— How about that

— I think it's because I read the DOM Core spec for a NodeList... whereas this looks like an extension from ECMA spec

Message permanent page

— Hmm, yes, it's in WHATWG and not DOM Core, no wonder I missed it

— 

interface NodeList {
getter Node? item(unsigned long index);

— There it is, plain as day XD

— I really hate WHATWG though because it can be specific like that sometimes, but other times you get weirdly vague stuff

Message permanent page

— Like this

— 

The appendChild(node) method, when invoked, must return the result of appending node to context object.

Message permanent page

— And thus we have some janky return values sometimes... MDN had no information whatsoever on that until I added it

Message permanent page