Fallback mechanism when img src is invalid
Hello, was surfing on stackoverflow forums when I came across this:
The
I wanted to discuss a bit about what the
How does the
The
onerror attribute, I tried it, seems really nice, when my img src is invalid, I got that custom image instead of that little icon which appears when image is not loaded.I wanted to discuss a bit about what the
onerror is and when it occurs, from what I've read, it occurs each time an internal resource (video/img) fails to load?How does the
this.onerror=null; work though? I read that we need it to prevent an infinite loop.