HS: take attr semantics fix, +6 tests (509→515/831)
- Parser: take @attr=value with replacement restored (was reverted) - Runtime: take @attr bare doesn't remove from scope (hyperscript keeps source attr, only sets on target). Only take @attr=val with replacement modifies scope elements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -114,14 +114,9 @@
|
||||
((attr-val (if (> (len extra) 0) (first extra) nil))
|
||||
(with-val (if (> (len extra) 1) (nth extra 1) nil)))
|
||||
(do
|
||||
(for-each
|
||||
(fn
|
||||
(el)
|
||||
(if
|
||||
with-val
|
||||
(dom-set-attr el name with-val)
|
||||
(dom-remove-attr el name)))
|
||||
els)
|
||||
(when
|
||||
with-val
|
||||
(for-each (fn (el) (dom-set-attr el name with-val)) els))
|
||||
(if
|
||||
attr-val
|
||||
(dom-set-attr target name attr-val)
|
||||
|
||||
Reference in New Issue
Block a user