The problem
Hypermedia swaps and clientinnerHTML insert new markup after the initial mount. That HTML is not wired to the page signal store unless you manually re-run binding setup.
How Aero helps
process(element) scans a DOM subtree for data-aero-* directives and attaches the same binding handlers used at initial mount. Hypermedia swaps call process automatically when both flags are on. See Using hypermedia with reactivity.
Hypermedia (automatic)
When bothreactivity: true and hypermedia: true are set, swapped fragment HTML is processed into the shared page store. Compiled regions go through destroy → swap → remount/process so bindings stay consistent.
No extra client code is required for standard action targets.
Manual process from client scripts
Insert HTML withdata-aero-* attributes, then process:
$ to read from the page store ($note, $showNote).
Restricted grammar (default)
process() is eval-free. Supported attribute values:
- Store refs:
$note,$items,$auth.state - Structural:
$statusor string literals (loading,"error") - Events: hypermedia action grammar only (
GET('/path')) — wired by hypermediaprocess()before reactivity runs
{ count + 1 }) is rejected. Use <script is:state> for compiled bindings, or unsafeProcessFragment() from @aero-js/reactivity for trusted dynamic HTML only. See CSP and eval-free reactivity.
Structural fragments
Runtime HTML can include structural directives:process(host) after inserting the markup.
Package API
Lower-level helpers live in@aero-js/reactivity:
@aero-js/core rather than calling these directly. unsafeProcessFragment is not re-exported from @aero-js/core.