diff options
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js new file mode 100644 index 00000000..1457cf5d --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/bower_components/phantomjs-polyfill/bind-polyfill.js @@ -0,0 +1,18 @@ +if (typeof Function.prototype.bind != 'function') { + Function.prototype.bind = function bind(obj) { + var args = Array.prototype.slice.call(arguments, 1), + self = this, + nop = function() { + }, + bound = function() { + return self.apply( + this instanceof nop ? this : (obj || {}), args.concat( + Array.prototype.slice.call(arguments) + ) + ); + }; + nop.prototype = this.prototype || {}; + bound.prototype = new nop(); + return bound; + }; +} |