This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-18
Channels
- # announcements (1)
- # babashka (8)
- # beginners (20)
- # calva (2)
- # clara (17)
- # cljsrn (7)
- # clojure (45)
- # clojure-australia (1)
- # clojure-europe (5)
- # clojure-spec (7)
- # clojure-uk (2)
- # clojurescript (30)
- # cursive (3)
- # data-science (1)
- # datomic (2)
- # emacs (9)
- # events (2)
- # figwheel-main (1)
- # fulcro (4)
- # luminus (2)
- # malli (2)
- # pathom (10)
- # re-frame (44)
- # reagent (5)
- # reitit (4)
- # remote-jobs (1)
- # rum (1)
- # sci (2)
- # uncomplicate (2)
- # xtdb (21)
Wondering why on-load
for SVG isn't firing:
[:svg {:height "100"
:width "100"
:on-load #(js/alert "SVG loaded.")}
[:circle {:cx "50" :cy "50" :r "40" :stroke "black" :stroke-width "3" :fill "red"}]]
Similar HTML does work:
<html>
<body>
<svg height="100" width="100" onload="javascript: alert('SVG loaded.');">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<body>
<html>
@rcecchino don't think React supports using onLoad. You better off grabbing a reference via ref
and then setting the listener manually
Thanks @victorbjelkholm429. Assembled a quick React app and it is in fact not working there. Will go the ref
route. Thanks!
🙏 3