plumatic / dommy

A tiny ClojureScript DOM manipulation and event library
759 stars 74 forks source link

attr sel1 returns old value of input field #54

Closed justinhj closed 10 years ago

justinhj commented 10 years ago

When I change the value of an input field the value returned is the original value, not the new value. For example running the js below returns the new value:

document.getElementById("test").value

But the cljs code below returns the old value:

(dommy/attr (sel1 :#test) :value)

Is there something I need to do to refresh it, or am I misunderstanding something?

justinhj commented 10 years ago

Never mind, I found the value function does what I need.