Polyfill Uint8ClampedArray
using core-js
https://github.com/zloirock/core-js
This commit is contained in:
parent
e49dfe4ed7
commit
be36c60e0f
@ -7,6 +7,7 @@
|
||||
"babel-loader": "^6.4.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.23.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"core-js": "^2.5.0",
|
||||
"escodegen": "^1.8.0",
|
||||
"eslint": "^4.2.0",
|
||||
"eslint-plugin-mozilla": "^0.4.0",
|
||||
|
@ -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') {
|
||||
|
@ -50,6 +50,7 @@
|
||||
'pdfjs-web': new URL('web', baseLocation).href,
|
||||
'pdfjs-test': new URL('test', baseLocation).href,
|
||||
'pdfjs-lib': new URL('src/pdf', baseLocation).href,
|
||||
'core-js': new URL('node_modules/core-js', baseLocation).href,
|
||||
},
|
||||
meta: {
|
||||
'*': {
|
||||
|
Loading…
Reference in New Issue
Block a user