Well, actually there's no need to add so many arguments. You could simply make another function which passes the right parameters and use that as callback, like so:
js code:
function somefunction(arg1, arg2, arg3) {
// Do something useful
}
// Method 1: hard-coded parameters inside new function
var callback = function(timer) {
somefunction("aa", 123, 3.14159);
};
new Timer(1000, callback);
// Method 2: use array to get parameters
var callback = function(timer, args) {
// Pass each element in the args array as parameter
somefunction.apply(null, args);
};
var param = ["aa", 123, 3.14159];
new Timer(1000, callback, param);
As you can see, by using some clever coding you can even omit sending the parameter! Of course, this will make your callback function less portable, but it'll save you some precious code in your class itself.
And most important of all: you can avoid using eval() (since everybody knows that eval is evil!)