When Internet Exporer 8 was released, a much talked-about feature was mutable DOM prototypes. I dug in this morning to figure out exactly what is and is not supported. As one would expect, the support is not as full as the nice writeup would have everyone believe. Here’s a quick summary:
Node type doesn’t exist, so you still can’t access Node.ELEMENT_NODE as you can in other browsers.Element type exists, but since Node doesn’t, it’s not a subtype.HTMLElement type doesn’t exist even though, technically, HTMLElement is the base type for all of the other HTML element types. For example, HTMLBodyElement inherits from HTMLElement which inherits from Element.__defineGetter__() and __defineSetter__(). Sadly, these are only available on the DOM types and not on native JScript objects.NodeList, NamedNodeMap, Attr, Text, DOMImplementation, HTMLDocument, HTMLCollection. Each of these supports getters and setters.Array.prototype.slice() still can’t be used on NodeList or HTMLCollection objects.I guess this is a good start from where IE was prior to this release, though still somewhat disappointing. Hopefully this feature will be more fleshed-out once they go GA.
Post Comment