   (close [this]
     (.close this ()))
 
-  event/EventType
+  event/IEventType
   (event-types [this]
     (into {}
-          (map
-           (fn [[k v]]
-             [(keyword (. k (toLowerCase)))
-              v])
-           (merge
-            (js->clj goog.net.WebSocket/EventType))))))
+      (map
+        (fn [[k v]]
+          [(keyword (. k (toLowerCase)))
+           v])
+        (merge
+          (js->clj WebSocket.EventType))))))
 
-#_(defn websocket-connection
+(defn websocket-connection
   ([]
      (websocket-connection nil nil))
   ([auto-reconnect?]
      (websocket-connection auto-reconnect? nil))
   ([auto-reconnect? next-reconnect-fn]
-     (goog.net.WebSocket. auto-reconnect? next-reconnect-fn)))
+     (WebSocket. auto-reconnect? next-reconnect-fn)))

  clojure.browser.net
  (:require [clojure.browser.event :as event]
            [goog.json :as gjson])
  (:import (goog.net XhrIo EventType)
           (goog.net.xpc CfgFields CrossPageChannel)
           goog.Uri))

(def *timeout* 10000)


  IConnection
  (connect
    ([this url]
     (connect this url nil))
    ([this url protocol]
     (.open this url protocol)))

  (transmit [this message]
    (.send this message))
