This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (2)
- # bangalore-clj (1)
- # beginners (45)
- # boot (26)
- # cljs-dev (8)
- # cljsrn (25)
- # clojure (41)
- # clojure-austin (2)
- # clojure-belgium (6)
- # clojure-mke (3)
- # clojure-russia (37)
- # clojure-sanfrancisco (3)
- # clojure-spec (57)
- # clojure-taiwan (1)
- # clojure-uk (7)
- # clojurescript (27)
- # clr (1)
- # code-reviews (3)
- # core-async (1)
- # datascript (5)
- # datomic (19)
- # emacs (12)
- # hoplon (59)
- # lambdaisland (9)
- # lein-figwheel (3)
- # off-topic (4)
- # om (1)
- # onyx (51)
- # pedestal (1)
- # protorepl (2)
- # re-frame (12)
@cdimara Cljs 1.7.228 is the first version of Cljs with which boot-cljs works properly
goog.dom contains getDocumentScroll, but how do you set the scroll using this library?
@borkdude I think that's correct. Also
document.scrollTop is a thing. There are some SO answers that show a cross browser compatible one liner
@borkdude probably they decided it's supported well enough and didn't include it
I’m making a bookmarklet which restores the scroll location of a page. I have this code in it:
But somehow it displays the scrollTop location as the new content of the page...
(do (set! (.. js/document -body -scrollTop) (.getItem js/localStorage "scroll-y")) nil)
@juhoteperi so later versions of cljs just work? Don't you have to tell boot-cljs that you're using a newer version of cljs?
@cdimara if you add a dependency for a newer version of ClojureScript it will be used
@martinklepsch Ah. Where would you do this? Because clojurescript 1.7.2 is hard coded right into the boot-cljs task source code.
@cdimara you just specify it in your
@martinklepsch in build.boot ?
@cdimara what's in the task is the fallback if there's no dependency on Clojurescript at all
@cdimara yes in
You can look at the compiled file (the one that you load in your browser) and it will say which version of ClojureScript was used to compile it
@martinklepsch: ah. got it! thanks!
you're welcome 🙂
Is there anything available in CLJS land for fixed time timeout/intervals? There’s stuff like
cljs.core.async/timeout but I’m looking for more like launching something at 8PM each day or something similar. I found Later.js in JS land but if I go that route I need to spend some time writing externs.
@jupl I haven't seen anything. Externs handling seems to get easier with some recent changes on ClojureScript master, though. See https://gist.github.com/swannodette/4fc9ccc13f62c66456daf19c47692799.
Anyone who knows whether Transit over JSON is susceptible to JSON Hijacking?
@martinklepsch thanks a lot for your "Om/Next Reading List"
@om-nexters i have a mutation that answers a remote that fires off the mutation to the backend. what's the correct (or idiomatic) way to get a (:remote) read to happen subsequent to this?
i'm not optimistically writing to local state. i'd like a subsequent remote read to happen to get the backend server's new value(s)
@jupl Seems you could put together a solution like this using
js/setInterval and an atom pretty easily. Just fire a function every 1 second and check "is it after 8pm and have we not run the cron job today?"
Is there a way to programmatically access function’s source, defined in the same namespace?
(cljs.repl/source my-fn) prints "Source not found"