[whatwg] Bug in defineProperty
Evgeny Burzak
buzzilo at gmail.com
Thu Aug 4 06:26:17 PDT 2011
Hello,
It seems there is a bug in function Object.defineProperty.
When property was defined with enumerable descriptor = false, I can
anyway get it in iterator if was defined prop with the same name in
object prototype.
Almost all browsers affected , except for Firefox. Maybe this happened
due to ambiguous definition?
Test
function test() {Object.defineProperty(this, "a", {value : "b",
writable : true,
enumerable : false,
configurable : true});
}
test.prototype.a = "c"
t = new test()
for(x in t) console.log([x, t[x]])
Results
IE9: a,b
Chrome: a,b
Safari: not tested
Opera: failed
Firefox: nothing - right job
-Evgeny
More information about the whatwg
mailing list