Subj : Re: SpiderMonkey - question about properties... To : Robert Bates From : Brendan Eich Date : Sat Jul 05 2003 08:10 pm Robert Bates wrote: >I'm working on a generic C++ class to encapsulate the JSObject and extend >it, and was wondering about something. The JSClass struct defines property >methods, and then there additionally is a >JS_DefineProperty/JS_DefineProperties method that each property has a >get/set method available for. > >If I just set the JSClass methods for property set/get and performed my own >filtering and rights via the set/get methods using the property ID, would >this provide the same level of functionality? > > Yes, at some cost in cycles, because the JSClass-wide getProperty and setProperty hook implementations would have to discriminate and specialize based on id. /be .