Remove the document.readyState
polyfill
This is only relevant for browsers that we don't intend to support with PDF.js version `2.0`.
This commit is contained in:
parent
6af45052c5
commit
9ff3c6f99d
@ -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.
|
// Provides support for ChildNode.remove in legacy browsers.
|
||||||
// Support: IE.
|
// Support: IE.
|
||||||
(function checkChildNodeRemove() {
|
(function checkChildNodeRemove() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user