mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Polyfill Uint8ClampedArray
using core-js
https://github.com/zloirock/core-js
This commit is contained in:
parent
e49dfe4ed7
commit
be36c60e0f
3 changed files with 8 additions and 0 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue