Reputation: 58786
I am trying to change the namespace when I evaluate code with cljs.js but fully qualifying something or using (ns seems to do nothing). Anyone knows how to do this?
Upvotes: 2
Views: 204
Reputation: 58786
I managed to do this in the end by doing this:
(cljs/eval-str (cljs/empty-state) string-to-evaulate 'foo.bar
{
:eval cljs/js-eval
:load load-fn
:source-map true}
(fn [result]
(do
(js/eval (:value result))
result))))
Upvotes: 2