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

Don't use Symbol.for if it's available. #7

Closed
benlesh opened this issue Apr 25, 2016 · 2 comments
Closed

Don't use Symbol.for if it's available. #7

benlesh opened this issue Apr 25, 2016 · 2 comments

Comments

@benlesh
Copy link
Owner

benlesh commented Apr 25, 2016

Given that Symbol.iterator === Symbol.for('iterator') is false, we don't need to use Symbol.for to get the observable symbol if it's available.

This relates to a comment here. And should resolve that issue.

@zenparsing
Copy link

The advantage of using Symbol.for is that otherwise we might run into cross-realm issues. For example, if you get an observable that comes from another iframe or something. Does anyone still program that way? : )

@benlesh
Copy link
Owner Author

benlesh commented Apr 26, 2016

The advantage of using Symbol.for is that otherwise we might run into cross-realm issues. For example, if you get an observable that comes from another iframe or something. Does anyone still program that way? : )

Unsure. I just know that it doesn't align with prior art. If there's a way to polyfill that we can...

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

2 participants