bind

创建一个新函数,该函数在被调用时,其 this 关键字被设置为指定的值

function bind(function method,object thisArg);
methodfunction要绑定的函数
thisArgobject绑定函数调用时用作 this 上下文的值
function一个新函数,该函数调用时会使用指定的 this 上下文来执行原函数

Example

scheduler.bind(method, thisArg);

Details

此方法作为兼容 IE8 的替代方案,用于替代 Function.prototype.bind() 函数。

Change log

版本 6.0 中新增

返回顶部