iv-viewer
iv-viewer copied to clipboard
How to detect a load failed / 404 event
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.
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);