cljs.repl.browser/send-for-eval
function | since v0.0-927 | Edit |
(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.
(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")))