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

JS -- Fix events dispatchment and add tests

* dispatch event to take into account calculation order
 * use a map for actions in Field
This commit is contained in:
Calixte Denizet 2020-11-03 19:24:07 +01:00
parent 83658c974d
commit 2dfac4cb41
7 changed files with 459 additions and 104 deletions

View file

@ -1369,6 +1369,7 @@ const PDFViewerApplication = {
if (!objects || !AppOptions.get("enableScripting")) {
return;
}
const calculationOrder = await pdfDocument.getCalculationOrderIds();
const scripting = this.externalServices.scripting;
const {
info,
@ -1431,7 +1432,6 @@ const PDFViewerApplication = {
});
const dispatchEventName = generateRandomStringForSandbox(objects);
const calculationOrder = [];
const { length } = await pdfDocument.getDownloadInfo();
const filename =
contentDispositionFilename || getPDFFileNameFromURL(this.url);