added Function.prototype.bind polyfill for PhantomJS. Make Casper happy.

This commit is contained in:
jdescottes
2013-08-04 21:20:25 +02:00
parent 8acd91b4d9
commit a16e1bab09
4 changed files with 44 additions and 27 deletions

View File

@ -11,6 +11,19 @@ jQuery.namespace = function() {
return o;
};
/**
* Need a polyfill for PhantomJS
*/
if (typeof Function.prototype.bind !== "function") {
Function.prototype.bind = function(scope) {
"use strict";
var _function = this;
return function() {
return _function.apply(scope, arguments);
};
};
}
/*
* @provide pskl.utils
*