From 77db1bd27faf87792358e089b7ff437b09a0e2c3 Mon Sep 17 00:00:00 2001 From: mtlcl410 <2368091+mtlcl410@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:33:26 +0800 Subject: [PATCH] M6: parity note for document scripts that throw (#3940) Co-Authored-By: Claude Opus 5.5 --- crates/js/src/lib.rs | 4 ++-- parity/acrobat-features.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/js/src/lib.rs b/crates/js/src/lib.rs index 4a2c2f666..81633d597 100644 --- a/crates/js/src/lib.rs +++ b/crates/js/src/lib.rs @@ -181,8 +181,8 @@ pub struct Outcome { pub requests: Vec, /// The script's error (syntax error, exception, or a limit reached), if it failed. pub error: Option, - /// Errors in the document-level scripts that ran first. Each failing one stops where it - /// failed; the others and the script itself still run, as in Acrobat (#3940). + /// Errors in the document-level scripts that ran first. Each is a script of its own: one + /// that throws stops where it failed, and the others and the script itself still run (#3940). pub doc_errors: Vec, /// The script's completion value (what the console prints), unless undefined. pub result: Option, diff --git a/parity/acrobat-features.toml b/parity/acrobat-features.toml index 973e0cc69..f416435ae 100644 --- a/parity/acrobat-features.toml +++ b/parity/acrobat-features.toml @@ -5141,8 +5141,8 @@ milestone = "M6" status = "shipped" commands = ["tools.document_js"] tools = ["js_document_scripts", "js_set_document_script"] -evidence = ["crates/ui-egui/tests/it/javascript.rs::document_scripts_and_preferences", "crates/automation/tests/it/automation.rs::javascript_through_tools", "crates/engine/src/tests.rs::form_javascript_validates_calculates_and_formats"] -notes = "Names /JavaScript tree: list, add, edit, delete; functions are available to field scripts." +evidence = ["crates/ui-egui/tests/it/javascript.rs::document_scripts_and_preferences", "crates/automation/tests/it/automation.rs::javascript_through_tools", "crates/engine/src/tests.rs::form_javascript_validates_calculates_and_formats", "crates/engine/src/tests.rs::a_document_script_that_throws_still_lets_the_form_calculate"] +notes = "Names /JavaScript tree: list, add, edit, delete; functions are available to field scripts. A script that throws (calling an Acrobat method PdfCraft lacks, say) stops where it failed, but the others and the field scripts still run and the error is reported once (js_run's document_errors, the console) (#3940). Not like Acrobat: the scripts run again before every field script instead of once when the document opens, so what they do at top level repeats." [[feature]] id = "form.document-actions"