Subj : Re: Iterate all functions in script To : netscape.public.mozilla.jseng From : Issac Goldstand Date : Fri May 07 2004 06:30 pm Just my $0.02: I just looked that up myself and it took a good few hours of diving in the code and guessing which functions would work with it, what exactly it did, etc... The APIDOCs on that specific function happen to be rather unhelpful, IMHO. I'd be happy to submit a documentation patch as soon as I get a chance to try to work with a bit and have some idea of what I'm talking about . Issac "Sterling Bates" wrote in message news:c7e5kr$kqr1@ripley.netscape.com... > Forest Carlisle wrote: > > I would like to build a list of all the functions declared a script. I > > know I can get a function by name with JS_GetProperty for a given object > > and then call JS_GetPrivate to get the JSFunction*, and finally call > > JS_GetFunctionId to get the function name. > > > > Is there a way to get all the properties of a given object? > > Look up the JS_Enumerate API. > > http://www.mozilla.org/js/spidermonkey/apidoc/sparse-frameset.html > > Sterling .