-
-
Save anonymous/c9c2fe05606de72f5a59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn select-turn | |
"select turn starts the game when the a player selects x or o from modal window." | |
[e] | |
(let [turn (.data $button "turn") | |
url ( apply str (+ "/game/" turn))] | |
;;Close bootstrap's modal window. | |
(.modal $turn-prompt (clj->js "hide")) | |
;; set the user turn in UI. | |
(set-turn turn) | |
;; console log with my console fnc. | |
(console-log url) | |
(comment " | |
current error for next line: | |
Uncaught TypeError: Illegal invocation cljs.js:5591 | |
b cljs.js:5591 | |
a cljs.js:5628 | |
tic_tac_toe.core.select_turn cljs.js:14374 | |
v.event.dispatch jquery-1.8.3.min.js:2 | |
o.handle.u) | |
in js this would be something like history.pushState(null, null, '/game/'+turn);") | |
(apply js/window.history.pushState (clj->js [nil nil url])))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment