mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Use the new "reporttelemetry" event in more viewer components
By utilizing the recently added "reporttelemetry" event, we can avoid having to manually pass in `externalServices` to a number of viewer components.
This commit is contained in:
parent
f2d75d9221
commit
fe60db27b1
3 changed files with 16 additions and 18 deletions
|
@ -615,8 +615,7 @@ const PDFViewerApplication = {
|
|||
appConfig.toolbar,
|
||||
eventBus,
|
||||
l10n,
|
||||
await this._nimbusDataPromise,
|
||||
externalServices
|
||||
await this._nimbusDataPromise
|
||||
);
|
||||
} else {
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, l10n);
|
||||
|
@ -626,8 +625,7 @@ const PDFViewerApplication = {
|
|||
if (appConfig.secondaryToolbar) {
|
||||
this.secondaryToolbar = new SecondaryToolbar(
|
||||
appConfig.secondaryToolbar,
|
||||
eventBus,
|
||||
externalServices
|
||||
eventBus
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2141,7 +2139,6 @@ const PDFViewerApplication = {
|
|||
eventBus._off("fileinputchange", webViewerFileInputChange);
|
||||
eventBus._off("openfile", webViewerOpenFile);
|
||||
}
|
||||
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
||||
eventBus._off("reporttelemetry", webViewerReportTelemetry);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue