Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLMediaElement
  4. abort

HTMLMediaElement: abort event

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Theabort 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.

Syntax

Use the event name in methods likeaddEventListener(), or set an event handler property.

js
addEventListener("abort", (event) => { })onabort = (event) => { }

Event type

A genericEvent.

Examples

js
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);

Specifications

Specification
HTML
# event-media-abort
HTML
# handler-onabort

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp