I have developed a Javascript library which requires the bind
method.
Unfortunately, bind
is not supported by IE8.
There are a polyfill on the MDN website which work well.
My question is: Are there problems or possible incompatibility between this polyfill and other Javascript libraries ?
It is safe to use in any case?
For me most obvious differences with native bind
are:
arguments.caller
does not point to the caller of bound function, but you shouldn't use it anywaylength
of bound function is set to 0, this may affect function arity checks like https://github.com/fitzgen/wu.js/blob/master/lib/wu.js#L406IMHO if you are using only "the good parts" of JavaScript, and not developing core of some framework (for IE8?), you shouldn't face any problems with this polyfill.