13.2.2 [[Construct]], constructor, and [[Class]] (was __proto__)
Brendan Eich
brendan at mozilla.org
Sun Sep 23 15:33:53 PDT 2007
On Sep 23, 2007, at 12:22 PM, Garrett Smith wrote:
>>> in no case is the value of (new function(){}).constructor Function.
>>
> It shouldn't be, but it is in OSX Ref Impl. (I did not build this).
>
> js> (new function(){}).constructor
> [function Function]
No, that's just http://bugs.ecmascript.org/ticket/64 -- proof:
>> (new function(){}).constructor
[function Function]
>> (new function(){}).constructor === Function
false
>> f = function(){}
[function Function]
>> (new f).constructor === f
true
>>
With Function.prototype.toString buggy, you need to test identity of
function objects.
/be
More information about the Es4-discuss
mailing list