Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IE8 defineProperty/getOwnPropertyDescriptor clash with shim #5
As currently implemented, the Object.defineProperty shim will not install on IE8 because IE8 already has such a method. However, the built-in IE8 method only works when applied to DOM objects.
Because the shim does not get installed, the emulation of value: property descriptors on arbitrary objects is not available although it could be. (get: and set: descriptors are a lost cause). The shim installation needs better detection of IE8 (see http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx) and should probably and the installed shim should first call the built-in method and then only call the the emulation if the built-in throws).
IE8 also has a DOM only getOwnPropertyDescriptor so the same issues apply to it.