Polyfill Uint8ClampedArray using core-js

https://github.com/zloirock/core-js
This commit is contained in:
Jonas Jenwald 2017-08-14 15:55:54 +02:00
parent e49dfe4ed7
commit be36c60e0f
3 changed files with 8 additions and 0 deletions

View file

@ -53,6 +53,12 @@ PDFJS.compatibilityChecked = true;
// Checking if the typed arrays are supported
// Support: iOS<6.0 (subarray), IE<10, Android<4.0
(function checkTypedArrayCompatibility() {
if (typeof Uint8ClampedArray === 'undefined') {
// Support: IE<11
globalScope.Uint8ClampedArray =
require('core-js/fn/typed/uint8-clamped-array');
}
if (typeof Uint8Array !== 'undefined') {
// Support: iOS<6.0
if (typeof Uint8Array.prototype.subarray === 'undefined') {