[whatwg/fetch] New Resource Timing issues (#1201)

@noamr when looking at https://github.com/whatwg/xhr/pull/319 I started looking at `fetch()` again and I don't understand a couple things. Let's start with this bit:

> Let handleFetchDone be to finalize and report timing with response, globalObject, and "fetch".

Where does _response_ come from here? I guess https://fetch.spec.whatwg.org/#finalize-response has to pass it on.

How does this interact with callers of HTTP-network fetch that might take this response and determine to return a network error to the caller of fetch?

Another problem here is that this might not be the final response. We end up calling these things for redirects and such too.

One way to potentially solve this is that in "fetch finale" we declare that this response is the one we need to hear about in terms of a done callback.

I suppose if "fetch finale" got a network error we could at that point invoke "done" as well, if it should happen for network errors. Do you get an entry if there's a CORS failure? I'm not sure that's currently adequately covered.

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

Received on Thursday, 25 March 2021 16:06:24 UTC