Explicitly state intended support in compatibility.js
Add comments with supported browser versions where missing. Method: - Use MDN compat tables if available. - Otherwise test in Chrome (31+) otherwise. (the Chrome Web Store does not update older versions of Chrome, so probably nobody is interested in even older versions, even though there is an existing comment for Chrome<29 at `document.currentScript`).
This commit is contained in:
parent
628e70fbb5
commit
44025a3ec1
@ -75,6 +75,7 @@ PDFJS.compatibilityChecked = true;
|
||||
})();
|
||||
|
||||
// Checks if navigator.language is supported
|
||||
// Support: IE<11
|
||||
(function checkNavigatorLanguage() {
|
||||
if (typeof navigator === 'undefined') {
|
||||
return;
|
||||
@ -151,7 +152,7 @@ PDFJS.compatibilityChecked = true;
|
||||
})();
|
||||
|
||||
// Provides support for Object.values in legacy browsers.
|
||||
// Support: IE.
|
||||
// Support: IE, Chrome<54
|
||||
(function checkObjectValues() {
|
||||
if (Object.values) {
|
||||
return;
|
||||
@ -160,7 +161,7 @@ PDFJS.compatibilityChecked = true;
|
||||
})();
|
||||
|
||||
// Provides support for Array.prototype.includes in legacy browsers.
|
||||
// Support: IE.
|
||||
// Support: IE, Chrome<47
|
||||
(function checkArrayIncludes() {
|
||||
if (Array.prototype.includes) {
|
||||
return;
|
||||
@ -169,7 +170,7 @@ PDFJS.compatibilityChecked = true;
|
||||
})();
|
||||
|
||||
// Provides support for Math.log2 in legacy browsers.
|
||||
// Support: IE.
|
||||
// Support: IE, Chrome<38
|
||||
(function checkMathLog2() {
|
||||
if (Math.log2) {
|
||||
return;
|
||||
@ -187,7 +188,7 @@ PDFJS.compatibilityChecked = true;
|
||||
})();
|
||||
|
||||
// Provides support for Number.isInteger in legacy browsers.
|
||||
// Support: IE.
|
||||
// Support: IE, Chrome<34
|
||||
(function checkNumberIsInteger() {
|
||||
if (Number.isInteger) {
|
||||
return;
|
||||
@ -195,6 +196,7 @@ PDFJS.compatibilityChecked = true;
|
||||
Number.isInteger = require('core-js/fn/number/is-integer');
|
||||
})();
|
||||
|
||||
// Support: IE, Safari<8, Chrome<32
|
||||
(function checkPromise() {
|
||||
if (globalScope.Promise) {
|
||||
return;
|
||||
@ -202,6 +204,7 @@ PDFJS.compatibilityChecked = true;
|
||||
globalScope.Promise = require('core-js/fn/promise');
|
||||
})();
|
||||
|
||||
// Support: IE<11, Safari<8, Chrome<36
|
||||
(function checkWeakMap() {
|
||||
if (globalScope.WeakMap) {
|
||||
return;
|
||||
@ -209,6 +212,7 @@ PDFJS.compatibilityChecked = true;
|
||||
globalScope.WeakMap = require('core-js/fn/weak-map');
|
||||
})();
|
||||
|
||||
// Support: IE, Chrome<32
|
||||
// Polyfill from https://github.com/Polymer/URL
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user