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

@noamr 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;
 };

Perhas we can have `requestFinished` and `responseFinished` promises as well?

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

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

Received on Thursday, 9 October 2025 16:02:28 UTC