Subj : Re: js_GetArgument To : netscape.public.mozilla.jseng From : "itaj sherman" Date : Tue Jun 03 2003 07:02 pm > > > > function MyFunc( par ) > > { > > with( MyFunc ) { > > y = par; > > } > > } > > > > why is it so? > > See ECMA-262 Edition 3 (http://www.mozilla.org/js/language/E262-3.pdf), > 15.3.5 in particular. > i read the standard in the past a few times. i checked it again now. and 15.3.5 in particular, but i couldn't find any reference to the behaviour of defining properties on function objects by the names of the function's parameters (whatever value they would have). sorry if i'm not seeing something obvious. i'll add another example to make it clear: function MyFunc( par ) { var a = MyFunc.par; } in spidermonkey the property "par" is automatically defined on MyFunc, even if it is not directly set on the function object. having the value: in the older version of spidermonkey it has the value actually passed as argument par, in the newer version it has the value undefined. my questions are: why is it automatically defined? why did the value change between spidermonkey versions? - and i couldn't find that in the standard :-? .