Gary Guo (2015-02-09T15:15:39.000Z)
I propose addition of String.prototype[@@toStringTag] as well as abridgement of Object.prototype.toString. By the way, I do see a new problem in current Object.prototype.toString behavior: what shall it behave when applied on a proxy object? Since proxy do not have these internal slots, it will return [object Object] (assume no @@toStringTag defined on the proxy). However, an proxy of array will return [object Array] (see definition of IsArray). This leads to an inconsistency.

Subject: Re: @@toStringTag spoofing for null and undefined
From: allen at wirfs-brock.com
Date: Sun, 8 Feb 2015 09:34:30 -0800
CC: es-discuss at mozilla.org
To: nbdd0121 at hotmail.com


On Feb 8, 2015, at 5:35 AM, Gary Guo wrote:No one have comments on this?

See the latest (Feb 2) spec. revision: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150209/8d55dd5b/attachment.html>
d at domenic.me (2015-02-17T19:13:02.386Z)
I propose addition of String.prototype[@@toStringTag] as well as abridgement of Object.prototype.toString. By the way, I do see a new problem in current Object.prototype.toString behavior: what shall it behave when applied on a proxy object? Since proxy do not have these internal slots, it will return [object Object] (assume no @@toStringTag defined on the proxy). However, an proxy of array will return [object Array] (see definition of IsArray). This leads to an inconsistency.