Skip to content

Commit cadc6b5

Browse files
jgrahamwhimboo
andauthored
Add a timestamp to NavigationInfo (#346)
This ensures that navigation events get a (wall clock) timestamp. Co-authored-by: Henrik Skupin <[email protected]>
1 parent a2f64a5 commit cadc6b5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

index.bs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2824,6 +2824,7 @@ TODO: Link to the definition in the HTML spec.
28242824
browsingContext.NavigationInfo = {
28252825
context: browsingContext.BrowsingContext,
28262826
navigation: browsingContext.Navigation / null,
2827+
timestamp: js-uint,
28272828
url: text,
28282829
}
28292830
</pre>
@@ -2837,13 +2838,15 @@ To <dfn>get the navigation info</dfn>, given |context| and |navigation status|:
28372838

28382839
1. Let |navigation id| be |navigation status|'s id.
28392840

2841+
1. Let |timestamp| be a [=time value=] representing the current date and time in UTC.
2842+
28402843
1. Let |url| be |navigation status|'s url.
28412844

2842-
1. Return a [=map=] matching the
2843-
<code>browsingContext.NavigationInfo</code> production, with the
2844-
<code>context</code> field set to |context id|, the <code>navigation</code>
2845-
field set to |navigation id|, and the <code>url</code> field set to the
2846-
result of the [=URL serializer=] given |url|.
2845+
1. Return a [=map=] matching the <code>browsingContext.NavigationInfo</code>
2846+
production, with the <code>context</code> field set to |context id|, the
2847+
<code>navigation</code> field set to |navigation id|, the
2848+
<code>timestamp</code> field set to |timestamp|, and the <code>url</code>
2849+
field set to the result of the [=URL serializer=] given |url|.
28472850

28482851
</div>
28492852

0 commit comments

Comments
 (0)