Standard builtins' prototypes and toString
andre.bargull at udo.edu
Thu Jun 12 10:32:01 PDT 2014
> On Thu, Jun 12, 2014 at 12:48 PM, Jason Orendorff
> <jorendorff at mozilla.com <https://mail.mozilla.org/listinfo/es-discuss>> wrote:
> >/ In any case, I doubt we have a choice. ES3-5 at least supported it. There is
> />/ surely a Web page somewhere that calls .toString() on every object it can
> />/ find, just because.
Or a web page converts some value to a string using `"" + someValue`, in
which case adding a toString() legacy mode is not sufficient, because
valueOf() is actually invoked (well, except for Date.prototype because
of its @@toPrimitive override). Does that mean valueOf() also needs to
have a legacy mode to special case the prototype object?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss