BackgroundFetchRegistration: abort() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is available in Web Workers.
Phương thức abort() của giao diện BackgroundFetchRegistration hủy một tác vụ tìm nạp nền đang hoạt động.
Cú pháp
js
abort()
Tham số
Không có.
Giá trị trả về
Một Promise phân giải thành true nếu việc tìm nạp được hủy thành công.
Ví dụ
Dùng abort() để chấm dứt một tác vụ tìm nạp nền đang diễn ra.
js
bgFetch.abort();
Thông số kỹ thuật
| Specification |
|---|
| Background Fetch> # background-fetch-registration-abort> |