forked from extern/egroupware
Warn about legacy function calls using too many arguments
This commit is contained in:
parent
1b0cefe5f2
commit
4e6c5c3a1f
@ -143,6 +143,10 @@
|
|||||||
// Dump the executed code for debugging
|
// Dump the executed code for debugging
|
||||||
egw.debug('log', 'Executing legacy JS code: ', _code);
|
egw.debug('log', 'Executing legacy JS code: ', _code);
|
||||||
|
|
||||||
|
if(arguments && arguments.length > 2)
|
||||||
|
{
|
||||||
|
egw.debug('warn', 'Legacy JS code only supports 2 arguments (event and widget)', _code, arguments);
|
||||||
|
}
|
||||||
// Return the result of the called function
|
// Return the result of the called function
|
||||||
return func.call(context, ev, _widget);
|
return func.call(context, ev, _widget);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user