Subj : Re: Callbacks from C/JS To : netscape.public.mozilla.jseng From : Andreas Podgurski Date : Wed Feb 18 2004 07:17 pm Ok, got it myself. Simply used a combination of Function=OBJECT_TO_JSVAL(JS_GetFunctionObject(JS_NewFunction(g_lpContext,Name,0,0,NULL,"Name"))); and JS_ValueToFunction(lpContext,argv[1]); and it worked. Sometimes it's nearly too easy ;-). A bit anoying is, that I need to keep track of the object to root it and can't root the function itself, but rooting the jsval itself even elimenates that. Regards, Andreas "SunSailor" Podgurski .