@@toStringTag spoofing for null and undefined
nbdd0121 at hotmail.com
Mon Feb 9 07:15:39 PST 2015
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...
More information about the es-discuss