Subj : Spidermonkey problem To : netscape.public.mozilla.jseng From : Jan Herling Date : Sat Jul 09 2005 06:19 pm Hallo, I would like to knonw if there is a possibility to get the name of a JS Object. Details: I'm using Spidermonkey in my c++ project. I defined my own class for JavaScript with name "Color". This class has three properties "r", "g", "b". So for example I have the following script: function foo() { var value = new Color(); } After executing the script the constructor of the Color-Class is called: (in my c++ code) JSBool TColor::JSConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { } Now I would like to get the name of the obj in the Script (In my example the name would be "value". Is this possible? Perhaps a function: char* JS_GetName(obj); Greetings Jan .