JSFiddle - React, Tailwind, and code Playground
JavaScript
img = new Image();
$(img).bind('error', function () {
alert('hi');
});
img.src = "sgsg";
img = new Image();
$(img).bind('error', function () {
alert('hi');
});
img.src = "sgsg";