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:
parent
83658c974d
commit
2dfac4cb41
7 changed files with 459 additions and 104 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue