The DOM NodeList (as returned e.g. by element.getElementsByTagName) is an interesting object, in that it is not a snapshot, but reflects changes to the document made after you have created the NodeList.
I was wondering how one would implement such a collection: Completely lazy evaluation must be horribly slow, but keeping a cached version consistent requires a lot of book-keeping internally.
I tried to google for blog articles on the subject, and also tried to find the relevant source code files for Mozilla, but could not find anything immediately (and when I cannot find something immediately, I come here...).
So how do Firefox, Safari, Internet Explorer (and other non-browser DOM implementations) handle NodeLists?