1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Output pdf.scripting.js as a JavaScript module (PR 17055 follow-up)

To avoid problems with `export` statements in the QuickJS Javascript Engine, we can work-around that by *explicitly* exposing `pdfjsScripting` globally instead.
This commit is contained in:
Jonas Jenwald 2023-10-06 17:26:14 +02:00
parent bab4c7f617
commit 4b489cd4e6
2 changed files with 9 additions and 34 deletions

View file

@ -22,4 +22,6 @@ const pdfjsVersion =
const pdfjsBuild =
typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : void 0;
export { initSandbox };
// To avoid problems with `export` statements in the QuickJS Javascript Engine,
// we manually expose `pdfjsScripting` globally instead.
globalThis.pdfjsScripting = { initSandbox };