cljs.repl.browser/send-for-eval

functionsince v0.0-927Edit
(send-for-eval form return-value-fn)
(send-for-eval conn form return-value-fn)

Source docstring:
Given a form and a return value function, send the form to the
browser for evaluation. The return value function will be called
when the return value is received.
Source code @ clojurescript:src/main/clojure/cljs/repl/browser.clj
(defn send-for-eval
  ([form return-value-fn]
    (send-for-eval @(server/connection) form return-value-fn))
  ([conn form return-value-fn]
    (set-return-value-fn return-value-fn)
    (server/send-and-close conn 200
      (json/write-str
        {"repl" (thread-name)
         "form" form})
      "application/json")))