Fix HS put-into and query: compiler emits hs-query-first, runtime uses real DOM

Two bugs found by automated test suite:
1. compiler.sx: query → hs-query-first (was dom-query, a deleted stub)
2. compiler.sx: emit-set with query target → dom-set-inner-html (was set!)
3. runtime.sx: hs-query-first uses real document.querySelector
4. runtime.sx: delete hs-dom-query stub (returned empty list)

All 8/8 HS elements pass: toggle, bounce+wait, count, add-class,
toggle-between, set-innerHTML-eval, put-into-target, repeat-3-times.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 06:50:57 +00:00
parent 0a2d7768dd
commit 42a7747d02
7 changed files with 34 additions and 33 deletions

View File

@@ -47,6 +47,8 @@
((= th (quote me))
(list (quote dom-set-inner-html) (quote me) value))
((= th (quote it)) (list (quote set!) (quote it) value))
((= th (quote query))
(list (quote dom-set-inner-html) (hs-to-sx target) value))
(true (list (quote set!) (hs-to-sx target) value)))))))
(define
emit-on
@@ -483,7 +485,7 @@
(true (list (quote host-get) target prop)))))
((= head (quote ref)) (make-symbol (nth ast 1)))
((= head (quote query))
(list (quote dom-query) (nth ast 1)))
(list (quote hs-query-first) (nth ast 1)))
((= head (quote attr))
(list
(quote dom-get-attr)