Subj : Re: request for new feature in spidermonkey (or workaround) To : Brann Joly From : Brendan Eich Date : Mon May 10 2004 12:09 pm Brann Joly wrote: > Hi, > > In the getter protoype, there is an extra parameter "tinyid" enabling the > getter function to know which member of the object was requested. > > I can't find any way to do the same things with methods No, you would not. 256 code points are not enough. Use argv[-1], as Shanti Rao pointed out, to get the function object being dispatched. That object has 2 reserved slots, in which you can store private data (JS_Get/SetReservedSlot). This is what XPConnect does (see http://lxr.mozilla.org/mozilla/search?string=JS_SetReservedSlot). /be .