FetchLaterResult: activated property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("fetchLater API")}}{{SeeCompatTable}}

The **activated** read-only property of the {{domxref("FetchLaterResult")}} interface returns a boolean specifying whether the deferred fetch has been sent.

Value

A {{jsxref('Boolean')}}.

Examples

Defer a POST request for around one minute and create a function to check if sent

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

function checkIfFetched() {
  return result.activated;
}

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}