pdf.js/src/core
Jonas Jenwald ecbcde7ff3 Fail early, in modern GENERIC builds, if certain required browser functionality is missing (PR 11771 follow-up)
With two kind of builds now being produced, with/without translation/polyfills, it's unfortunately somewhat easy for users to accidentally pick the wrong one.

In the case where a user would attempt to use a modern build of PDF.js in an older browser, such as e.g. IE11, the failure would be immediate when the code is loaded (given the use of unsupported ECMAScript features).
However in some browsers/environments, a modern PDF.js build may load correctly and thus *appear* to function, only to fail for e.g. certain API calls. To hopefully lessen the support burden, and to try and improve things overall, this patch adds additional checks to ensure that a modern build of PDF.js cannot be used in browsers/environments which lack native support for `Promise.allSettled`.[1] Hence we'll fail early, with an error message telling users to pick an ES5-compatible build instead.

*Please note:* While it's probably too early to tell if this will be a widespread issue, it's possible that this is the sort of patch that *may* warrant being `git cherry-pick`ed onto the current beta version (v2.4.456).

---
[1] This was a fairly recent addition to the web platform, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled#Browser_compatibility
2020-04-11 13:42:03 +02:00
..
annotation.js Enable the ESLint prefer-const rule globally (PR 11450 follow-up) 2020-01-25 00:20:22 +01:00
arithmetic_decoder.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
bidi.js Enable the no-nested-ternary ESLint rule (PR 11488 follow-up) 2020-01-14 17:49:39 +01:00
ccitt_stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
ccitt.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
cff_parser.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
charsets.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
chunked_stream.js Remove variable shadowing from the JavaScript files in the src/core/ folder 2020-03-23 18:28:30 +01:00
cmap.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
colorspace.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
core_utils.js Rename the isSpace helper function to isWhiteSpace 2020-03-12 11:36:59 +01:00
crypto.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
document.js Remove variable shadowing from the JavaScript files in the src/core/ folder 2020-03-23 18:28:30 +01:00
encodings.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
evaluator.js [api-minor] Change Font.exportData to, by default, stop exporting properties which are completely unused on the main-thread and/or in the API (PR 11773 follow-up) 2020-04-06 11:47:09 +02:00
font_renderer.js Remove variable shadowing from the JavaScript files in the src/core/ folder 2020-03-23 18:28:30 +01:00
fonts.js Merge pull request #11746 from Snuffleupagus/issue-11740 2020-04-07 00:10:12 +02:00
function.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
glyphlist.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
image_utils.js Add basic validation of the scanLines parameter in JPEG images, before delegating decoding to the browser 2020-02-22 14:16:07 +01:00
image.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jbig2_stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jbig2.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jpeg_stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jpg.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jpx_stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
jpx.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
metrics.js Enable the ESLint no-shadow rule 2020-03-25 11:56:05 +01:00
murmurhash3.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
obj.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
operator_list.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
parser.js Enable the prefer-exponentiation-operator ESLint rule 2020-03-19 12:41:25 +01:00
pattern.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
pdf_manager.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
primitives.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
ps_parser.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
standard_fonts.js Use the same non-embedded Wingdings fallback for fonts named "Wingdings-Regular" too (PR 5463 follow-up, issue 11451) 2020-02-24 17:40:06 +01:00
stream.js Whitelist closure related cases to address the remaining no-shadow linting errors 2020-03-25 11:57:12 +01:00
type1_parser.js Make the decryptAscii helper function, in src/core/type1_parser.js, slightly more efficient 2020-04-06 11:21:02 +02:00
unicode.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
worker_stream.js Ensure that all import and require statements, in the entire code-base, have a .js file extension 2020-01-04 13:01:43 +01:00
worker.js Fail early, in modern GENERIC builds, if certain required browser functionality is missing (PR 11771 follow-up) 2020-04-11 13:42:03 +02:00