Closed GoogleCodeExporter closed 9 years ago
1/ instanceof do not work properly because ObjEx behaves like the Map object:
it can
store any property names even __proto__, __parent__, toString, ...
This inhibit some default Object behaviors.
2/ 'foo' in obj check for the 'foo' property directly on obj.
I will try to understand how to hack a SpiderMonkey more deeply.
Original comment by sou...@gmail.com
on 30 Nov 2008 at 3:22
Note that in the previous post, /2 wrong because 'foo' property is check on the
current object *and* the prototype chain:
var obj = { __proto__:{ a:1 } };
'a' in obj; // is true
obj.hasOwnProperty('a'); // is false
Original comment by sou...@gmail.com
on 1 Mar 2009 at 9:35
ObjEx will be replaced with the new Proxy engine class (see
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Proxy)
Original comment by sou...@gmail.com
on 2 Jun 2011 at 10:52
Original issue reported on code.google.com by
nadir.se...@gmail.com
on 29 Nov 2008 at 5:37