Re: [w3c/ServiceWorker] Maintain timing for worker start/ready, for navigation requests. (#1575)

@jakearchibald requested changes on this pull request.

Minor changes, but generally LGTM

>        <h4 id="service-worker-events">Events</h4>
 
       The Service Workers specification defines <dfn export id="dfn-service-worker-events">service worker events</dfn> (each of which is an [=event=]) that include (see the <a href="#execution-context-events">list</a>):
           * <dfn export id="dfn-lifecycle-events">Lifecycle events</dfn>: {{install!!event}} and {{activate!!event}}.
           * <dfn export id="dfn-functional-events">Functional events</dfn>: {{fetch!!event}} and the [=events=] defined by other specifications that <a href="#extensibility">extend</a> the Service Workers specification. (See the <a href="#execution-context-events">list</a>.)
           * {{message!!event}} and {{messageerror!!event}}.
     </section>
-  </section>
+    <section>
+      <h4 id="service-worker-timing">Timing</h4>
+
+      Service workers mark certain points in times, that are later exposed by the {{PerformanceNavigationTiming|navigation timing}} API.

```suggestion
      Service workers mark certain points in time that are later exposed by the {{PerformanceNavigationTiming|navigation timing}} API.
```

>        <h4 id="service-worker-events">Events</h4>
 
       The Service Workers specification defines <dfn export id="dfn-service-worker-events">service worker events</dfn> (each of which is an [=event=]) that include (see the <a href="#execution-context-events">list</a>):
           * <dfn export id="dfn-lifecycle-events">Lifecycle events</dfn>: {{install!!event}} and {{activate!!event}}.
           * <dfn export id="dfn-functional-events">Functional events</dfn>: {{fetch!!event}} and the [=events=] defined by other specifications that <a href="#extensibility">extend</a> the Service Workers specification. (See the <a href="#execution-context-events">list</a>.)
           * {{message!!event}} and {{messageerror!!event}}.
     </section>
-  </section>
+    <section>
+      <h4 id="service-worker-timing">Timing</h4>
+
+      Service workers mark certain points in times, that are later exposed by the {{PerformanceNavigationTiming|navigation timing}} API.
+
+      A [=/response=] has an associated null or [=service worker timing info=] <dfn export for=response>service worker timing</dfn>, initially set to null.

For consistency:

```suggestion
      A [=/response=] has an associated <dfn export for=response>service worker timing</dfn> (a [=service worker timing info=] or null). It is initially set to null.
```

> +      <p>A <dfn export>service worker timing info</dfn> is a <a for=/>struct</a>. It has the
+      following <a for=struct>items</a>:

```suggestion
      A <dfn export>service worker timing info</dfn> is a [=/struct=]. It has the following [=struct/items=]:
```

> +      <dl>
+      <dt><dfn export for="service worker timing info">start time</dfn> (default 0)
+      <dt><dfn export for="service worker timing info">fetch event dispatch time</dfn> (default 0)
+      <dd>A {{DOMHighResTimeStamp}}.
+      </dl>

```suggestion
      <section dfn-for="service worker timing info">
        : <dfn export>start time</dfn>
        :: A {{DOMHighResTimeStamp}}, initially 0.
        : <dfn export>fetch event dispatch time</dfn>
        :: A {{DOMHighResTimeStamp}}, initially 0.
      </section>
```

I haven't fully tested the above parses properly, but you see what I'm going for.

> @@ -2958,6 +2974,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
 
       : Input
       :: |request|, a [=/request=]
+      :: |crossOriginIsolatedCapability|, a boolean

It isn't clear to me which client this isolation refers to. Maybe it should just be `useHighResPerformanceTimers` or something which makes the scope of its usage clear?

> @@ -193,15 +193,31 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
         * Detects abnormal operation: such as infinite loops and tasks exceeding imposed time limits (if any) while handling the events.
     </section>
 
-    <section>
+   <section>

Unintentional change?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/pull/1575#pullrequestreview-636618132

Received on Thursday, 15 April 2021 12:38:47 UTC