1 | const name = "window" |
call
1 | Function.prototype.MyCall = function (target, ...args) { |
apply
1 | Function.prototype.MyApply = function (target, ...args) { |
bind
1 | Function.prototype.MyBind = function (target, ...outArgs) { |
与原生bind执行期上下文一致写法
1 | Function.prototype.binder = function (context) { |