Merge pull request #14885 from Snuffleupagus/mozcentral-rm-unbindEvents

Stop bundling `PDFViewerApplication.{unbindEvents, unbindWindowEvents}` in MOZCENTRAL builds
This commit is contained in:
Tim van der Meij 2022-05-08 13:35:22 +02:00 committed by GitHub
commit 7111a172df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1952,6 +1952,9 @@ const PDFViewerApplication = {
},
unbindEvents() {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
throw new Error("Not implemented: unbindEvents");
}
const { eventBus, _boundEvents } = this;
eventBus._off("resize", webViewerResize);
@ -2008,6 +2011,9 @@ const PDFViewerApplication = {
},
unbindWindowEvents() {
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
throw new Error("Not implemented: unbindWindowEvents");
}
const { _boundEvents } = this;
window.removeEventListener("visibilitychange", webViewerVisibilityChange);