HS: halt command modes, mock event methods
Parser: - halt default/bubbling: match ident type (not just keyword) - halt the event's: consume possessive marker Runtime: - hs-halt! dispatches: default→preventDefault, bubbling→stopPropagation, event→both Mock DOM: - Add event method dispatch: preventDefault, stopPropagation, stopImmediatePropagation set correct flags on event dict Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -222,8 +222,13 @@
|
||||
(mode)
|
||||
(when
|
||||
event
|
||||
(host-call event "preventDefault" (list))
|
||||
(when (= mode "event") (host-call event "stopPropagation" (list))))))
|
||||
(cond
|
||||
((= mode "default") (host-call event "preventDefault"))
|
||||
((= mode "bubbling") (host-call event "stopPropagation"))
|
||||
(true
|
||||
(do
|
||||
(host-call event "preventDefault")
|
||||
(host-call event "stopPropagation")))))))
|
||||
|
||||
;; ── Type coercion ───────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user