Subj : Re: Enumerating standard class properties & methods To : netscape.public.mozilla.jseng From : "Sterling Bates" Date : Wed Dec 17 2003 01:16 pm "Brendan Eich" wrote in message news:3FE0B3E5.2000904@meer.net... > Sterling Bates wrote: > > > > Basically, yes. I'll statically store the methods for each standard class, > > then detect the class type at runtime using the code you've provided below. > > That way the bridge code can enumerate as deep as users need, and the engine > > stays compliant :-) > > Why do you need all the special casing? Why not use > JS_ResolveStandardClass? As I understand it, JS_ResolveStandardClass is used for lazy standard class initialization. What I'm trying to do is enumerate the methods of an object of a standard class type. The fastest way I know of to determine an object's class type is comparing the memory locations of the class structs (that's how SM does it anyway), and from there I can return a list of the standard class's methods. Is that correct? Thanks, Sterling .