Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. AbortController
  4. abort()

AbortController: abort() method

Baseline Widely available

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

Note: This feature is available inWeb Workers.

Theabort() method of theAbortController interface aborts an asynchronous operation before it has completed.This is able to abortfetch requests, the consumption of any response bodies, or streams.

Syntax

js
abort()abort(reason)

Parameters

reasonOptional

The reason why the operation was aborted, which can be any JavaScript value.If not specified, the reason is set to "AbortError"DOMException.

Return value

None (undefined).

Examples

See theAbortSignal page for usage examples.

You can find afull working example on GitHub; you can also see itrunning live.

Specifications

Specification
DOM
# ref-for-dom-abortcontroller-abortcontroller①

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp