                              :promised-conn nil
                              :return-value-fn nil
                              :client-js nil}))
+
+(def loaded-libs (atom #{}))
 
 (defn- connection
   "Promise to return a connection when one is available. If a

    (if-let [request (read-request rdr)]
      (case (:method request)
        :get (handle-get opts conn request)
        :post (do (when-not (= (:content request) "ready")
                    (return-value (:content request)))
                  (set-connection conn))
        (.close conn))
      (.close conn))))


(extend-protocol repl/IJavaScriptEnv
  clojure.lang.IPersistentMap
  (-setup [this]
    (comp/with-core-cljs (start-server this)))
  (-evaluate [_ _ js] (browser-eval js))
  (-load [this ns url] (load-javascript this ns url))
  (-put [_ _ _] nil)
