Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workerStart and redirects #131

Open
wants to merge 20 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 27 additions & 17 deletions index.html
Expand Up @@ -312,8 +312,11 @@ <h3>
time immediately before the user agent <a data-cite=
"service-workers#fetchevent">fired an event named `fetch`</a> at
the <a data-cite="service-workers#dfn-active-worker">active
worker</a>. Otherwise, if there is no active worker this attribute
MUST return zero.
worker</a>. If there were redirects, this is the start time of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this is the behavior of user agents right now? In particular, does this require new tests?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing current WPT tests, I think we'll need to add some to confirm this all

the the active worker of the first same-origin document in the redirect
chain.
If there is no active worker for the current document,
this attribute MUST return zero.
</li>
</ul>
<p class="note">
Expand Down Expand Up @@ -509,7 +512,7 @@ <h4>
<dfn>navigate</dfn>
</dt>
<dd>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-default">"default"</a>
Expand All @@ -521,7 +524,7 @@ <h4>
<dfn>reload</dfn>
</dt>
<dd>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-reload">"reload"</a>.
Expand All @@ -530,7 +533,7 @@ <h4>
<dfn>back_forward</dfn>
</dt>
<dd>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-entry-update">"entry update"</a>.
Expand Down Expand Up @@ -624,22 +627,22 @@ <h3>
<li>Record the current navigation type in <a data-link-for=
"PerformanceNavigationTiming">type</a> if it has not been set:
<ol style="list-style-type:lower-alpha ;">
<li>If the navigation has the
<li>If the navigation has the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
set to
<a data-cite="HTML/browsing-the-web.html#hh-default">"default"</a>
or <a data-cite="HTML/browsing-the-web.html#hh-replace">"replace"</a>,
let the navigation type be the {{DOMString}}
"<a data-link-for="NavigationType">navigate</a>".
</li>
<li>If the navigation has the
<li>If the navigation has the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
set to
<a data-cite="HTML/browsing-the-web.html#hh-reload">"reload"</a>,
let the navigation type be
the {{DOMString}} "<a data-link-for="NavigationType">reload</a>".
</li>
<li>If the navigation has the
<li>If the navigation has the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
set to
<a data-cite="HTML/browsing-the-web.html#hh-entry-update">"entry update"</a>,
Expand All @@ -652,14 +655,17 @@ <h3>
fails, set both <a data-link-for=
"PerformanceNavigationTiming">unloadEventStart</a> and
<a data-link-for="PerformanceNavigationTiming">unloadEventEnd</a> to
0 then go to <a href="#fetch-start-step">fetch-start-step</a>.
0 then go to <a href="#worker-start-step">worker-start-step</a>.
Otherwise, record <a data-link-for=
"PerformanceNavigationTiming">unloadEventStart</a> as the time
immediately before the unload event.
</li>
<li>Immediately after the unload event is completed, record the
current time as <a data-link-for=
"PerformanceNavigationTiming">unloadEventEnd</a>. If the navigation
"PerformanceNavigationTiming">unloadEventEnd</a>.
</li>
<li id="worker-start-step">
nicjansma marked this conversation as resolved.
Show resolved Hide resolved
If the navigation
URL has an <a data-cite="service-workers#dfn-active-worker">active
worker registration</a>, immediately before the user agent
<a data-cite="service-workers#run-service-worker">runs the worker</a>
Expand Down Expand Up @@ -801,10 +807,12 @@ <h3>
redirectEnd</code></a>, <a data-link-for=
"PerformanceNavigationTiming">unloadEventStart</a>,
<a data-link-for=
"PerformanceNavigationTiming">unloadEventEnd</a> and
"PerformanceNavigationTiming">unloadEventEnd</a>,
<a data-link-for=
"PerformanceNavigationTiming">workerStart</a> and
<a data-link-for=
"PerformanceNavigationTiming">redirectCount</a> to 0. Then,
return to <a href="#fetch-start-step">fetch-start-step</a> with
return to <a href="#worker-start-step">worker-start-step</a> with
the new resource.
</li>
<li>Increment <a data-link-for=
Expand Down Expand Up @@ -835,9 +843,11 @@ <h3>
<a data-cite=
"resource-timing-2#dom-performanceresourcetiming-nexthopprotocol">
<code>nextHopProtocol</code></a>, <a data-link-for=
"PerformanceNavigationTiming">unloadEventStart</a> and
"PerformanceNavigationTiming">unloadEventStart</a>,
<a data-link-for=
"PerformanceNavigationTiming">unloadEventEnd</a> and
<a data-link-for=
"PerformanceNavigationTiming">unloadEventEnd</a>. Set
"PerformanceNavigationTiming">workerStart</a>. Set
<a data-cite=
nicjansma marked this conversation as resolved.
Show resolved Hide resolved
"resource-timing-2#dom-performanceresourcetiming-nexthopprotocol">
<code>nextHopProtocol</code></a> to the empty {{DOMString}}.
Expand Down Expand Up @@ -1445,7 +1455,7 @@ <h3>
</dt>
<dd>
<p>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-default">"default"</a> or
Expand All @@ -1457,7 +1467,7 @@ <h3>
</dt>
<dd>
<p>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-reload">"reload"</a>.
Expand All @@ -1468,7 +1478,7 @@ <h3>
</dt>
<dd>
<p>
Navigation where the
Navigation where the
<a data-cite="HTML/browsing-the-web.html#history-handling-behavior">history handling behavior</a>
is set to
<a data-cite="HTML/browsing-the-web.html#hh-entry-update">"entry update"</a>.
Expand Down
1,015 changes: 1,011 additions & 4 deletions timestamp-diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.