``` --- ## Definition and Usage The onabort event"> ``` --- ## Definition and Usage The onabort event" />
Easy Tutorial
❮ Met Node Insertbefore Jsref Sub ❯

onabort Event

Event Object

Example

Execute JavaScript when a video stops loading:

<video onabort="myFunction()">

Definition and Usage

The onabort event is triggered when the loading of a video/audio is aborted.

This event is fired when the multimedia data loading is aborted, not when an error occurs.

Tip: Events that affect multimedia loading include:


Browser Support

The numbers in the table specify the first browser version that fully supports the event.

Event
onabort Yes 9.0 Yes Yes Yes

Note: The onabort event is not supported in Internet Explorer 11 on Windows 7.


Syntax

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: No
Cancelable: No
--- ---
Event type: Event
--- ---
Supported HTML tags: <audio>, <video>
--- ---
❮ Met Node Insertbefore Jsref Sub ❯