diff --git a/fetch.bs b/fetch.bs index 8d19ae84d..d4f9e3e18 100755 --- a/fetch.bs +++ b/fetch.bs @@ -5360,17 +5360,48 @@ returning a response directly, or allowing the request to proceed by returning n
  • Let requestEnvironment be the result of determining the environment given request. -

  • Let isTopLevelNavigation be true if request's - destination is "document"; otherwise, false. +

  • Let isTopLevelSelfFetch be false. -

  • If isTopLevelNavigation is false and requestEnvironment is null, - then return a network error. +

  • +

    If request's client is non-null: + +

      +
    1. Let global be request's client's + global object. + +

    2. +

      If all of the following conditions are true: + +

        +
      • global is a {{Window}} object; + +

      • global's navigable is not null; + +

      • global's navigable's parent + is null; and -

      • Let navigationOrEnvironment be the string "navigation" if - isTopLevelNavigation is true; otherwise, requestEnvironment. +

      • requestEnvironment's creation URL + equals request's current URL, +

      + +

      then set isTopLevelSelfFetch to true. +

    + +
  • +

    Let stringOrEnvironment be the result of these steps: + +

      +
    1. If request's destination is "document", + then return "top-level-navigation". + +

    2. If isTopLevelSelfFetch is true, then return + "top-level-self-fetch". + +

    3. Return requestEnvironment. +

  • Let blob be the result of obtaining a blob object given - blobURLEntry and navigationOrEnvironment. + blobURLEntry and stringOrEnvironment.

  • If blob is not a {{Blob}} object, then return a network error.