Files
rose-ash/spec
giles f5da2bcfd5 Step 18 (part 6): _hyperscript integration — _="..." attribute wiring
lib/hyperscript/integration.sx — connects compiled hyperscript to DOM:
  hs-handler(src) — compile source → callable (fn (me) ...) via eval-expr-cek
  hs-activate!(el) — read _="...", compile, execute with me=element
  hs-boot!() — scan document for [_] elements, activate all
  hs-boot-subtree!(root) — activate within subtree (for HTMX swaps)

Handler wraps compiled SX in (fn (me) (let ((it nil) (event nil)) ...))
so each element gets its own me binding and clean it/event state.
Double-activation prevented via data-hs-active marker.

12 integration tests verify full pipeline: source → compile → eval.
Handlers correctly bind me, support arithmetic, conditionals, sequences,
for loops, and repeat. 3111/3111 full build, zero regressions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:48:58 +00:00
..