It probably would be backward incompatible change. Too much code depends on
[Object Object].
2 gru 2014 08:46 "Dmitry Soshnikov" <[email protected]> napisał(a):

> Hi,
>
> Probably worth providing a default implementation of the `@@toStringTag`
> when evaluating a class [1]. In this case users will be able to do:
>
> ```
> class Point { ... }
>
> var p = new Point(1, 2);
> console.log(p); // "[object Point]"
> ```
>
> The default implementation will be just (if the `className` is defined of
> course):
>
> ```
> proto[@@toStringTag] = function() {
>   return className;
> };
> ```
>
> [1]
> https://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-classdefinitionevaluation
>
> Dmitry
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to