-
Notifications
You must be signed in to change notification settings - Fork 34
Web compat: The %Symbol.toStringTag%
property on %Iterator.prototype%
needs to be writable
#115
Comments
I asked on the first bug; but what exactly makes it not web compatible? |
I'm not convinced that fixing regenerator 0.13.next makes this web-compatible, though. Won't there be a significant volume of existing regenerator deployments out there, until they all upgrade? What's the half-life of a deployment of a particular regenerator version? I think a writable [%toStringTag%] property would be web-compatible. |
@jorendorff it doesn't immediately do that, you're right - the hope is that in the upcoming months, regenerator users would update their installations. Its maintainer believes folks update it frequently. Obviously if not, then it'd have to be made writable (or, the thing it's setting be made writable instead of this one). |
Is it possible to not specify @@toStringTag now, or let it be writable currently, then let the browser detect the try of writing it? If the usage is small enough, then convert it to non-writable? |
I suppose we could make it non-writable, but writable in Annex B, but that seems pretty unfortunate. |
Wait, https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js#L738 |
@Jack-Works That’s only the outer scope, the body of the IIFE is strict mode code: https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js#L9 |
Firefox ran into Bug 1644581 when the
%Symbol.toStringTag%
property was added to%Iterator.prototype%
as non‑writable.There was also no attempt to add a
%Symbol.toStringTag%
property to%AsyncIterator.prototype%
afterwards, which is why I opened Bug 1654075.The text was updated successfully, but these errors were encountered: