From 4aad26f5c27391afe235218b868652755c399f73 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 26 Sep 2013 18:49:02 +0200 Subject: [ADD] es5-shim bzr revid: fme@openerp.com-20130926164902-5ioas0np4tb9qnge --- addons/web/static/src/js/core.js | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'addons/web/static/src/js/core.js') diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 8c69f86c47e..37a217a8664 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -11,31 +11,6 @@ if (typeof(console) === "undefined") { }); } -// shim provided by mozilla for function.bind -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; - }; -} - var instance = openerp; openerp.web.core = {}; -- cgit v1.2.3