Subj : Retrieving property name in getter and setter functions To : netscape.public.mozilla.jseng From : "JZ" Date : Fri Feb 21 2003 12:45 pm I'm using JS_DefineProperty to add some properties to an object. This works fine: JS_DefineProperty(g_cx, aw_obj, title, init_val, AW_JS_Get, 0, 0); Now, how in my AW_JS_Get function can I retrieve the name of the property that has been executed in the users JavaScript? static JSBool AW_JS_Get(JSContext *cx, JSObject *obj, jsval id, jsval *rval) { // need to get the name of the property here } Alternatively, how would I pass a unique ID number for the property if I'm using JS_DefineProperty instead of JS_DefineProperties and a JSPropertySpec? I'll need to do the same for my setter function. JZ .