HS: behavior cluster — install + element's subscript fix (+2 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 38s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 38s
- install BehaviorName: parse-set-cmd handles `element` separately so `element's foo` after `set` invokes parse-poss rather than parse-expr, fixing `set element's bar["count"] to X` inside behavior bodies - parse-poss-tail ident case: call parse-poss (handles `[`) instead of parse-prop-chain (does not) when next token is bracket-open - hs-activate!: replace (handler el) with host-call-fn safe wrapper so native OCaml "Undefined symbol" throws (which bypass SX guard frames) are caught at the JS api_call_fn boundary rather than propagating Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -115,15 +115,21 @@
|
||||
(dom-set-data el "hs-script" src)
|
||||
(dom-set-data el "hs-active" true)
|
||||
(dom-set-attr el "data-hyperscript-powered" "true")
|
||||
(let
|
||||
((handler (hs-handler src)))
|
||||
(guard
|
||||
(_e (true nil))
|
||||
(let
|
||||
((el-type (dom-get-attr el "type"))
|
||||
(comp-name (dom-get-attr el "component")))
|
||||
(if
|
||||
(= el-type "text/hyperscript-template")
|
||||
(for-each handler (hs-query-all (or comp-name "")))
|
||||
(handler el))))
|
||||
((handler (hs-handler src)))
|
||||
(let
|
||||
((el-type (dom-get-attr el "type"))
|
||||
(comp-name (dom-get-attr el "component")))
|
||||
(let
|
||||
((safe-handler (fn (e) (host-call-fn handler (list e)))))
|
||||
(if
|
||||
(= el-type "text/hyperscript-template")
|
||||
(for-each
|
||||
safe-handler
|
||||
(hs-query-all (or comp-name "")))
|
||||
(safe-handler el))))))
|
||||
(dom-dispatch el "hyperscript:after:init" nil)))))))
|
||||
|
||||
;; ── Boot subtree: for dynamic content ───────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user