The abort
event is fired when the resource was not fully loaded, but not as the result of an error.
This event is not cancelable and does not bubble.
The abort
event is fired when the resource was not fully loaded, but not as the result of an error.
This event is not cancelable and does not bubble.
Use the event name in methods like addEventListener()
, or set an event handler property.
addEventListener("abort", (event) => {});
onabort = (event) => {};
A generic Event
.
const video = document.querySelector("video");
const videoSrc = "https://example.org/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");
video.appendChild(source);
Specification |
---|
HTML # handler-onabort |
BCD tables only load in the browser