mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Always set AppOptions.eventBus
, regardless of build, to make local testing easier
This commit is contained in:
parent
7c9d177826
commit
07e8afb247
1 changed files with 9 additions and 11 deletions
20
web/app.js
20
web/app.js
|
@ -376,18 +376,16 @@ const PDFViewerApplication = {
|
|||
async _initializeViewerComponents() {
|
||||
const { appConfig, externalServices, l10n } = this;
|
||||
|
||||
let eventBus;
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
eventBus = AppOptions.eventBus = new FirefoxEventBus(
|
||||
AppOptions.get("allowedGlobalEvents"),
|
||||
externalServices,
|
||||
AppOptions.get("isInAutomation")
|
||||
);
|
||||
} else {
|
||||
eventBus = new EventBus();
|
||||
}
|
||||
const eventBus =
|
||||
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
|
||||
? new FirefoxEventBus(
|
||||
AppOptions.get("allowedGlobalEvents"),
|
||||
externalServices,
|
||||
AppOptions.get("isInAutomation")
|
||||
)
|
||||
: new EventBus();
|
||||
this.eventBus = AppOptions.eventBus = eventBus;
|
||||
this.mlManager?.setEventBus(eventBus, this._globalAbortController.signal);
|
||||
this.eventBus = eventBus;
|
||||
|
||||
this.overlayManager = new OverlayManager();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue