Subj : spidermonkey watch on object.__count__ To : netscape.public.mozilla.jseng From : Jens Thiele Date : Fri Aug 27 2004 02:01 pm now i want to call a function each time a property is added to an object i had hoped to do this like this: o={}; o.watch("__count__",function(p,o,n){println("this[p]:"+this[p]+" p:"+p+" o:"+o+" n:"+n);return n;}); println(o.__count__); o.x=10; println(o.__count__); output is: 0 1 => __count__ is "incremented" but my function isn't called any ideas how to do this (call a function each time a property is added)? if possible in javascript - if not with additional native code (via the spidermonkey API without changing spidermonkey code) or should the above work and spidermonkey be fixed? Jens .