- From: Noam Rosenthal <notifications@github.com>
- Date: Thu, 18 May 2023 01:48:19 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 18 May 2023 08:48:25 UTC
@noamr commented on this pull request.
> @@ -8449,6 +8597,60 @@ with a <var>promise</var>, <var>request</var>, <var>responseObject</var>, and an
</div>
+<h3 id=fetch-later-method>FetchLater method</h3>
+
+<pre class=idl>
+
+dictionary DeferredRequestInit : RequestInit {
+ DOMHighResTimeStamp backgroundTimeout;
+};
+
+partial interface mixin WindowOrWorkerGlobalScope {
+ [NewObject] Promise<Response> fetchLater(RequestInfo input, optional DeferredRequestInit init = {});
The task that resolves the promise (call `fetch group`'s activate) should be called when reactivating the document, before suspended timers are resumed and before `pageshow`. Both of these are done in specified location so there shouldn't be a race. The race here is perhaps created because of the Userland JS implemetation of pending beacon, it can be solved in user-land in the same way that this kind of race can be avoided with regular fetches.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#discussion_r1197567945
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/pull/1647/review/1432305871@github.com>
Received on Thursday, 18 May 2023 08:48:25 UTC