Function.prototype.bind = function() {
if(Function.prototype.bind){
return Function.prototype.bind
} else {
var self = this
var context = [].shift.call(arguments)
var args = [].slice.call(arguments)
return function() {
return self.apply(context, [].concat.call(args, [].slice.call(arguments)))
}
}
}
javascript 手写bind
最新推荐文章于 2023-05-10 17:11:21 发布