This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-15
Channels
- # architecture (5)
- # babashka (34)
- # beginners (72)
- # calva (42)
- # cherry (31)
- # cider (14)
- # clojure (27)
- # clojure-europe (11)
- # clojure-norway (17)
- # clojure-uk (1)
- # clojurescript (25)
- # community-development (13)
- # conjure (1)
- # core-async (11)
- # datascript (18)
- # datomic (11)
- # emacs (12)
- # fulcro (10)
- # integrant (5)
- # introduce-yourself (3)
- # jobs (8)
- # juxt (2)
- # malli (22)
- # off-topic (11)
- # pathom (18)
- # polylith (62)
- # rdf (18)
- # reagent (8)
- # releases (1)
- # shadow-cljs (35)
- # sql (3)
- # squint (141)
- # tools-deps (12)
- # vim (4)
- # xtdb (4)
Hi everyone, I'm trying to embed an external script via something like:
[:script {:type "text/javascript" :src ""}]
When I click around to get to the page where I have that embedded, I can see the script tag in the DOM when I inspect the html, however that script never gets loaded in the network tab.
Am I missing something here? I thought the above might be enough but perhaps there's something I should be doing differently to embed an external script?There are no errors anywhere, but most importantly the network tab never shows the script loading.
IIRC, the network tab won't show it if its loading is prevented by the CORS policy. But it should've been logged in the JS console.
Thank you very much for that link, I guess I'll try some of the proposed solutions there.
For anyone curious (or from the future searching this channel for a similar issue), the solution we went for is to utilise reagent's form-3 components and the component-did-mount
and component-will-unmount
life cycle events to manually create the script element as described in the updated accepted answer in the stack overflow linked by @U2FRKM4TW (thanks again btw 🙂)