HTML onabort Attribute
Definition and Usage
The onabort
attribute defines a script to be run if the loading of the media file aborts.
This event occurs when the media data download has been aborted, and not because of an error.
Applies to
The onabort
attribute is part of the Event Attributes, and can be used on the following elements:
Elements | Event |
---|---|
<audio> | onabort |
<embed> | onabort |
<img> | onabort |
<object> | onabort |
<video> | onabort |
Examples
Video Example
Alert that the loading of a video has been aborted:
<video id="myVideo" onabort="alert('Video load aborted')">
Browser Support
The onabort
attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
audio | Yes | Yes | Yes | Yes | Yes |
embed | Yes | Not supported | Yes | Yes | Yes |
img | Yes | Yes | Yes | Yes | Yes |
object | Yes | Not supported | Yes | Yes | Yes |
video | Yes | Yes | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.