-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[api-minor] Remove the document.currentScript
polyfill
#10517
[api-minor] Remove the document.currentScript
polyfill
#10517
Conversation
This polyfill is currently used in only *one* file, i.e. `src/display/api.js`, and only when trying to build a *fallback* `workerSrc` path. Given that the global `workerSrc` should *always* be set[1] when using the PDF.js library[2], and that the fallback `workerSrc` should only be regarded as a best-effort solution anyway, there isn't a particularily strong reason to keep the compatibility code in my opinion. --- [1] Other supported options include setting the global `workerPort`, or passing in a `PDFWorker` instance as part of the `getDocument` call. [2] Which is clearly mentioned in the JSDocs in `src/display/worker_options.js`.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2b76b4616cfa737/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2b76b4616cfa737/output.txt Total script time: 1.70 mins Published |
/botio unittest |
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/8bb24642fa7c78f/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/ffde2a38c17d8fa/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/8bb24642fa7c78f/output.txt Total script time: 2.55 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/ffde2a38c17d8fa/output.txt Total script time: 5.08 mins
|
Standardization is always good. Thank you! |
This polyfill is currently used in only one file, i.e.
src/display/api.js
, and only when trying to build a fallbackworkerSrc
path.Given that the global
workerSrc
should always be set[1] when using the PDF.js library[2], and that the fallbackworkerSrc
should only be regarded as a best-effort solution anyway, there isn't a particularily strong reason to keep the compatibility code in my opinion.[1] Other supported options include setting the global
workerPort
, or passing in aPDFWorker
instance as part of thegetDocument
call.[2] Which is clearly mentioned in the JSDocs in
src/display/worker_options.js
.