shawnbot / aight

JavaScript shims and shams for making IE8-9 behave reasonably
Other
756 stars 98 forks source link

Firefox chokes on textContent shim #6

Closed shawnbot closed 11 years ago

shawnbot commented 11 years ago

Firefox 17.0.1 throws an exception in the textContent shim because its implementation of Object.getOwnPropertyDescriptor returns objects without a get() method. So not only does it fail the initial feature detection (because Object.getOwnPropertyDescriptor(Element.prototype, "textContent").get is undefined), but it also fails both to get a property descriptor for Element.prototype.innerText (which works in IE) and throws and exception when trying to define Element.prototype.textContent.

I've monkey patched production code to wrap this shim in a try/catch block, and we should probably do the same here.

shawnbot commented 11 years ago

Done.