Improved Function.prototype.toString in ES6?

Nicholas C. Zakas standards at
Mon Aug 6 14:55:54 PDT 2012

I noticed that there is a proposal to improve how 
Function.prototype.toString works in ES6:

However, there doesn't seem to be any update in the existing ES6 draft, 
as it says: Function.prototype.toString ( )

    An implementation-dependent representation of the function is
    returned. This representation has the syntax of a
    FunctionDeclaration. Note in particular that the use and placement
    of white space, line terminators, and semicolons within the
    representation String is implementation-dependent.

    The toString function is not generic; it throws a TypeError
    exception if its this value is not a Function object. Therefore, it
    cannot be transferred to other kinds of objects for use as a method.

Are there going to be a changes to this in ES6?


Nicholas C. Zakas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list