Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Compatibiity with defineProperty polyfills #182

Closed
triblondon opened this issue May 31, 2016 · 0 comments
Closed

Compatibiity with defineProperty polyfills #182

triblondon opened this issue May 31, 2016 · 0 comments
Assignees

Comments

@triblondon
Copy link

Consider updating https://github.com/andyearnshaw/Intl.js/blob/master/src/util.js#L17-L24 to test for accessor property support. Your use of defineProperty does define accessors, but your compat test doesn't verify that that will work. If Intl is loaded through the polyfill service, we polyfill defineProperty for you as a dependency, and our implementation throws in IE <=8 if you try to define an accessor property.

By testing the parts of the API that you want to use, you can make best use of any existing implementation, including a polyfill, before falling back to your naive implementation that ignores accessor properties where they are not supported.

Also see polyfillpolyfill/polyfill-service#712

@caridy caridy self-assigned this May 31, 2016
caridy added a commit that referenced this issue Jun 9, 2016
…ec alignment by making formatToParts a method instead of a getter.
@caridy caridy closed this as completed in 9ba894c Jun 16, 2016
caridy added a commit that referenced this issue Jun 16, 2016
fixes #182: improving Object.defineProperty() detection mechanism
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants