Re: isPropertyEnumerable is going to stay broken?

2007-09-10 Thread Brendan Eich
On Sep 10, 2007, at 1:21 PM, liorean wrote: On 10/09/2007, Brendan Eich [EMAIL PROTECTED] wrote: Either reflect the __proto__ (read-only, please) property as some implementations do, or hardcode the prototype structure and code your propertyIsEnumerable tests accordingly. Would it be

Re: isPropertyEnumerable is going to stay broken?

2007-09-10 Thread Brendan Eich
On Sep 10, 2007, at 2:21 PM, Garrett Smith wrote: And my point was that it appears to duplicate functionality of hasOwnProperty in a differently named method. The two functions are different: js var Op = Object.prototype; js Op.foo = 42; 42 js print(Op.hasOwnProperty('foo'),

Re: isPropertyEnumerable is going to stay broken?

2007-09-10 Thread Neil Mix
I think this is what Garrett is referring to: js function f() {} js f.prototype.foo = blah; blah js var x = new f(); js print(x.propertyIsEnumerable(foo)); false js for (var n in x) print(n); foo And I have to agree with him, the method is confusing. Based on its name, I'd expect it to return

Re: isPropertyEnumerable is going to stay broken?

2007-09-10 Thread Garrett Smith
On 9/10/07, Brendan Eich [EMAIL PROTECTED] wrote: On Sep 10, 2007, at 2:21 PM, Garrett Smith wrote: And my point was that it appears to duplicate functionality of hasOwnProperty in a differently named method. The two functions are different: js var Op = Object.prototype; js Op.foo = 42;