Commits

Lucian Brănescu-Mihăilă  committed e67566c

On-load get canvas with goog.

  • Participants
  • Parent commits 7075341

Comments (0)

Files changed (3)

 target
 
 .lein-*
-
+.idea

File src-cljs/lichen/main.cljs

-(ns lichen.main)
+(ns lichen.main
+  (:require [goog.events as gevents]))
 
-(js/alert "Hello world!")
+(defn get [selector]
+  (.querySelector js/document selector))
+
+(defn on-load [f]
+  (.listen goog.events js/window goog.events.EventType.LOAD f))
+
+(defn init [doc]
+  (.log js/console "init"))
+
+(on-load init)
+
+;(js/alert "Hello world!")

File src/lichen/views/welcome.clj

 
 (defpage "/welcome" []
   (common/layout
-    [:p "Welcome to lichen"]))
+    [:p "Welcome to lichen"]
+    [:canvas]))