Remove polyfill for Function.prototype.bind

This commit is contained in:
Robin North
2018-01-31 22:25:01 +00:00
parent 1eb43f73fe
commit 258d66f9cf
3 changed files with 0 additions and 24 deletions

View File

@@ -1,20 +0,0 @@
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)
var that = this
var Fnoop = function() {}
var fBound = function() {
return that.apply(this instanceof Fnoop && oThis ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)))
}
Fnoop.prototype = this.prototype
fBound.prototype = new Fnoop()
return fBound
}
}

View File

@@ -1,5 +1,3 @@
require("../polyfills/Function.prototype.bind")
var on = require("../events/on")
var clone = require("../clone")

View File

@@ -1,5 +1,3 @@
require("../polyfills/Function.prototype.bind")
var on = require("../events/on")
var clone = require("../clone")