Object.defineProperty doesn't fail silently on IE8 #105

Closed
Hebo opened this Issue Mar 31, 2012 · 4 comments

Comments

Projects
None yet
3 participants

Hebo commented Mar 31, 2012

Hey,

Object.defineProperty doesn't fail silently on IE8, it throws errors instead. Docs indicate that it should merely have no effect. Intended behavior or a bug?

http://jsfiddle.net/PjEzh

IE8 Debugger

chiefy commented Aug 30, 2013

👍 ugh, just ran into this.

Member

kriskowal commented Aug 30, 2013

The docs need an update. Object.defineProperty should not fail silently. I would rather you know that it doesn’t work than find out because of a side-effect. Let me know if you have a use-case where silent failure would be preferable.

chiefy commented Aug 30, 2013

@kriskowal I think you're right it should not fail silently, but I am using another 3rd party library who assumes that if you include es5-sham, it will just automatically make Object.defineProperty work in IE8, which it does not. I am adding in a try/catch block and dealing with the issue there (which is how it should be as you point out, thanks) It would be nice to update the docs 🍔

kriskowal closed this in 2e6a2a4 Sep 5, 2013

chiefy commented Sep 5, 2013

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment