M6: parity note for document scripts that throw (#3940)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mtlcl410
2026-10-23 22:25:57 +08:00
co-authored by Claude Opus 5.5
parent cc029124e2
commit 77db1bd27f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -181,8 +181,8 @@ pub struct Outcome {
pub requests: Vec<Request>,
/// The script's error (syntax error, exception, or a limit reached), if it failed.
pub error: Option<String>,
/// 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<String>,
/// The script's completion value (what the console prints), unless undefined.
pub result: Option<String>,
+2 -2
View File
@@ -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"