Re: [whatwg/fetch] Deferred fetching (PR #1647)

@annevk 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&lt;Response> fetchLater(RequestInfo input, optional DeferredRequestInit init = {});

After chatting for a while with @noamr I think I understand the idea now. The boolean would reflect whether the browser called fetch and nothing else. So a network error following that is not something you can observe. That works. We should make sure that the boolean flipping happens at a well-defined time.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647#discussion_r1223212494
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1647/review/1470216719@github.com>

Received on Thursday, 8 June 2023 15:27:43 UTC