1417Re: Calling With Too Much Parameters
- Aug 10, 2010Don't forget that it's possible to access the non-named parameters using the "arguments" object.
I suppose if the function does not access the arguments object, then throwing a warning or error in that case might be nice.
In any case, if the function is called with more arguments than it expects, it simply ignores the excess. I'm not sure why that would cause a bug in the plugin.
--- In email@example.com, Jean-Charles Meyrignac <jcmeyrignac@...> wrote:
> I just discovered a bug in a Firefox plugin, and the bug was that a routine
> using 3 parameters was called with 4 parameters.
> So I did a little test with jslint:
> function test(a,b,c)
> return a+b+c;
> Shouldn't JsLint send a warning on this ?
> [Non-text portions of this message have been removed]
- << Previous post in topic Next post in topic >>