mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
Pass in the "sandboxBundleSrc" option when calling DefaultExternalServices.createScripting
Similar to e.g. the "locale" option, this in *only* done for those build-targets where the "sandboxBundleSrc" is actually defined. With these changes we can remove an `AppOptions` dependency from the `web/generic_scripting.js` file, thus limiting *direct* `AppOptions` usage in the default viewer files.
This commit is contained in:
parent
d060cd2a61
commit
47ff3195e4
5 changed files with 14 additions and 10 deletions
|
@ -13,13 +13,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AppOptions } from "./app_options.js";
|
||||
import { loadScript } from "pdfjs-lib";
|
||||
|
||||
class GenericScripting {
|
||||
constructor() {
|
||||
constructor(sandboxBundleSrc) {
|
||||
this._ready = loadScript(
|
||||
AppOptions.get("sandboxBundleSrc"),
|
||||
sandboxBundleSrc,
|
||||
/* removeScriptElement = */ true
|
||||
).then(() => {
|
||||
return window.pdfjsSandbox.QuickJSSandbox();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue