Commits

Lucian Brănescu-Mihăilă  committed 495c9bb

Log fn. listen for event type.

  • Participants
  • Parent commits 03f5bf8

Comments (0)

Files changed (1)

File src-cljs/lichen/main.cljs

 (defn get [selector]
   (.querySelector js/document selector))
 
+(defn log [msg]
+  (.log js/console msg))
+
 (defn on-load [f]
-  (.addEventListener js/document f))
+  (.addEventListener js/document "load" f))
 
 (defn init [doc]
-  (.log js/console "init"))
+  (js/alert "Hello world")
+  (log "init"))
 
 (on-load init)