@blakeyrat said:
Ok, let's say for the sake of argument, that I'm a responsible programmer. And I find out that this thing that looks like an array, and that I've already treated as an array with no problems, doesn't have a .push() method. So I decide to look up what methods it does have.
You're all saying that it's a complete non-WTF that there's ZERO documentation ANYWHERE that says that a dispHTMLElementCollection is the same thing as a NodeList?
Well, if you'd looked up the documentation for getElementsByTagName, you would have seen it returns a NodeList, and wouldn't have been looking for docs based on the name of one particular browser's implementing class. Not looking up the method documentation in the first place is a WTF, but it's not Microsoft's WTF, nor is it the W3C's wtf. In case you had trouble finding it, the documentation is here. And here. Microsoft's unfortunately just calls it a "collection", but that's neither "array" nor any clue where you got the name dispHTMLElementCollection.
That there's ZERO documentation ANYWHERE that tells me what member functions dispHTMLElementCollection does happen to contain? (Unless I've somehow used my psychic powers to find out the above.) You're all saying that it's perfectly acceptable for both IE and Mozilla to have a class used by their browser with zero documentation at all?
Ok, maybe I am a shitty programmer, I accept that. (I don't use libraries like prototype.js, because our JS is served to external clients, it has to be as small as possible. And since it doesn't make many, if any, DHTML manipulations, a library like prototype.js would be completely wasted.)
But none of you think it wouldn't be a better world if Mozilla and Microsoft just put a page up that said, "Oh BTW this thing is a DOM NodeList, here's a link."?
Bah.
Mozilla's isn't even called a dispHTMLElementCollection - it's called an HTMLCollection. Which is documented here.