1 if (!Function.prototype.bind) { 2 Function.prototype.bind = function(thisArg) { 3 var fn = this, args = slice.call(arguments, 1); 4 return args.length 5 ? function() { return apply.call(fn, thisArg, args.concat(slice.call(arguments))); } 6 : function() { return apply.call(fn, thisArg, arguments) }; 7 }; 8 } 9 10