pdf.js/test
Jonas Jenwald 1cf9405281 [api-minor] Remove the closure from the PDFWorker class, in the src/display/api.js file
This patch removes the only remaining closure in the `src/display/api.js` file, utilizing a similar approach as used in lots of other parts of the code-base, which results in a small decrease in the size of the *build* `pdf.js` file.

Given that `PDFWorker` is exposed through the *public* API, this complicates things somewhat since there's a couple of worker-related properties that really should stay *private*. Initially, while working on PR 13813, I believed that we'd need support for private (static) class fields in order to get rid of this closure, however I've managed to come up with what's hopefully deemed an acceptable work-around here.
Furthermore, some helper functions were simply moved into the `PDFWorker` class as static methods, thus simplifying the overall implementation (e.g. we don't need to manually cache the Promise in the `PDFWorker._setupFakeWorkerGlobal`-method).

Finally, as part of this re-factoring a number of missing JSDoc-comments were added which *together* with the removal of the closure significantly improves the `gulp jsdoc` output for the `PDFWorker` class.

*Please note:* This patch is tagged with `api-minor` since it deprecates `PDFWorker.getWorkerSrc()` in favor of the shorter `PDFWorker.workerSrc`, with the fallback limited to `GENERIC` builds.
2021-08-07 10:43:39 +02:00
..
chromium Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
font Add non-PRODUCTION/TESTING overflow asserts to various string helper-functions (issue 6759) 2021-06-27 16:06:30 +02:00
integration Remove the LGTM configuration and inline disable comments (issue 13829) 2021-08-03 11:14:49 +02:00
pdfs Merge pull request #13856 from calixteman/xfa_layout_rounding 2021-08-04 10:09:13 +02:00
resources Change the hashParameters function to return a Map rather than an Object (issue 13862) 2021-08-04 15:17:13 +02:00
stats Enable the ESLint no-var rule in the test/stats/ folder 2021-03-14 10:15:45 +01:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
types Add basic linting of JSON files using eslint-plugin-json 2021-06-15 12:19:01 +02:00
unit [api-minor] Remove the closure from the PDFWorker class, in the src/display/api.js file 2021-08-07 10:43:39 +02:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.js Enable the ESLint no-var rule in test/add_test.js 2021-03-14 10:25:51 +01:00
annotation_layer_builder_overrides.css Enable the Stylelint length-zero-no-unit rule 2021-01-10 14:09:36 +01:00
downloadutils.js Drop obsolete logic from the downloadFile function in test/downloadutils.js 2021-05-22 14:45:42 +02:00
driver.js Add a special gulp xfatest command, to limit the ref-tests to only XFA-documents (issue 13744) 2021-08-03 23:41:10 +02:00
integration-boot.js Fix position of highlighted all text. (#13306) 2021-04-28 10:15:31 +02:00
test_manifest.json Merge pull request #13856 from calixteman/xfa_layout_rounding 2021-08-04 10:09:13 +02:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
test.js Add a special gulp xfatest command, to limit the ref-tests to only XFA-documents (issue 13744) 2021-08-03 23:41:10 +02:00
testutils.js Enable the ESLint no-var rule globally 2021-03-13 16:12:53 +01:00
text_layer_test.css Fix highlighting of search results when the textLayer contains br-elements (PR 13257 follow-up, issue 13323) 2021-05-02 15:36:01 +02:00
webserver.js Remove the LGTM configuration and inline disable comments (issue 13829) 2021-08-03 11:14:49 +02:00