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

More-compatible iteration #1

Closed
wants to merge 1 commit into from

Conversation

chrissrogers
Copy link

For those lovely older browsers

Signed-off-by: Christopher Rogers chrissrogers@gmail.com

For those lovely older browsers

Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
@pirxpilot
Copy link
Owner

'lovely older browsers' ;-)
Maybe we should just use something like component/each here. Let me see if I can find anything simple enough.

@pirxpilot
Copy link
Owner

I thought about it some more and decided against adding pre-ES5 workarounds.
They are trickier to write than it appears (for example: the code in this PR iterates over prototype properties - probably not what we want) and they lock us forever in coding to lowest common denominator.

I did look at couple of existing shims and polyfills, but they either do too much (component/map wants component/to-function) or they do not do enough (Object.keys supported but not Array.map).

es5-shim is the best way to support non ES5 complaint browsers (which these days is just a nice name for IE8). es5-shim did not seem to be component-ized yet so I created es-shims/es5-shim#204 (you can use code42day/es5-shim until it is merged)

OK - this turned out longer than I intended: but we have probably > 10 components that use ES5 only features and I wanted to find a solution for all of them.
Thanks for the PR.

@chrissrogers
Copy link
Author

That seems like a good solution for the largest number of components that assume ES5-only. However, my use-case is for a distributable library that must not modify Object prototypes, so the shim is not viable. Thanks for the look.

@pirxpilot pirxpilot closed this Jun 1, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants