diff --git a/fetch.bs b/fetch.bs index bd8fae92f..290b3e807 100644 --- a/fetch.bs +++ b/fetch.bs @@ -215,6 +215,9 @@ lt="authentication entry">authentication entries (for HTTP authentication).
timing info
A fetch timing info. + +
preloaded response candidate (default null) +
Null, "pending", or a response.

A fetch controller is a struct used to enable callers of @@ -3892,17 +3895,19 @@ the request. origin.

  • Let onPreloadedResponseAvailable be an algorithm that runs the following - step in parallel given a response response: run - fetch finale given response and fetchParams. + step given a response response: set fetchParams's + preloaded response candidate to response.

  • Let foundPreloadedResource be the result of invoking - consume a preloaded resource for req's window, - given req's URL, req's destination, - req's mode, req's credentials mode, - req's integrity metadata, and - onPreloadedResponseAvailable. - -

  • If foundPreloadedResource is true, then return. + consume a preloaded resource for request's window, given + request's URL, request's destination, + request's mode, request's + credentials mode, request's integrity metadata, + and onPreloadedResponseAvailable. + +

  • If foundPreloadedResource is true and fetchParams's + preloaded response candidate is null, then set fetchParams's + preloaded response candidate to "pending".

  • @@ -4040,6 +4045,18 @@ steps: corresponding to the first matching statement:
    +
    fetchParams's preloaded response candidate is not null +
    +
      +
    1. Wait until fetchParams's + preloaded response candidate is not "pending". + +

    2. Assert: fetchParams's + preloaded response candidate is a response. + +

    3. Return fetchParams's preloaded response candidate. +

    +
    request's current URL's origin is same origin with request's origin, and request's response tainting is "basic" @@ -4047,7 +4064,6 @@ steps: "data"
    request's mode is "navigate" or "websocket" -
    1. Set request's @@ -4064,7 +4080,6 @@ steps:

      request's mode is "same-origin" -

      Return a network error.

      request's mode is @@ -4096,7 +4111,6 @@ steps:
      request's current URL's scheme is not an HTTP(S) scheme -

      Return a network error.

      request's use-CORS-preflight flag is set