clojurescript Adding Event to Button Using Closure Library


   [goog.dom :as dom]
   [ :as events]))

(defn handle-click [event] ;an event object is passed to all events
  (js/alert "button pressed"))

 (dom/getElement "button"); This is the dom element the event comes from
 (.-CLICK events/EventType); This is a string or array of strings with the event names. 
;;All event names can be found in the EventType enum
 handle-click ;function that should handle the event

Google Closure does not support page-load events, and considers them to be not idiomatic. They recommend inserting scripts inline as soon as the content they to access has loaded.