HTMLElement members are no more available on the whole inheritage chain

Published: | Categories: DOM


Where we used to have all members of the entire inheritance chain (e.g. HTMLDivElementHTMLElementElementNodeEventTarget) on the interface prototype object of the leaf class (e.g. HTMLDivElement.prototype === document.createElement("div").__proto), we now put the members of HTMLElement just on HTMLElement.prototype (=== HTMLDivElement.prototype.__proto__).

It turns out that at least one important library, Optimizely, relied on this erroneous behaviour. They quickly fixed it on their side, but it is important that any Web site using their tool upgrade to the latest versions.

Passing null to a method that takes a DOMString argument will stringify to "null" instead of the empty string. For example, element.setAttribute("foo", null) will result in an output like <div foo="null"> instead of <div foo="">.

The parseFromStream and parseFromBuffer methods of DOMParser as well as the serializeToStream method of XMLSerializer are now deprecated and no longer available on content. Those still work on chrome (or extension code).