Subj : Re: Property resolution via GetProperty on the global object, and To : donteventthinkaboutit From : Brendan Eich Date : Tue Aug 03 2004 12:00 pm donteventthinkaboutit@sbcglobal.net wrote: > Here is my problem... > > I am calling JS_EvaluateScript on my global object. > > GetProperty only seems to be invoked if the property is explicitly > preceeded by "this" > > so inside the script... > > this.foo // tries to resolve foo on the global object via > // GetProperty as expected. > > foo // GetPoperty not called on global object. > > > Please... what am I missing? You have to show your code, at least the way you set up the global object, and of course the exact call to JS_EvaluateScript, and the test input in full -- otherwise I'm just guessing, which probably wastes both our time. The JSClass.getProperty hook will be called for every property value read from an object of the class, so my first thought is that |this| and the scope object are in fact not the same object. BTW, if you need to make a connection between a proxy-object stored in a property value and its peer native object only on first access, you should use resolve, not getProperty. /be .