Function.prototype.$call = function(...args) {
let target = args[0];
target.fn = this;
let params = args.slice(1);
target.fn(...params);
delete target.fn
}
Function.prototype.$call = function(...args) {
let target = args[0];
target.fn = this;
let params = args.slice(1);
target.fn(...params);
delete target.fn
}
本文标题:js实现一个call
本文链接:https://www.haomeiwen.com/subject/yziumctx.html
网友评论