Remove the deprecated properties from the "presentationmodechanged" event (PR 12788 follow-up)

These properties have been deprecated in two releases now, hence we shouldn't need to keep this code around.
This commit is contained in:
Jonas Jenwald 2021-04-06 13:04:23 +02:00
parent 6ddc297170
commit b2758c3023

View File

@ -155,28 +155,10 @@ class PDFPresentationMode {
} else if (this.active) {
state = PresentationModeState.FULLSCREEN;
}
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
this.eventBus.dispatch("presentationmodechanged", {
source: this,
state,
});
} else {
this.eventBus.dispatch("presentationmodechanged", {
source: this,
state,
get active() {
throw new Error(
"Deprecated parameter: `active`, please use `state` instead."
);
},
get switchInProgress() {
throw new Error(
"Deprecated parameter: `switchInProgress`, please use `state` instead."
);
},
});
}
this.eventBus.dispatch("presentationmodechanged", {
source: this,
state,
});
}
/**