bind

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

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

Example

gantt.bind(method, thisArg);

Details

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

Change log

版本 4.0 中添加

Back to top