FetchLaterResult: activated property

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.

Thuộc tính chỉ đọc activated của giao diện FetchLaterResult trả về giá trị boolean cho biết liệu yêu cầu fetch trì hoãn đã được gửi hay chưa.

Giá trị

Một Boolean.

Ví dụ

Trì hoãn yêu cầu POST khoảng một phút và tạo hàm kiểm tra xem đã gửi chưa

js
const result = fetchLater("https://report.example.com", {
  method: "POST",
  body: JSON.stringify(myReport),
  activateAfter: 60000 /* 1 phút */,
});

function checkIfFetched() {
  return result.activated;
}

Thông số kỹ thuật

This feature does not appear to be defined in any specification.

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