You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function.prototype.bind2=function(context){if(typeofthis!=="function"){thrownewError("Function.prototype.bind - what is trying to be bound is not callable");}varself=this;// 获取bind2函数从第二个参数到最后一个参数varargs=Array.prototype.slice.call(arguments,1);varfNOP=function(){};varfbound=function(){// 这个时候的arguments是指bind返回的函数传入的参数varbindArgs=Array.prototype.slice.call(arguments);returnself.apply(thisinstanceoffNOP ? this : context,args.concat(bindArgs));};fNOP.prototype=this.prototype;fbound.prototype=newfNOP();returnfbound;};
No description provided.
The text was updated successfully, but these errors were encountered: