Remove function bind polyfill from worker.js
This is no longer required in Phantom.js 2.x
This commit is contained in:
parent
58bd52559c
commit
506e36c9cc
|
@ -19,28 +19,6 @@
|
||||||
|
|
||||||
self.window = {}; // to make UMD bundles work
|
self.window = {}; // to make UMD bundles work
|
||||||
|
|
||||||
// Mozilla bind polyfill because phantomjs is stupid
|
|
||||||
if (!Function.prototype.bind) {
|
|
||||||
Function.prototype.bind = function(oThis) {
|
|
||||||
if (typeof this !== "function") {
|
|
||||||
// closest thing possible to the ECMAScript 5 internal IsCallable function
|
|
||||||
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
|
|
||||||
}
|
|
||||||
|
|
||||||
var aArgs = Array.prototype.slice.call(arguments, 1),
|
|
||||||
fToBind = this,
|
|
||||||
FNOP = function() {},
|
|
||||||
fBound = function() {
|
|
||||||
return fToBind.apply(this instanceof FNOP && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
|
|
||||||
};
|
|
||||||
|
|
||||||
FNOP.prototype = this.prototype;
|
|
||||||
fBound.prototype = new FNOP();
|
|
||||||
|
|
||||||
return fBound;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
importScripts('openpgp.js');
|
importScripts('openpgp.js');
|
||||||
var openpgp = window.openpgp;
|
var openpgp = window.openpgp;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user