mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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
1 changed files with 0 additions and 25 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue