 (ns chatapp.core)
 
-(defn ^:export output [style text]
+(defn output [style text]
   (let [messages         (.getElementById js/document "messages")
         current-messages (.-innerHTML messages)
         current-message  (str "<br/><span class='" style "'>" text "</span>")]
     (set! (.-innerHTML messages) (str current-messages current-message))))
 
-(defn ^:export onmessage [event]
+(defn onmessage [event]
   (output "received" (str "<<< " (.-data event))))
 
-(defn ^:export onerror [error]
+(defn onerror [error]
   (output "error" error))
 
-(defn ^:export onopen [event]
+(defn onopen [event]
   (let [current-target (.-currentTarget event)]
     (output "opened" (str "Connected to " (.-url current-target)))))
 


(def socket (atom nil))

(defn ^:export oonclick [event]
  (output "click" "Button Clicked")

  (.preventDefault event)


    (reset! socket websocket)))

(defn sonclick [event]
  (let [input (.getElementById js/document "input")
        text  (.-value input)]
    (.send @socket text)
    (output "sent" (str ">>> " text))))

(defn conclick [event]
  (.close @socket 1000 "Close button clicked"))

(defn onload []
