@@toStringTag spoofing for null and undefined

Gary Guo nbdd0121 at hotmail.com
Wed Feb 11 05:45:44 PST 2015


Oops I just click reply instead of reply all. Sorry for that.

The point I am trying to make is that they still work, because legacy code assumes {}.toString.call(String.prototype) returns [object String]. The only possible incompatibility is the change of String.prototype, from itself a String to an ordinary object.
P.S.
I am trying to submit this to buzilla, but due to unknown reason I cannot access it.

Subject: Re: @@toStringTag spoofing for null and undefined
From: claude.pache at gmail.com
Date: Tue, 10 Feb 2015 19:51:59 +0100
CC: es-discuss at mozilla.org
To: nbdd0121 at hotmail.com

You misunderstood me: I wasn't referring to interaction between legacy and new code, but to legacy code by itself, e.g. on an unmaintained site, that used to work and would suddenly break (hint: "unknown object" was specifically `String.prototype`). ―Claude 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150211/ccab4dce/attachment.html>


More information about the es-discuss mailing list