shawnbot / aight

JavaScript shims and shams for making IE8-9 behave reasonably

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firefox chokes on textContent shim

shawnbot opened this issue · comments

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.

Done.