Svelte Img Error Handler Not Getting Called
I am trying to build a simple component in Svelte. Image component with fallback in case the src is invalid. This is my code and it doesn't work. I've tried many variations (on:err
Solution 1:
try:
<img on:error={handleError} {alt} {src} />
Svelte docs here
Post a Comment for "Svelte Img Error Handler Not Getting Called"