Subj : use JS_SetProperty in constructor To : netscape.public.mozilla.jseng From : Weiyang Zhou Date : Sun Aug 14 2005 02:58 am Hi, If have the following code: static JSBool _Gui_MenuItem(JSContext* cx, JSObject* obj, uintN argc, jsval* argv, jsval* rval) { .... } JS_InitClass( cx, obj, NULL, &menuItem_class, _Gui_MenuItem, 2, menuItem_props, menuItem_methods, NULL, NULL ); The constructor will take 2 parameters. I want to use them in _Gui_MenuItem() to initialize 2 properties of the object. is JS_SetProperty() the right function to use? Thanks Weiyang .