I’m trying to load a CORS-disabled image, and get the error:
Cross-origin image load denied by Cross-Origin Resource Sharing policy.
I’ve tried catching the error as follows, but that obviously will not work.
How can I catch CORS errors after setting the .src property of an image?
Use the
onErrorevent.Code should probably be consolidated so you don’t have to write your code twice, but hopefully you’ve got the idea.