AbortController: bộ khởi tạo 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 in Web Workers.

Bộ khởi tạo AbortController() tạo một thể hiện đối tượng AbortController mới.

Cú pháp

js
new AbortController()

Tham số

Không có.

Ví dụ

Xem ví dụ sử dụng trong trang AbortSignal.

Bạn có thể xem một ví dụ hoàn chỉnh trên GitHub; đồng thời cũng có thể xem bản chạy trực tiếp.

Thông số kỹ thuật

Thông số kỹ thuật
DOM
# ref-for-dom-abortcontroller-abortcontroller①

Tương thích trình duyệt

Xem thêm