itself.bind = function (object, method, callback, context, args, includeEventArgs) {
var handler, originalArgLen;
args = args.slice(0, arguments.length);
originalArgLen = args.length;
context = context || null;
handler = function () {
if (includeEventArgs) {
for (var i = arguments.length - 1; i >= 0; i--) {
args.push(arguments[i]);
}
}
callback.apply(context, args);
};
handler.userArgsLength = originalArgLength;
object[method] = handler;
};
Предположим, я звоню
TOOL.bind(canvas, "onmouseover", doDrawFunc, [currentDrawingTool], true);
Я хочу получить доступ к userArgsLength
из doDrawFunc
.