HS parser/compiler/mock: fix put positions, add CSS properties

Parser:
- Skip optional "the" in "at the start/end of" put targets
- Handle "style" token type in parse-add-cmd for *prop:value syntax

Compiler:
- Add set-style dispatch → dom-set-style for CSS property additions

Mock DOM:
- Position-aware insertAdjacentHTML: afterbegin prepends, beforeend appends
- Sync textContent after insertAdjacentHTML mutations

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-18 20:55:58 +00:00
parent be84246961
commit 5a0740d3ce
3 changed files with 87 additions and 53 deletions

View File

@@ -856,6 +856,12 @@
(quote dom-add-class)
(hs-to-sx raw-tgt)
(nth ast 1)))))
((= head (quote set-style))
(list
(quote dom-set-style)
(hs-to-sx (nth ast 3))
(nth ast 1)
(nth ast 2)))
((= head (quote multi-add-class))
(let
((target (hs-to-sx (nth ast 1)))