Merge pull request #17098 from Snuffleupagus/createCDNWrapper-import

Tweak `PDFWorkerUtil.createCDNWrapper` to account for JavaScript modules (PR 17055 follow-up)
This commit is contained in:
Tim van der Meij 2023-10-14 12:05:46 +02:00 committed by GitHub
commit 7dfe08a0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2007,7 +2007,7 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
// We will rely on blob URL's property to specify origin.
// We want this function to fail in case if createObjectURL or Blob do not
// exist or fail for some reason -- our Worker creation will fail anyway.
const wrapper = `importScripts("${url}");`;
const wrapper = `await import("${url}");`;
return URL.createObjectURL(new Blob([wrapper]));
};
}