I need to open a new tab using ClojureScript.
(js/window.open "http://localhost/go/somewhere")
I get the following error: Uncaught TypeError: window.open is not a function
It doesn't help setting it because nothing happens and I assume it is because it is a function and not a variable.
(set! js/window.open "http://localhost/go/somewhere")
I know it is possible because I got it right initially. I've since forgotten what I've done.
Edit: Also tried:
(set! js/window.location.open endpoint)
(set! (js/window.location.open -location) endpoint)
(set! (.. js/window.location.open -location) endpoint)