iv-viewer icon indicating copy to clipboard operation
iv-viewer copied to clipboard

How to detect a load failed / 404 event

Open MagneticLlama opened this issue 4 years ago • 1 comments

I need to display a notification to the user when an image resource fails to load. Looking through the documentation and issues, I haven't found a way to do this.

MagneticLlama avatar Mar 02 '20 04:03 MagneticLlama

I have the same question. I tried using the listeners as described in the README but couldn't get it to work (data as shown in the example isn't defined).

My workaround:

document.querySelector('.iv-image-wrap img').addEventListener('error', myCallback);

soulshake avatar Mar 09 '23 20:03 soulshake