pub fn apply_dynamic_scripts_with_runtime(
form: &mut FormTree,
root_id: FormNodeId,
mode: JsExecutionMode,
runtime: &mut dyn XfaJsRuntime,
) -> Result<DynamicScriptOutcome>Expand description
Phase B entry point that lets the caller inject a sandboxed runtime
adapter. When mode == JsExecutionMode::SandboxedRuntime the supplied
runtime is consulted for every JavaScript script whose <event activity>
is in crate::js_runtime::SANDBOX_ACTIVITY_ALLOWLIST. UI / submission
activities skip the runtime entirely and are recorded as js_skipped,
matching BestEffortStatic behaviour for those scripts.
Other modes ignore runtime entirely; callers that just need the
existing strict / best-effort behaviour should use
apply_dynamic_scripts_with_mode (which routes through
crate::js_runtime::NullRuntime).