[api-major] Remove various deprecated functionality and options

This commit is contained in:
Jonas Jenwald 2023-07-31 11:20:14 +02:00
parent 0fc0dc3960
commit f87ec67ab1
6 changed files with 1 additions and 91 deletions

View file

@ -1040,22 +1040,6 @@ const PDFViewerApplication = {
* @returns {Promise} - Promise that is resolved when the document is opened.
*/
async open(args) {
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
let deprecatedArgs = false;
if (typeof args === "string") {
args = { url: args }; // URL
deprecatedArgs = true;
} else if (args?.byteLength) {
args = { data: args }; // ArrayBuffer
deprecatedArgs = true;
}
if (deprecatedArgs) {
console.error(
"The `PDFViewerApplication.open` signature was updated, please use an object instead."
);
}
}
if (this.pdfLoadingTask) {
// We need to destroy already opened document.
await this.close();