-
Notifications
You must be signed in to change notification settings - Fork 90
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
@@toStringTag #91
Comments
Nope. New things (like Map, Set, Promise, user-defined classes ... and Observable) don't get toStringTag. It's a legacy language feature added to preserve back-compat. |
Seriously? :) Map.prototype[Symbol.toStringTag]; // => "Map"
Object.getPrototypeOf(new Map().values())[Symbol.toStringTag]; // => "Map Iterator"
Promise.prototype[Symbol.toStringTag]; // => "Promise"
SIMD.Float32x4.prototype[Symbol.toStringTag]; // => "SIMD.Float32x4" |
You're right, I was confusing this with another toString-related spec thing. Apologies. |
Looks like it's defined for everything separately, http://www.ecma-international.org/ecma-262/6.0/#sec-promise.prototype-@@tostringtag I was thinking species :D |
Certainly seems like this should be done. Will try and get around to this prior to the next meeting. |
@@toStringTag
definitely should be added to all instances from this proposal.The text was updated successfully, but these errors were encountered: