Merge pull request #15512 from Snuffleupagus/issue-15509

[JS] Override the `Doc.external`-getter to avoid `alert`-modals on load (issue 15509)
This commit is contained in:
Jonas Jenwald 2022-09-26 21:59:58 +02:00 committed by GitHub
commit 5675a6ee64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,8 @@ import { PDFObject } from "./pdf_object.js";
import { PrintParams } from "./print_params.js";
import { ZoomType } from "./constants.js";
const DOC_EXTERNAL = false;
class InfoProxyHandler {
static get(obj, prop) {
return obj[prop.toLowerCase()];
@ -272,7 +274,10 @@ class Doc extends PDFObject {
}
get external() {
return true;
// According to the specification this should be `true` in non-Acrobat
// applications, however we ignore that to avoid bothering users with
// an `alert`-dialog on document load (see issue 15509).
return DOC_EXTERNAL;
}
set external(_) {