Always set AppOptions.eventBus, regardless of build, to make local testing easier
This commit is contained in:
parent
7c9d177826
commit
07e8afb247
14
web/app.js
14
web/app.js
@ -376,18 +376,16 @@ const PDFViewerApplication = {
|
|||||||
async _initializeViewerComponents() {
|
async _initializeViewerComponents() {
|
||||||
const { appConfig, externalServices, l10n } = this;
|
const { appConfig, externalServices, l10n } = this;
|
||||||
|
|
||||||
let eventBus;
|
const eventBus =
|
||||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")
|
||||||
eventBus = AppOptions.eventBus = new FirefoxEventBus(
|
? new FirefoxEventBus(
|
||||||
AppOptions.get("allowedGlobalEvents"),
|
AppOptions.get("allowedGlobalEvents"),
|
||||||
externalServices,
|
externalServices,
|
||||||
AppOptions.get("isInAutomation")
|
AppOptions.get("isInAutomation")
|
||||||
);
|
)
|
||||||
} else {
|
: new EventBus();
|
||||||
eventBus = new EventBus();
|
this.eventBus = AppOptions.eventBus = eventBus;
|
||||||
}
|
|
||||||
this.mlManager?.setEventBus(eventBus, this._globalAbortController.signal);
|
this.mlManager?.setEventBus(eventBus, this._globalAbortController.signal);
|
||||||
this.eventBus = eventBus;
|
|
||||||
|
|
||||||
this.overlayManager = new OverlayManager();
|
this.overlayManager = new OverlayManager();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user