From 9ff3c6f99dc1c2debcd99158e09f7a1c3cab7065 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 19 Dec 2017 15:02:07 +0100 Subject: [PATCH] Remove the `document.readyState` polyfill This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`. --- src/shared/compatibility.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/shared/compatibility.js b/src/shared/compatibility.js index 63dc62818..b371d4c19 100644 --- a/src/shared/compatibility.js +++ b/src/shared/compatibility.js @@ -111,31 +111,6 @@ PDFJS.compatibilityChecked = true; }); })(); -// Provides correct document.readyState value for legacy browsers. -// Support: IE9,10. -(function checkDocumentReadyState() { - if (!hasDOM) { - return; - } - if (!document.attachEvent) { - return; - } - var documentProto = document.constructor.prototype; - var readyStateProto = Object.getOwnPropertyDescriptor(documentProto, - 'readyState'); - Object.defineProperty(documentProto, 'readyState', { - get() { - var value = readyStateProto.get.call(this); - return value === 'interactive' ? 'loading' : value; - }, - set(value) { - readyStateProto.set.call(this, value); - }, - enumerable: true, - configurable: true, - }); -})(); - // Provides support for ChildNode.remove in legacy browsers. // Support: IE. (function checkChildNodeRemove() {