Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. AbortController

AbortController

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.

TheAbortController interface represents a controller object that allows you to abort one or more Web requests as and when desired.

You can create a newAbortController object using theAbortController() constructor. Communicating with an asynchronous operation is done using anAbortSignal object.

Constructor

AbortController()

Creates a newAbortController object instance.

Instance properties

AbortController.signalRead only

Returns anAbortSignal object instance, which can be used to communicate with, or to abort, an asynchronous operation.

Instance methods

AbortController.abort()

Aborts an asynchronous operation before it has completed. This is able to abortfetch requests, consumption of any response bodies, and streams.

Examples

See theAbortSignal page for usage examples.

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

Specifications

Specification
DOM
# interface-abortcontroller

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp