clojurescript - How can I get the DOM element from an Om DIV? -


i using clojurescript om , need access underlying dom element (so can set offsettop 0) on 1 of divs contained in component. how can access element?

you can use get-node. there example available here.

note component must mounted in order access dom element, therefore should invoke get-node in 1 of om lifecycle methods invoked after component mounted (e.g. did-mount).

if using om.next, should use node function instead.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -