@blakeyrat said:
Can you imagine the outcry if there were an undocumented publically-accessible class in the .net framework? Or in the Win32 API?The thing is, that dispHTMLSomethingOrWhatever class isn't really "public" in the usual sense of the word — it's Microsoft's private implementation of the public NodeList interface. The .getElementsByTagName method is defined to return a NodeList. NodeList is an interface. A particular vendor's implementation of that method is completely free to return you an orange, as long as the orange implements the standard NodeList interface. Heck, it could return a different kind of object every time you call it, as long as all those objects implement NodeList.
Of course, it would've been nice of Microsoft to put something on the web saying that this dispHTMLElementCollection thingy is their implementation of NodeList, just because someone was bound to come across the name and search for it eventually. But that doesn't change the fact that what you were doing amounted to peeking under the hood. Interfaces like NodeList are supposed to be black boxes, for vendors to implement as they will — that's the whole point of having an interface. If you insist on peeking into the black box, don't be surprised if you find something ugly inside.