IE8 defineProperty/getOwnPropertyDescriptor clash with shim #5

Closed
allenwb opened this Issue Feb 8, 2011 · 3 comments

Projects

None yet

4 participants

@allenwb
allenwb commented Feb 8, 2011

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.

@hax hax added a commit to hax/es5-shim that referenced this issue Jul 18, 2011
@hax hax first try to fix #5 0378e40
@edmellum

I think I'm having problems because of this. IE8 gives me this error: Object doesn't support this action on line 532. Has this been merged in yet?

@bbqsrc
Contributor
bbqsrc commented Sep 19, 2011

Doesn't look like it was merged, sadly.

@kriskowal
Member

This needs a retry if anyone is up for it.

@kriskowal kriskowal closed this in 37305bc Sep 22, 2011
@samsonjs samsonjs pushed a commit to samsonjs/es5-shim that referenced this issue Sep 23, 2011
@kriskowal kriskowal Noted issue #5 9b04e6b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment