Skip to content

Commit ee87e89

Browse files
committed
Update the GlobalWorkerOptions.workerSrc JSDoc comment
This particular JSDoc comment is fairly old and it also contains some now unrelated/confusing information. The only way to *guarantee* that the PDF.js library works as expected is to correctly set the global `workerSrc`[1], hence giving the impression that the option isn't strictly necessary is thus incorrect. --- [1] Since advertising the fallbackWorkerSrc functionality definitely seems like the *wrong* thing to do.
1 parent 40f531e commit ee87e89

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/display/worker_options.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ GlobalWorkerOptions.workerPort =
2525
: GlobalWorkerOptions.workerPort;
2626

2727
/**
28-
* Path and filename of the worker file. Required when workers are enabled in
29-
* development mode. If unspecified in production builds, the worker will be
30-
* loaded based on the location of the `pdf.js` file.
28+
* A string containing the path and filename of the worker file.
3129
*
32-
* NOTE: The `workerSrc` should always be set in custom applications, in order
33-
* to prevent issues caused by third-party frameworks and libraries.
30+
* NOTE: The `workerSrc` option should always be set, in order to prevent any
31+
* issues when using the PDF.js library.
3432
* @var {string}
3533
*/
3634
GlobalWorkerOptions.workerSrc =

0 commit comments

Comments
 (0)