diff options
author | Eric Bidelman | 2012-04-10 22:47:35 -0700 |
---|---|---|
committer | Eric Bidelman | 2012-04-10 22:47:35 -0700 |
commit | 9118fa551c30ecda1b0e78af6418284460822d75 (patch) | |
tree | 2dd32e17b1bd5a406952b22d7d727fe6d7044dcb /js/polyfills/bind.js | |
parent | ba011027cea557a78a400959f9f04a8de456947e (diff) | |
download | io-slides-remote-9118fa551c30ecda1b0e78af6418284460822d75.tar.gz |
polyfills working for ios < 5
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}); | ||