I'm having second thoughts about this. Looking at the commit when the js namespace was introduced you can see that, for example (goog.global.Math/exp x) was changed to (js/Math.exp x). I'm thinking maybe the js magic namespace is meant to support these kinds of calls?
Another issue I ran into was when using a js library (paper.js) and I was supposed to translate
into ClojureScript. I could not find any way to achieve this except
(let [x (js/paper.Path.)]
There is an assertion in the analyzer that prohibits the following alternative:
(let [x (new (.-Path js/paper))]
Removing the assertion (and the call to 'resolve-existing-var') the above expression seems to work just fine.