Execute a JavaScript if loading of an image is aborted:
The onabort event occurs when the user aborts the loading of an <img> or <input type="image"> element.
Event | |||||
---|---|---|---|---|---|
onabort | Not supported | Yes | Not supported | Not supported | Not supported |
In HTML:
In JavaScript:
In JavaScript, using the addEventListener() method:
Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.
Bubbles: | Yes |
---|---|
Cancelable: | No |
Event type: | UIEvent if generated from a user interface, Event otherwise. |
Supported HTML tags: | <img> and <input type="image"> |
DOM Version: | Level 2 Events |