diff --git a/index.html b/index.html index 6297a37..caae328 100644 --- a/index.html +++ b/index.html @@ -132,6 +132,8 @@ 'resource-timing-2#dom-performanceresourcetiming-secureconnectionstart'> secureConnectionStart attribute is now mandatory. +
  • exposes workerStart
  • @@ -302,18 +304,27 @@

    {{DOMString}} "navigation".
  • The - workerStart attribute MUST return the time immediately - before the user agent ran the worker (if the - current document has an active - service worker registration [[SERVICE-WORKERS]]) required to - service the request, or if the worker was already available, the - time immediately before the user agent fired an event named `fetch` at - the active - worker. Otherwise, if there is no active worker this attribute - MUST return zero. + workerStart attribute getter does the following: +
      +
    • If the current document has no active + service worker registration [[SERVICE-WORKERS]], this attribute MUST + return zero.
    • +
    • If there were redirects, this attribute MUST return a {{DOMHighResTimeStamp}} + with a time immediately before the user agent ran the worker for + the first request in final same-origin redirect + chain.
    • +
    • If the worker was already available, this attribute MUST return + a {{DOMHighResTimeStamp}} with a time immediately before the user agent fired an event named `fetch` at + the active + worker.
    • +
    • Otherwise, this attribute MUST return a {{DOMHighResTimeStamp}} with a + time immediately before the user agent ran the worker required to + service the request.
    • +
  • @@ -363,8 +374,7 @@

    1. If there is no previous document, or if the same-origin - check fails, return a {{DOMHighResTimeStamp}} with a time value - equal to zero. + check fails, return zero.
    2. Otherwise, return a DOMHighResTimeStamp with a @@ -380,8 +390,7 @@

      1. If there is no previous document, or if the same-origin - check fails, return a {{DOMHighResTimeStamp}} with a time value - equal to zero. + check fails, return zero.
      2. Otherwise, return a {{DOMHighResTimeStamp}} with a time value equal to the time immediately before the user agent starts the @@ -440,18 +449,15 @@

        The loadEventStart attribute MUST return a DOMHighResTimeStamp with a time value equal to the time immediately before the load event of the - current document is fired. It MUST return a DOMHighResTimeStamp with a - time value equal to zero when the load event is not fired yet. + current document is fired. It MUST return zero when the + load event is not fired yet.

        The loadEventEnd attribute MUST return a DOMHighResTimeStamp with a time value equal to the time when the load event of the current - document is completed. It MUST return a DOMHighResTimeStamp with a - time value equal to zero when the load event is not fired or is not - completed. + document is completed. It MUST return zero when the load + event is not fired or is not completed.

        The type attribute MUST return a {{DOMString}} describing @@ -509,7 +515,7 @@

        navigate
        - Navigation where the + Navigation where the history handling behavior is set to "default" @@ -521,7 +527,7 @@

        reload
        - Navigation where the + Navigation where the history handling behavior is set to "reload". @@ -530,7 +536,7 @@

        back_forward
        - Navigation where the + Navigation where the history handling behavior is set to "entry update". @@ -566,7 +572,7 @@

        This figure illustrates the timing attributes defined by the {{PerformanceNavigationTiming}} interface. Attributes in parenthesis indicate that they may not be available for navigations - involving documents from different origins. @@ -616,15 +622,15 @@

      3. Set entryType and initiatorType to the {{DOMString}} "navigation".
      4. -
      5. Set {{startTime}} to a {{DOMHighResTimeStamp}} with a time value - of zero, and Set {{startTime}} to zero, and nextHopProtocol to the empty {{DOMString}}.
      6. +
      7. Let |lastWorkerStartOrigin| be the [=opaque origin=].
      8. Record the current navigation type in type if it has not been set:
          -
        1. If the navigation has the +
        2. If the navigation has the history handling behavior set to "default" @@ -632,14 +638,14 @@

          let the navigation type be the {{DOMString}} "navigate".

        3. -
        4. If the navigation has the +
        5. If the navigation has the history handling behavior set to "reload", let the navigation type be the {{DOMString}} "reload".
        6. -
        7. If the navigation has the +
        8. If the navigation has the history handling behavior set to "entry update", @@ -652,24 +658,53 @@

          fails, set both unloadEventStart and unloadEventEnd to - 0 then go to fetch-start-step. + 0 then go to worker-start-step. Otherwise, record unloadEventStart as the time immediately before the unload event.

        9. Immediately after the unload event is completed, record the current time as unloadEventEnd. If the navigation - URL has an active - worker registration, immediately before the user agent - runs the worker - record the time as {{workerStart}}, or if the worker is available, - record the time before the event named `fetch` is - fired at the active worker. Otherwise, if the navigation URL has - no matching service worker - registration, set {{workerStart}} value to zero. + "PerformanceNavigationTiming">unloadEventEnd. +
        10. +
        11. + [worker-start-step] +
            +
          • If the [=request/current url=] + has no matching service worker + registration, set {{workerStart}} to 0, and go to the + fetch-start-step.
          • +
          • + If the [=request/current url=] has an active + worker registration: +
              +
            • Let |worker| be the registration's active worker
            • +
            • If |lastWorkerStartOrigin| is not equal to the [=request/current url=]'s origin, set {{workerStart}} to 0.
            • +
            • If the user agent has not yet + run the worker, + immediately before the user agent + runs the worker: +
                +
              1. Record the time as {{workerStart}}.
              2. +
              3. Let |lastWorkerStartOrigin| be the [=request/current url=]'s origin.
              4. +
              5. Go to the fetch-start-step.
              6. +
              +
            • +
            • If |lastWorkerStartOrigin| is equal to the [=request/current url=]'s origin, go to the + fetch-start-step.
            • +
            • If the worker is available, immediately before the event named `fetch` is + fired at the worker: +
                +
              1. Record the time as {{workerStart}}.
              2. +
              3. Let |lastWorkerStartOrigin| be the [=request/current url=]'s origin.
              4. +
              5. Go to the fetch-start-step.
              6. +
              +
            • +
            +
          • +
        12. [fetch-start-step] If the new resource is to be fetched @@ -801,10 +836,10 @@

          redirectEnd, unloadEventStart, unloadEventEnd and - unloadEventEnd + and redirectCount to 0. Then, - return to fetch-start-step with + return to worker-start-step with the new resource.

        13. Increment nextHopProtocol, unloadEventStart and + "PerformanceNavigationTiming">unloadEventStart, + unloadEventEnd and unloadEventEnd. Set + "PerformanceNavigationTiming">workerStart. Set nextHopProtocol to the empty {{DOMString}}. @@ -913,6 +950,10 @@

          request.

        14. If request's redirect count is zero, return + "pass". +
        15. +
        16. If request's redirect count is not zero, and all of request's HTTP redirects have the

          - Navigation where the + Navigation where the history handling behavior is set to "default" or @@ -1457,7 +1498,7 @@

          - Navigation where the + Navigation where the history handling behavior is set to "reload". @@ -1468,7 +1509,7 @@

          - Navigation where the + Navigation where the history handling behavior is set to "entry update". diff --git a/timestamp-diagram.svg b/timestamp-diagram.svg index f7d0531..f5c3f6e 100644 --- a/timestamp-diagram.svg +++ b/timestamp-diagram.svg @@ -1,4 +1,1052 @@ - - - - + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + workerStart + + + WorkerStartup + + + + + + + Cross OriginWorkers &Redirects + Same Origin +