Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partially support non-enumerability #93

Closed
Raynos opened this issue Jan 24, 2012 · 2 comments
Closed

partially support non-enumerability #93

Raynos opened this issue Jan 24, 2012 · 2 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Jan 24, 2012

https://gist.github.com/1672142

Since we emulate defineProperty and Object.keys we can keep a record of any non-enumerable properties defined through our defineProperty shim and then reference them in Object.keys.

This means that non-enumerable works for Object.keys but fails with for..in

Is this of value or do we just not want to support non-enumerability?

@domenic
Copy link
Contributor

domenic commented Jan 24, 2012

I think introducing an inconsistency between Object.keys and for-in is not a good price to pay. Doing so breaks an invariant of the language.

@bryanforbes
Copy link
Contributor

I agree with @DomenicDenicola on this. As a generic shim, we can't introduce an inconsistency like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants