              {:status :error
               :value (str "Could not read return value: " ret)})))))
 
-(defn- object-query-str
-  "Given a list of goog namespaces, create a JavaScript string which, when evaluated,
-  will return true if all of the namespaces exist and false if any do not exist."
-  [ns]
-  (str "if("
-       (apply str (interpose " && " (map #(str "goog.getObjectByName('" (name %) "')") ns)))
-       "){true}else{false};"))
-
-(defn load-javascript [repl-env ns url]
-  (let [missing (remove #(contains? @loaded-libs %) ns)]
+(defn load-javascript
+  "Accepts a REPL environment, a list of namespaces, and a URL for a
+  JavaScript file which contains the implementation for the list of
+  namespaces. Will load the JavaScript file into the REPL environment
+  if any of the namespaces have not already been loaded from the
+  ClojureScript REPL."
+  [repl-env ns-list url]
+  (let [missing (remove #(contains? @loaded-libs %) ns-list)]
     (when (seq missing)
-      (let [ret (browser-eval (object-query-str ns))]
-        (when-not (and (= (:status ret) :success)
-                       (= (:value ret) "true"))
-          (browser-eval (slurp url))))
+      (browser-eval (slurp url))
       (swap! loaded-libs (partial apply conj) missing))))
 
 (extend-protocol repl/IJavaScriptEnv

                             :client-js nil}))

(def loaded-libs (atom #{}))

(defn- connection
  "Promise to return a connection when one is available. If a

(defmulti handle-post (fn [_ m] (:type m)))

(defmethod handle-post :ready [conn _]
  (do (reset! loaded-libs @preloaded-libs)
      (send ordering (fn [_] {:expecting nil :fns {}}))
      (send-for-eval conn
                     (cljsc/-compile
