Re-factor how the debugger accesses API-functionality

Given that the `debugger` is loaded as a module we can use "top level await" in development mode to access the necessary API-functionality, which removes the need to manually pass in the required properties.
This commit is contained in:
Jonas Jenwald 2023-07-21 16:30:28 +02:00
parent e00629966d
commit 690adb093e
2 changed files with 12 additions and 13 deletions

View file

@ -46,7 +46,6 @@ import {
isPdfFile,
loadScript,
MissingPDFException,
OPS,
PDFWorker,
PromiseCapability,
shadow,
@ -375,7 +374,7 @@ const PDFViewerApplication = {
const enabled = params.get("pdfbug").split(",");
try {
await loadPDFBug(this);
this._PDFBug.init({ OPS }, mainContainer, enabled);
this._PDFBug.init(mainContainer, enabled);
} catch (ex) {
console.error(`_parseHashParams: "${ex.message}".`);
}