我想从 clojurescript 设置一个 element.style.height 属性,但不幸的是这段代码失败了:
(set! (-> (sel1 tr :.ragslide) .-style .-height) (content-height))
(sel1 选择一个 DOM 元素,它是 Dommy 库中的一个宏)
出现以下错误:
clojure.lang.ExceptionInfo:
Assert failed: Can't set! local var or non-mutable field
(or (nil? local) (and (:field local) (or (:mutable local) (:unsynchronized-mutable local) (:volatile-mutable local)))) at line 79 {:tag :cljs/analysis-error, :file nil, :line 79, :column 7}
如何设置该属性?