Merge PR #3985: M6: a document script that throws no longer stops the form's other scripts (#3940)

crates/automation/src/tools.rs: js_run description: both sides' wording merged.
This commit is contained in:
aiongg
2026-10-24 06:22:15 +00:00
9 changed files with 204 additions and 16 deletions
+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"