1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

JS -- Add tests for print/save actions

* change PDFDocument::hasJSActions to return true when there are JS actions in catalog.
This commit is contained in:
Calixte Denizet 2020-12-23 18:57:44 +01:00
parent df53e7811c
commit ffd4bc790c
8 changed files with 144 additions and 453 deletions

View file

@ -1038,10 +1038,11 @@ class PDFDocument {
"hasJSActions",
this.fieldObjects.then(fieldObjects => {
return (
fieldObjects !== null &&
Object.values(fieldObjects).some(fieldObject =>
fieldObject.some(object => object.actions !== null)
)
(fieldObjects !== null &&
Object.values(fieldObjects).some(fieldObject =>
fieldObject.some(object => object.actions !== null)
)) ||
!!this.catalog.jsActions
);
})
);