diff options
Diffstat (limited to 'js/polyfills/bind.js')
-rw-r--r-- | js/polyfills/bind.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/js/polyfills/bind.js b/js/polyfills/bind.js new file mode 100644 index 0000000..fe6bc0d --- /dev/null +++ b/js/polyfills/bind.js | |||
@@ -0,0 +1,3 @@ | |||
1 | // Function.bind polyfill for Safari < 5.1.4 and iOS. | ||
2 | // From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind | ||
3 | Function.prototype.bind||(Function.prototype.bind=function(c){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - binding an object that is not callable");var d=Array.prototype.slice.call(arguments,1),e=this,a=function(){},b=function(){return e.apply(this instanceof a?this:c||window,d.concat(Array.prototype.slice.call(arguments)))};a.prototype=this.prototype;b.prototype=new a;return b}); | ||