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
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'),
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
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;