Fix demo in node

This commit is contained in:
Dan Holmsand 2015-12-21 09:23:00 +01:00
parent 2e568c9876
commit 3ec786c64b
1 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,12 @@
#_(r/dispose! logger) #_(r/dispose! logger)
(when-not (exists? js/document)
;; Add no-op methods for node.js
(set! js/global.document
#js{:addEventListener identity
:removeEventListener identity}))
(defn mouse-pos-comp [] (defn mouse-pos-comp []
(r/with-let [pointer (r/atom nil) (r/with-let [pointer (r/atom nil)
handler #(swap! pointer assoc handler #(swap! pointer assoc