[Greasemonkey] Re: Greasemonkey 0.4 - Last call (Aaron Boodman)

Nikolas Coukouma lists at atrus.org
Mon Jul 11 15:30:58 EDT 2005

Aaron Boodman wrote:

>>Yeah, I looked it up. There are now 9 parameters, see
>Great, thanks for doing this. Do you by chance know what the "right"
>way to handle the different signatures for different versions thing? I
>don't think that XPCOM will let me just send the extra param to FF
>1.1-... Should I try/catch and look for that error code? Or is there
>some better way?

If there are different numbers of arguments, you can use func.length to
detect which version you're dealing with. I know there's one place where
I used that for SeaMonkey compat. In another I ended up using try/catch
because the number of arguments was identitical :(

JavaScript doesn't have the concept of overloading functions, so it
lacks reflection for it.

-Nikolas Coukouma

More information about the Greasemonkey mailing list