@@ -305,23 +305,20 @@ <h3>
305
305
"RESOURCE-TIMING-2#dom-performanceresourcetiming "> PerformanceResourceTiming</ dfn > </ code >
306
306
interface:
307
307
</ p >
308
- < ul data-dfn-for ="PerformanceResourceTiming ">
309
- < li > The < dfn > initiatorType</ dfn > attribute MUST return the
310
- {{DOMString}} "< code > navigation</ code > ".
308
+ < ul >
309
+ < li > The `workerStart` getter steps are to perform the following steps:
310
+ < ol >
311
+ < li > Let |workerTiming| be |this|'s [=PerformanceNavigationTiming/service worker timing=].
312
+ < li > If |workerTiming| is null, then return |this|'s prototype's `workerStart`.
313
+ < li > Return |workerTiming|'s [=service worker timing info/start time=].
314
+ </ ol >
311
315
</ li >
312
- < li > The < dfn id ='dom-PerformanceNavigationTiming-workerStart '> < code >
313
- workerStart</ code > </ dfn > attribute MUST return the time immediately
314
- before the user agent < a data-cite =
315
- "service-workers#run-service-worker "> ran the worker</ a > (if the
316
- < a > current document</ a > has an < a data-cite =
317
- "service-workers#dfn-containing-service-worker-registration "> active
318
- service worker registration</ a > [[SERVICE-WORKERS]]) required to
319
- service the request, or if the worker was already available, the
320
- time immediately before the user agent < a data-cite =
321
- "service-workers#fetchevent "> fired an event named `fetch`</ a > at
322
- the < a data-cite ="service-workers#dfn-active-worker "> active
323
- worker</ a > . Otherwise, if there is no active worker this attribute
324
- MUST return zero.
316
+ < li > The `fetchStart` getter steps are to perform the following steps:
317
+ < ol >
318
+ < li > Let |workerTiming| be |this|'s [=PerformanceNavigationTiming/service worker timing=].
319
+ < li > If |workerTiming| is null, then return |this|'s prototype's `fetchStart`.
320
+ < li > Return |workerTiming|'s [=service worker timing info/fetch event dispatch time=].
321
+ </ ol >
325
322
</ li >
326
323
</ ul >
327
324
< p class ="note ">
370
367
[=document load timing info=] < a data-dfn-for ="PerformanceResourceTiming ">
371
368
< dfn > document load timing</ dfn > </ a > .
372
369
373
-
374
370
< p > A < a > PerformanceNavigationTiming</ a > has an associated
375
371
[=document unload timing info=] < a data-dfn-for ="PerformanceNavigationTiming ">
376
372
< dfn > previous document unload timing</ dfn > </ a > .
381
377
< p > A < a > PerformanceNavigationTiming</ a > has an associated
382
378
{{NavigationType}} < a data-dfn-for ="PerformanceNavigationTiming "> < dfn > navigation type</ dfn > </ a > .
383
379
380
+ < p > A {{PerformanceNavigationTiming}} has an associated null or [=service worker timing info=]
381
+ < dfn data-dfn-for ="PerformanceNavigationTiming "> service worker timing</ dfn > .
382
+
384
383
</ p >
385
384
< p data-dfn-for ='PerformanceNavigationTiming '>
386
385
The < dfn > unloadEventStart</ dfn > getter steps are to return |this|'s
@@ -546,14 +545,15 @@ <h2>Creating a navigation timing entry</h2>
546
545
< p data-dfn-for ="Document "> Each [=document=] has an associated < dfn > navigation timing entry</ dfn > , initially unset.
547
546
548
547
< p > To < dfn export =""> create the navigation timing entry</ dfn > for {{Document}} |document|,
549
- given a [=fetch timing info=] |fetchTiming|, a number |redirectCount|, and a
550
- {{NavigationType}} |navigationType|, do the following:
548
+ given a [=fetch timing info=] |fetchTiming|, a number |redirectCount|, a
549
+ {{NavigationType}} |navigationType|, and a null or [=service worker timing info=] |serviceWorkerTiming|,
550
+ do the following:
551
551
< ol >
552
552
< li > Let |global| be |document|'s [=relevant global object=].</ li >
553
553
< li > Let |navigationTimingEntry| be a new {{PerformanceNavigationTiming}} object in |global|'s
554
554
[=global object/realm=].
555
555
< li > < a data-cite ="RESOURCE-TIMING-2#dfn-setup-the-resource-timing-entry "> Setup the resource
556
- timing entry=] for |navigationTimingEntry| given "< code > navigation</ code > ", |document|'s
556
+ timing entry</ a > for |navigationTimingEntry| given "< code > navigation</ code > ", |document|'s
557
557
< a data-cite ="HTML#the-document's-address "> address</ a > , and |fetchTiming|.
558
558
< li > Set |navigationTimingEntry|'s < a data-for ="PerformanceNavigationTiming "> document load
559
559
timing</ a > to |document|'s [=Document/load timing info=]
@@ -563,6 +563,8 @@ <h2>Creating a navigation timing entry</h2>
563
563
count</ a > to |redirectCount|.
564
564
< li > Set |navigationTimingEntry|'s < a data-for ="PerformanceNavigationTiming "> navigation
565
565
type</ a > to |navigationType|.
566
+ < li > Set |navigationTimingEntry|'s [=PerformanceNavigationTiming/service worker timing=]
567
+ to |serviceWorkerTiming|.
566
568
< li > Set |document|'s < span > navigation timing entry</ span > to |navigationTimingEntry|.
567
569
< li > add |navigationTimingEntry| to |global|'s
568
570
< a data-cite ='performance-timeline-2#dfn-performance-entry-buffer '> performance entry buffer</ a > .
0 commit comments