This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-14
Channels
- # announcements (2)
- # aws (12)
- # aws-lambda (5)
- # beginners (42)
- # calva (56)
- # cider (16)
- # clj-kondo (1)
- # cljs-dev (45)
- # cljsjs (1)
- # cljsrn (25)
- # clojure (171)
- # clojure-europe (3)
- # clojure-italy (16)
- # clojure-losangeles (2)
- # clojure-nl (49)
- # clojure-spec (2)
- # clojure-sweden (3)
- # clojure-uk (11)
- # clojurescript (84)
- # component (11)
- # core-async (12)
- # core-logic (2)
- # cursive (8)
- # datomic (41)
- # events (2)
- # fulcro (48)
- # graalvm (1)
- # graphql (1)
- # hoplon (12)
- # jackdaw (1)
- # jobs (1)
- # jobs-discuss (45)
- # joker (5)
- # keechma (10)
- # nyc (3)
- # off-topic (14)
- # pathom (16)
- # qa (1)
- # re-frame (22)
- # reagent (12)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (40)
- # spacemacs (3)
- # timbre (3)
- # tools-deps (29)
using core async in cljs, if i have the following mounted component:
(defn go-loop []
(async/go-loop []
(<! (async/timeout 1000))
(when (exists? js/window.console)
(js/console.log "can we do this?"))
(recur)))
(defn init []
(enable-console-print!)
(go-loop)
(r/render [:h3 "works in chrome but not IE"] (.getElementById js/document "app")))
this works in chrome and IE when the devconsole is open but throws in async impl when the console is closed.am i doing something I shouldn't? I get IO shouldn't happen from a go-loop but does that include a seemingly innocuous call to console log?
I don't really use cljs, but I think think all your names with dots in them for js stuff may cause you issues
but I am really not sure, you might try checking out #clojurescript and see what they say about it
i thought i had seen there was a "preference" for the (.log js/console ...) but thought they were equivalent. Either way thanks. I had been wondering how to strip it down to basic stuff and just didn't think about that