HTMLMediaElement: abort event

The abort event is fired when the resource was not fully loaded, but not as the result of an error.

Bubbles No
Cancelable No
Interface Event
Event handler property onabort


const video = document.querySelector('video');
const videoSrc = 'https://path/to/video.webm';

video.addEventListener('abort', () => {
  console.log(`Abort loading: ${videoSrc}`);

const source = document.createElement('source');
source.setAttribute('src', videoSrc);
source.setAttribute('type', 'video/webm');



Specification Status
HTML Living Standard Living Standard
HTML5 Recommendation

Browser compatibility

BCD tables only load in the browser

See also