This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-14
Channels
- # admin-announcements (3)
- # alda (1)
- # beginners (12)
- # braveandtrue (4)
- # cider (9)
- # cljs-dev (109)
- # cljsrn (6)
- # clojars (4)
- # clojure (40)
- # clojure-japan (5)
- # clojure-russia (10)
- # clojurescript (42)
- # cursive (2)
- # datomic (6)
- # hoplon (3)
- # luminus (3)
- # melbourne (1)
- # om (4)
- # om-next (1)
- # onyx (41)
- # proton (2)
- # protorepl (1)
- # quil (1)
- # re-frame (6)
- # respo (1)
- # testing (1)
Can someone explain why (aset some-js-obj “style” “background-image” “value”)
doesnt work?
how can I correctly set a style in a way that will work with advanced compilation
using vanilla js
@flyboarder: (aset js/document.body "style" "background-image" "url(
worked for me... maybe some-js-obj
isn't a dom element?
@timothypratley: it works with the url
portion in the string, I cannot just pass the string like you can in a css file
I guess this makes sense
oh ic 🙂
I need to pass a lot of settings objects for a JS library I'm using, but I don't want to convert using clj->js
all the time
fp.flow=> (try (js/throw "bad") (catch js/Error e 6))
6
fp.flow=> (try (throw "bad") (catch js/Error e 6))
"bad"
No stacktrace available.
^ is this normal? (cljs 1.8.51)@selfsame: FWIW this works:
cljs.user=> (try (throw "bad") (catch :default e 6))
6
Perhaps one day Clojure will also support :default
, enhancing portability: http://dev.clojure.org/jira/browse/CLJ-1293
For Cursive users: I’ve written an enhancement request to support the new clojure
namespace aliasing feature. (https://github.com/cursive-ide/cursive/issues/1491)
@risto: depends on what you mean by “work"
queue, inst, uuid and js are supported
but you can’t currently add new ones like in Clojure
I'm just looking for some shorthand way of writing JSON objects without having to apply a separate expression with clj->js
something like (blessed.screen #clj->js {:foo "bar"})
rather than (blessed.screen (clj->js {:foo "bar"}))
it's not a big deal but just wondering if there's readers for that sort of thing. Or even nicer would be: (blessed.screen ->{:foo "bar"})
@risto: so #js {:foo “bar”}
works
also note that #js
doesn’t nest, so you’ll want #js {:foo #js {:bar “baz"}}
when nesting other js objects
@anmonteiro: Oh nice! thanks this is awesome
I am playing with om next. I scraped some data with python and used edn_format to create a edn file with that data. What is the way to import that data into my app since I have it saved in "resources/data.edn"?
@kbp: slurp
a java.io.file
(slurp (
Okay, I know this is probably the last thing on everyone's mind, but is there a way of tightening the security for react in a ClojureScript app?