Don't use `Symbol.for` if it's available.
benlesh opened this issue · 2 comments
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.
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? : )
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...