onabort event
Example
Execute JavaScript when image loading is aborted:
Definition and Usage
The onabort event is triggered when the user aborts loading or the element.
Browser support
| Events | |||||
|---|---|---|---|---|---|
| onabort | Not supported | Yes | Not supported | Not supported | Not supported |
Syntax
In HTML:
<
element
onabort="
myScript
">In JavaScript:
object
.onabort=function(){
myScript
};
In JavaScript, use the addEventListener() method:
object
.addEventListener("abort",
myScript
);
Note: Internet Explorer 8 and earlier IE versions do not support addEventListener() method.
Technical Details
| Does it support bubbling: | Yes |
|---|---|
| Is it cancelable: | No |
| Event type: | If it is generated on the user interface, it is a UIEvent; otherwise it is an Event. |
| Supported HTML tags: | All HTML elements, except: , , , |
Event Object