Subj : Re: Using JSObjectOps To : James Turner From : Brendan Eich Date : Wed Dec 31 1969 04:00 pm James Turner wrote: >Following up from Brendan's suggestion I look at JSObjectOps (which i >realize is not a stable API, I can live with that): other than the >struct defined in jsapi.h, what information / examples / documentation >are there on using objectOps? > See jspubtd.h for the "interface method" types. > What am I giving up in terms of support >from the engine (things like scope chain handling, etc?) > Everything ;-). Seriously, scope chain handling is done by generic code in js_FindProperty and other such functions. You don't need to worry about it. But prototype chain handling is done by the implementor of JSObjectOps. Beware that any given implementation may follow the prototype chain in its lookupProperty function and reach an object governed by a different JSObjectOps implementation. >Basically, any feedback on what I'm getting myself into here would be >appreciated, and especially some pointers on how to get started, >assuming I go with this approach. > > I would try to avoid this approach. It sounded like you couldn't, however -- but I still wasn't sure, for want of a (very concrete :-) example of what you're doing that's hard to do with JSClass. /be .