Skip to main content

bind

Description

Creates a new function that, when called, has its this keyword set to the provided value

bind: (method: GanttCallback, thisArg: any) => GanttCallback

Parameters

  • method - (required) function - the target function
  • thisArg - (required) object - the value to be passed as the this parameter to the target function when the bound function is called

Returns

  • bound_function - (function) - a new function that, when called, has its this keyword that will be passed to the target function

Example

gantt.bind(method, thisArg);

Details

The method is used as the IE8 compatible replacement of the Function.prototype.bind() function.

Change log

  • added in version 4.0