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

@annevk commented on this pull request.

1. "inactive timeout" -> "deferred delay". At least that seems clearer to me.
2. I think `fetchLater` was quite nice in that it sorts the same as `fetch`. `fetchDeferred` could also work, though is a bit harder to spell. I don't think we need request in the name.
3. It's not clear how the name fetch group states get activated. That needs some kind of additional PR against HTML I suppose?
4. I think we should describe the API in the same section as the fetch method. Could be called "Fetch methods" then.
5. Deferred fetching itself could then precede the "Fetch API" section. Maybe it could even be a subsection of "Fetching" though I don't mind a new top-level section.

> @@ -2686,16 +2689,103 @@ functionality.
 <dfn export for="fetch record" id=concept-fetch-record-fetch>controller</dfn> (a
 <a for=/>fetch controller</a> or null).
 
+<p>A <dfn export>deferred fetch record</dfn> is a <a for=/>struct</a> used to maintain state needed
+to invoke a fetch at a later time, e.g. when a <code>Document</code> is unloaded or backgrounded. It

```suggestion
to invoke a fetch at a later time, e.g., when a <code>Document</code> is unloaded or backgrounded. It
```
no longer fully active (plus xref)

> + <var>inactiveTimeout</var>.
+
+ <li><p><a for=list>Append</a> <var>deferredRecord</var> to <var>request</var>'s
+ <a for=request>client</a>'s <a for=fetch>fetch group</a>'s
+ <a for="fetch group">deferred fetch records</a>.
+
+ <li><p>Return <var>deferredRecord</var>.
+</ol>
+</div>
+
+<h3 id=request-deferred-fetch-method>RequestDeferredFetch method</h3>
+
+<pre class=idl>
+
+dictionary DeferredRequestInit : RequestInit {
+  DOMHighResTimeStamp? inactiveTimeout;

No need for this to be both nullable and optional.

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

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

Received on Monday, 8 May 2023 10:43:54 UTC