I am using doto to assign properties of a Dom element in ClojureScript, as below:
(let [img
(doto (.createElement js/document "img")
(set! -src "bunny-512.png")
(set! -height 64)
(set! -width 64))]
;...
)
Is there a way to do set all the properties at once via a map of properties+values instead?
Was thinking something like:
(let [img (.createElement js/document "img")]
(set! img {:src "bunny-512.png" :height 64 :width 64})
But that does not work ...