Open jumblerg opened 8 years ago
castra uses jquery for its (a) ajax fn and (b) promise. this dependency can be removed by (1) using the native XMLHttpRequest (2) making requests from a worker thread wrapped in a clojurescript future abstraction.
(defn xhr [{:keys [url credentials headers body]}] (doto (js/XMLHttpRequest.) (.open "POST" url false) (set-req-headers headers) (aset "withCredentials" credentials) (.send body)))
ref http://www.html5rocks.com/en/tutorials/workers/basics/#toc-inlineworkers
castra uses jquery for its (a) ajax fn and (b) promise. this dependency can be removed by (1) using the native XMLHttpRequest (2) making requests from a worker thread wrapped in a clojurescript future abstraction.