Is there really no way to expose the prototype of a html element in IE (

No, nor is it guaranteed you can fiddle with DOM objects’ prototypes in JavaScript in general. The DOM objects are not part of the ECMAScript spec; they may not be (and traditionally speaking aren’t) native JavaScript Objects at all, in any browser.

This is why frameworks tend to have their own ‘container’ wrapper classes.

Also you cannot rely on ‘t.el.constructor’ even if they were native JS Objects. ‘constructor’ is not a standard property, isn’t available in IE, and even in Mozilla doesn’t do what you might think it does. Avoid.

Leave a Comment