Move click on elem to before usage

This commit is contained in:
Nicholas Kariniemi 2014-08-07 22:28:33 +03:00
parent 660163c842
commit c4096a771a

View file

@ -4,12 +4,12 @@
(let [enter-keycode 13] (let [enter-keycode 13]
(= (.-which event) enter-keycode))) (= (.-which event) enter-keycode)))
(defn click-on-self? [event node]
(click-on-elem? event node))
(defn click-on-elem? [event node] (defn click-on-elem? [event node]
(.contains node (.-target event))) (.contains node (.-target event)))
(defn click-on-self? [event node]
(click-on-elem? event node))
(defn on-document-mousedown [f] (defn on-document-mousedown [f]
(.addEventListener js/document "mousedown" f)) (.addEventListener js/document "mousedown" f))