Fork me on GitHub
#hoplon
<
2017-06-28
>
thedavidmeister01:06:15

@flyboarder i put a corresponding issue up against closure, we can see what they say

thedavidmeister01:06:56

in the meantime i'm doing something like this myself

thedavidmeister01:06:58

(defn val
 [el]
 {:pre [(el? el)]}
 ; 
 (if (.-type el)
  (goog.dom.forms/getValue el)
  (.-value el)))

(defn val!
 [el v]
 {:pre [(el? el)]}
 ; 
 (let [v (if (seq? v) (map str v) (str v))]
  (if (.-type el)
   (goog.dom.forms/setValue el v)
   (set! (.-value el) (str v)))))

thedavidmeister03:06:49

@flyboarder looks like this one might get fixed upstream 🙂

thedavidmeister05:06:07

@flyboarder actually, looks like i have to BYO PR to get it fixed upstream 😛