Advertisement
Home Open Editor ❯

HTML Audio/Video DOM abort Event

Example

//Accessing the element
var vid = document.getElementById("myVideo");

//Creating a function
vid.onabort = function() {
    alert("The video load is aborted");
};

Meaning

The abort event run when the loading of an audio/video is aborted.


Standard Syntax

HTML:

<element onabort="Script">

JavaScript:

object.onabort=function(){myScript};

JavaScript, using the addEventListener() method::

object.addEventListener("abort", myScript);


Advertisement

Technical Details

Type Description
Supported HTML tags: <audio> and <video>
Supported JavaScript objects: Audio, Video
Home Open Editor ❯
Advertisement