Re: [whatwg/fetch] WIP: Add a mechanism to fetch to track progress (PR #1843)

@lukewarlow commented on this pull request.



> @@ -8512,7 +8513,19 @@ otherwise false.
 
 <pre class=idl>
 partial interface mixin WindowOrWorkerGlobalScope {
-  [NewObject] Promise&lt;Response> fetch(RequestInfo input, optional RequestInit init = {});
+  [NewObject] Promise&lt;Response> fetch(RequestInfo input, optional FetchInit init = {});
+};
+
+dictionary FetchInit : RequestInit {
+  FetchMonitorCallback monitor;
+};
+
+callback FetchMonitorCallback = undefined (FetchMonitor monitor);
+
+[Exposed=(Window,Worker)]
+interface FetchMonitor : EventTarget {
+  attribute EventHandler onrequestprogress;
+  attribute EventHandler onresponseprogress;
 };

I'm happy to add those, is that the general design direction we're going with where there's promises to just await?

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

Message ID: <whatwg/fetch/pull/1843/review/5682190165@github.com>

Received on Wednesday, 28 October 2026 11:57:32 UTC