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>
Any ideas?
@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!