aboutsummaryrefslogtreecommitdiff
path: root/js/polyfills/bind.js
diff options
context:
space:
mode:
authorEric Bidelman2012-04-10 22:47:35 -0700
committerEric Bidelman2012-04-10 22:47:35 -0700
commit9118fa551c30ecda1b0e78af6418284460822d75 (patch)
tree2dd32e17b1bd5a406952b22d7d727fe6d7044dcb /js/polyfills/bind.js
parentba011027cea557a78a400959f9f04a8de456947e (diff)
downloadio-slides-remote-9118fa551c30ecda1b0e78af6418284460822d75.tar.gz
polyfills working for ios < 5
Diffstat (limited to 'js/polyfills/bind.js')
-rw-r--r--js/polyfills/bind.js3
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
3Function.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});