Created
May 7, 2013 16:00
-
-
Save Daniel-Hug/5533768 to your computer and use it in GitHub Desktop.
Modified version of the one on MDN:
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Function/bind#Compatibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function.bind polyfill: | |
open.bind||(Function.prototype.bind=function(b){function c(){return d.apply(this instanceof a&&b?this:b,e.concat([].slice.call(arguments)))}function a(){}var e=[].slice.call(arguments,1),d=this;a.prototype=this.prototype;c.prototype=new a;return c}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment