From 4b15e8566b5c454f26ee4b2da57c3d726e6c019c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 16 Nov 2017 13:54:03 +0100 Subject: [PATCH] Remove the `Function.prototype.bind` polyfill This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`. --- src/shared/compatibility.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 472be6045..b2d6bcfca 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -102,23 +102,6 @@ PDFJS.compatibilityChecked = true; }); })(); -// Function.prototype.bind? -// Support: Android<4.0, iOS<6.0 -(function checkFunctionPrototypeBindCompatibility() { - if (typeof Function.prototype.bind !== 'undefined') { - return; - } - - Function.prototype.bind = function functionPrototypeBind(obj) { - var fn = this, headArgs = Array.prototype.slice.call(arguments, 1); - var bound = function functionPrototypeBindBound() { - var args = headArgs.concat(Array.prototype.slice.call(arguments)); - return fn.apply(obj, args); - }; - return bound; - }; -})(); - // HTMLElement dataset property // Support: IE<11, Safari<5.1, Android<4.0 (function checkDatasetProperty() {