On 9/23/07, Brendan Eich <[EMAIL PROTECTED]> wrote:
> 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(){}).constructo
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.o
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote:
> On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> > Function objects get a non-enumerable constructor.
> > function F(){};
> > F.constructor === Function; // true
> > F.prototype.hasOwnProperty('constructor'); //true
> > F.prototype.propertyI
On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> Function objects get a non-enumerable constructor.
> function F(){};
> F.constructor === Function; // true
> F.prototype.hasOwnProperty('constructor'); //true
> F.prototype.propertyIsEnumerable("constructor"); // false.
Of course.
> Object
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote:
> > > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> > >> 2. (new function(){}).constructor should be Function.
>
> > On Sep 23, 2007, at 8:59 AM, liorean wrote:
> > > I agree. And in ES3 it is, unless the function either:
>
> On 23/09/2007,
> > On 23/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> >> 2. (new function(){}).constructor should be Function.
> On Sep 23, 2007, at 8:59 AM, liorean wrote:
> > I agree. And in ES3 it is, unless the function either:
On 23/09/2007, Brendan Eich <[EMAIL PROTECTED]> wrote:
> No:
>
> js> (new
On 9/23/07, liorean <[EMAIL PROTECTED]> wrote:
> > > On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> > > > What I've found is that it's always giving wrong constructor property
> > > > with inheritance chains.
> > > >
> > > > A <-- B <-- C
> > > > c = (new C).constructor;// A
> > > >
> >
On Sep 23, 2007, at 8:59 AM, liorean wrote:
>> 1. The constructor property should be on the object instance
>> *created*
>> by the function.
>
> That argument I agree with. It should be on the instance and not
> the prototype.
The reason for the original prototype-owned constructor was to aff
> > On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> > > What I've found is that it's always giving wrong constructor property
> > > with inheritance chains.
> > >
> > > A <-- B <-- C
> > > c = (new C).constructor;// A
> > >
>
> I meant an enumerable superclass property!
> On 9/22/07, li
On 9/22/07, liorean <[EMAIL PROTECTED]> wrote:
> On 22/09/2007, Garrett Smith <[EMAIL PROTECTED]> wrote:
> > What I've found is that it's always giving wrong constructor property
> > with inheritance chains.
> >
> > A <-- B <-- C
> > c = (new C).constructor;// A
> >
I meant an enumerable supercla
10 matches
Mail list logo