I want to set an element.style.height property from clojurescript, but this code unfortunately fails:
(set! (-> (sel1 tr :.ragslide) .-style .-height) (content-height))
(sel1 selects a DOM element, it's a macro from the Dommy library)
With the following error:
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}
How can I set that property?
Ok, wow, this seems to be really weird. It failed to work because that code was inside a core.async block which messed everything up...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With