Merge pull request #17593 from Snuffleupagus/debuggerSrc-AppOptions
Move the `debuggerSrc`-parameter into the `AppOptions`
This commit is contained in:
commit
802f702695
@ -2167,11 +2167,10 @@ async function loadFakeWorker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadPDFBug(self) {
|
async function loadPDFBug(self) {
|
||||||
const { debuggerScriptPath } = self.appConfig;
|
|
||||||
const { PDFBug } =
|
const { PDFBug } =
|
||||||
typeof PDFJSDev === "undefined"
|
typeof PDFJSDev === "undefined"
|
||||||
? await import(debuggerScriptPath) // eslint-disable-line no-unsanitized/method
|
? await import(AppOptions.get("debuggerSrc")) // eslint-disable-line no-unsanitized/method
|
||||||
: await __non_webpack_import__(debuggerScriptPath);
|
: await __non_webpack_import__(AppOptions.get("debuggerSrc"));
|
||||||
|
|
||||||
self._PDFBug = PDFBug;
|
self._PDFBug = PDFBug;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,11 @@ const defaultOptions = {
|
|||||||
value: 0,
|
value: 0,
|
||||||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
||||||
},
|
},
|
||||||
|
debuggerSrc: {
|
||||||
|
/** @type {string} */
|
||||||
|
value: "./debugger.mjs",
|
||||||
|
kind: OptionKind.VIEWER,
|
||||||
|
},
|
||||||
defaultZoomDelay: {
|
defaultZoomDelay: {
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
value: 400,
|
value: 400,
|
||||||
|
@ -177,7 +177,6 @@ function getViewerConfiguration() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
printContainer: document.getElementById("printContainer"),
|
printContainer: document.getElementById("printContainer"),
|
||||||
debuggerScriptPath: "./debugger.mjs",
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user