This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-07
Channels
- # announcements (2)
- # beginners (25)
- # calva (16)
- # cljdoc (37)
- # cljsrn (24)
- # clojure (204)
- # clojure-nl (4)
- # clojure-spec (34)
- # clojure-uk (3)
- # clojurescript (13)
- # cursive (8)
- # data-science (3)
- # dirac (21)
- # figwheel-main (1)
- # luminus (3)
- # off-topic (45)
- # pedestal (3)
- # planck (2)
- # re-frame (5)
- # shadow-cljs (270)
- # spacemacs (5)
man, some of the orchestration involved with chrome extensions is… it’s a lot of complexity 😅
in order to communicate with a tab from devtools there’s like 3 layers of message passing, and you have to keep track of which tabs are communicating to which devtools in user-land
have you looked at https://github.com/binaryage/chromex-sample? with core.async the code looks quite simple
i feel like I need to understand how extensions actually work before I use a wrapper lib
I've read and successfully reproduced Mike Fikes's process for making ambient functions available to code evaluated by cljs.js/eval
. (https://github.com/mfikes/ambient) Is there a similar process for making ambient macros available? I imagine doing so is a bit trickier.
What appears to work is using cljs.js/eval
to evaluate (require-macros '[macro.ns.you.want])
before dumping the compiler state.
@U050CT4HR You'd need to compile the macros down to functions (in the corresponding $macros
namespace) using (likely self-hosted) ClojureScript compiler. Your require-macros
approach is doing this. This is also essentially what Planck does to cause bundled macros to become "ambient" instead of being compiled when required. (http://blog.fikesfarm.com/posts/2016-02-03-planck-macros-aot.html)
@U04VDQDDY Thanks! Got it. Glad my intuition was right here.