Is this the idiomatic way to initalize a JS object? I tried but was unable to wrangle it into a doto
form.
(let [img (js/Image.)]
(set! (.-src img) "foo.png")
img)
(doto (js/Image.) (set! -src "foo.png"))
I saw this link with cljs.reader https://cljs.github.io/api/cljs.reader/read-string
when I use it, I get undefined
Do I have to import something and/or add a dependency?
@ps (:require [cljs.reader :as reader])
in ns
and (reader/read-string ...)
after
thanks @thheller