Subj : Re: relating to JS_DefineFunction To : netscape.public.mozilla.jseng From : SteveHolt Date : Mon Apr 25 2005 04:23 am Brendan > The object that was invoked when you're in the JSNative (C native > function) it wraps is available as argv[-2]. Buried treasure two paces south ... just what I needed! Thank you. > You could, in recent SpiderMonkey releases (perhaps only in the latest?) > use __noSuchMethod__ as well. I saw that pop its head up while testing. I think the original requested name is lost by then though. > You could make a separate function object wrapping the same, single > native function, and use the function object's identity to dispatch. I think that is what I will try. That is, when I get asked for a function I don't know (and if I decide it can be supported) I will create a new function object wrapping a generic call and return it in the get. If I add it to the object, it can get invoked "normally" next time. And hopefully argv[-2] will see me though. Thanks Steve .