Standard builtins' prototypes and toString
erik.arvidsson at gmail.com
Thu Jun 12 08:57:47 PDT 2014
On Thu Jun 12 2014 at 11:28:12 AM, C. Scott Ananian <ecmascript at cscott.net>
> Date.prototype.[[DateValue]] exist, and be set to the epoch or some
1. Let date be the this value.
2. If Type(date) is not Object then, throw a TypeError exception.
3. If date does not have a [[DateValue]] internal slot, then let tv be NaN
4. Else let tv be this time value.
5. Return ToDateString(tv).
Allen, what is the benefit to do `super.toString()` instead?
> This problem actually seems to be an artifact of the way that
> [[Construct]] works in ES6 -- but the takeaway is that prototypes of a
> class are not themselves instances of the class. It's not surprising
> that methods of the class thus don't work on the prototype. I'd vote
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss