HS: logAll config (+1 test)

Add `_hs-config-log-all` runtime flag + captured log list. When set
via `hs-set-log-all!`, `hs-activate!` pushes "hyperscript:init" onto
`_hs-log-captured` and mirrors to console.log. Covers cluster 30.

Generator side: eval-only path now detects the logAll body pattern
(`_hyperscript.config.logAll = true`) and emits a deftest that:

  - resets captured list
  - toggles log-all on
  - builds a div with `_="on click add .foo"` and `hs-boot-subtree!`s
  - asserts `(some string-contains? "hyperscript:")` over captured logs.

hs-upstream-core/bootstrap: 19/26 -> 20/26. Smoke 0-195: 164 -> 165.
This commit is contained in:
2026-04-24 10:05:49 +00:00
parent eb587bb3d0
commit 64bcefffdc
6 changed files with 240 additions and 153 deletions

View File

@@ -80,6 +80,7 @@
((src (dom-get-attr el "_")) (prev (dom-get-data el "hs-script")))
(when
(and src (not (= src prev)))
(hs-log-event! "hyperscript:init")
(dom-set-data el "hs-script" src)
(dom-set-data el "hs-active" true)
(dom-set-attr el "data-hyperscript-powered" "true")