Subj : Re: What is about private data of objects? To : =?ISO-8859-1?Q?Georg_Maa=DF?= From : Brendan Eich Date : Mon Aug 04 2003 09:46 pm Georg Maaß wrote: > Brendan Eich wrote: > >> JS_SetPrivate. >> >> What was unclear? > > > When is this Method called? Is it called automatically during > instanziation? No -- how could the engine call this function? What value would it pass? The private slot has a default value of undefined (JSVAL_VOID). It is up to your embedding code (a native class constructor function, e.g. -- the constructor parameter to JS_InitClass) to call JS_SetPrivate after allocating or finding a private data structure to "wrap" with the new JS object passed in via the obj (this) parameter. /be .