mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
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:
parent
e00629966d
commit
690adb093e
2 changed files with 12 additions and 13 deletions
|
@ -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}".`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue