mozilla/pdf.js — pull request #3947 by gjuggler (2013-11-20 23:26:01+00:00)
Title: Skip loading worker src when PDFJS.workerSrc = 'none'

We're using pdf.js in a build environment where we're pre-concatenating all of our sources before loading into a webpage. We set PDFJS.disableWorker = true, but even then the worker loading logic would always attempt to load a separate pdf.worker.js Javascript file.

Our solution was to add some logic to specifically recognize a PDFJS.workerSrc = 'none' value, in which case the loading is skipped and the promise is returned.

Maybe this would be helpful for other integrators who wish to avoid relying on a predictable path for the associated JS file?