Subj : Re: Private data on function objects To : James Turner From : Brendan Eich Date : Thu Jan 09 2003 02:04 pm James Turner wrote: >In Brendan Eich wrote: > > >>Just to clarify: you must mean "the object tagged as a jsval and >>passed as argv[-2]" here. The |obj| parameter to native functions is >>the >>|this| parameter in JS. The |obj| parameter of property getters/ >>|setters >>is object containing the property named by the |id| param. >> > >Actually, my concern is the getter / setter for *static* properties ( >which don't seem to >be widely used), where the 'obj' passed is indeed the function object ( >at least that's what I gleaned get from printf-ing the JSobject pointers) >And the code seems to work. > "Static method" borrows Java terminology to refer to class-static methods, e.g. Date.UTC(), Date.parse(), and Date.now() (the last is a SpiderMonkey extension), so yes: the |obj| parameter is the object in which the property whose value is being invoked was found, the Date class constructor function in my examples. What language or system are you bridging JS to and from, anyhoo? /be .