JS -- Add a sandbox based on quickjs

* quickjs-eval.js has been generated using https://github.com/mozilla/pdf.js.quickjs/
 * lazy load of sandbox code
 * Rewrite tests to use the sandbox
 * Add a task `watch-sandbox` which update bundle pdf.sandbox.js on change in the sandbox code
This commit is contained in:
Calixte Denizet 2020-11-09 14:45:02 +01:00
parent d3936ac9d2
commit c7974e9996
15 changed files with 886 additions and 245 deletions

View file

@ -223,6 +223,14 @@ const defaultOptions = {
value: false,
kind: OptionKind.API,
},
scriptingSrc: {
/** @type {string} */
value:
typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION")
? "../build/generic/build/pdf.sandbox.js"
: "../build/pdf.sandbox.js",
kind: OptionKind.VIEWER,
},
verbosity: {
/** @type {number} */
value: 1,