Search code examples
javascriptpolyfills

Is there a risk involved in using MDN bind polyfill?


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?


Solution

  • https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Compatibility

    For me most obvious differences with native bind are:

    IMHO 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.