Polyfill Object.values and Array.prototype.includes using core-js

See https://github.com/zloirock/core-js#stage-4-proposals.
This commit is contained in:
Jonas Jenwald 2017-10-16 09:09:08 +02:00
parent 4fdb0f57d7
commit bcb29063c1

View File

@ -839,6 +839,25 @@ PDFJS.compatibilityChecked = true;
};
})();
// Provides support for Object.values in legacy browsers.
// Support: IE.
(function checkObjectValues() {
if (Object.values) {
return;
}
Object.values = require('core-js/fn/object/values');
})();
// Provides support for Array.prototype.includes in legacy browsers.
// Support: IE.
(function checkArrayIncludes() {
if (Array.prototype.includes) {
return;
}
Array.prototype.includes = require('core-js/fn/array/includes');
})();
// Provides support for Number.isNaN in legacy browsers.
// Support: IE.
(function checkNumberIsNaN() {