Subj : Re: Determining call context in SpiderMonkey To : john satoa From : Brendan Eich Date : Tue Aug 17 2004 02:00 pm john satoa wrote: > Is it possible given: > > i = a() > > and > > b(a()) > > To determine within the native a() handler, whether or not you are > being called and assigned to a variable, or being called as a > parameter to another function? If it is, is it possible to determine > the name of the function that is using you as a parameter (ie "b") ? > > (yes it's a little weird, but will actually help our target users if I > can determine this). Currently in SpiderMonkey, for those two cases, you could dig out the information you want. There's no public or "friend" API to help you, though, so you'd be getting in bed with the engine. Can you say more about the use-case that you hope will be helped here? /be .