2 ms·
when calling JS code from CLJS, you have to translate arguments that aren't primitives from CLJS datastructures to JS datastructures. (Functional languages impl
by dustingetz 14y ago
when calling JS code from CLJS, you have to translate arguments that aren't primitives from CLJS datastructures to JS datastructures. (Functional languages implement their datastructures differently than imperative languages.)
here's an example: https://github.com/dustingetz/getz-bootstrap/blob/datomic/src-cljs/gb/app.cljs https://github.com/dustingetz/getz-bootstrap/blob/datomic/sr...
- eggsby 14y agoWhile it's true that you need to turn things like a NodeList from js into a clj seq you don't need to write these utilities yourself; clj->js and js->clj can both be found in cljs core: https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L6927 https://github.com/clojure/clojurescript/blob/master/src/clj...