Subj : Re: updated jsgen (maybe rc1?) - beta 8 To : Marcello Bastea-Forte From : Brendan Eich Date : Fri Jan 16 2004 12:02 am Marcello Bastea-Forte wrote: >> I just noticed now that the child class prototype field is printing >> out as undefined in the following test code: >> ----------------------------------------------------------------- >> print("start"); >> var foo = new JSTest; >> print("\tfoo.prototype="+foo.prototype); > There is no property named "prototype" created by the JS engine, or per the ECMA standard. Are you thinking of JSTest.prototype? In SpiderMonkey, foo.__proto__ === JSTest.prototype after the new expression completes. I don't know what problem you are trying to solve. Could you state it simply, without lots of boilerplate? You should be able to use JS_InitClass. You should be able to walk the parent (JS_GetParent) chain to find the last object on a scope chain, which is the global object you should pass to any related JS_InitClass. /be .