From 9118fa551c30ecda1b0e78af6418284460822d75 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Tue, 10 Apr 2012 22:47:35 -0700 Subject: polyfills working for ios < 5 --- js/polyfills/bind.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 js/polyfills/bind.js (limited to 'js/polyfills/bind.js') 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 @@ +// Function.bind polyfill for Safari < 5.1.4 and iOS. +// From https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind +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}); -- cgit v1.2.3