@@ -26,6 +26,10 @@ url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#ongoing-naviga
2626 type: dfn; spec: html; text: ongoing navigate event;
2727url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigation-transition
2828 type: dfn; spec: html; text: transition;
29+ url: https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-activation
30+ type: dfn; spec: html; text: activation;
31+ url: https://html.spec.whatwg.org/multipage/browsing-the-web.html#has-been-revealed
32+ type: dfn; spec: html; text: has been revealed;
2933</pre>
3034
3135<h2 id="at-route">Route queries: the ''@route'' rule</h2>
@@ -122,42 +126,59 @@ as follows:
122126 : from: <<route-location>>
123127 :: The result is true if
124128 the [=document's navigation API=] of the document
125- is non-null,
126- its [=transition=] is non-null,
127- its [=from entry=] 's {{NavigationHistoryEntry/url}}
128- is non-null and
129- [=URL pattern/match|matches=]
130- the [=route location URL pattern=] of <<route-location>> .
129+ is non-null, and either:
130+
131+ * its [=transition=] is non-null,
132+ its [=from entry=] 's {{NavigationHistoryEntry/url}}
133+ is non-null and
134+ [=URL pattern/match|matches=]
135+ the [=route location URL pattern=] of <<route-location>> .
136+
137+ * its [=activation=] is non-null,
138+ the document's [=has been revealed=] is false or
139+ was false at the start of the current [=task=] ,
140+ and the activation's {{NavigationActivation/from}} 's
141+ {{NavigationHistoryEntry/url}} 's
142+ is non-null and
143+ [=URL pattern/match|matches=]
144+ the [=route location URL pattern=] of <<route-location>> .
131145
132146 : to: <<route-location>>
133147 :: The result is true if
134148 the [=document's navigation API=] of the document
135- is non-null,
136- its [=ongoing navigate event=] is non-null,
137- and its {{NavigateEvent/destination}} 's
138- {{NavigationDestination/url}}
139- [=URL pattern/match|matches=]
140- the [=route location URL pattern=] of <<route-location>> .
141-
142- <!--
143-
144- After
145- <a href="https://github.com/whatwg/html/issues/11690">whatwg/html#11690</a> /
146- <a href="https://github.com/whatwg/html/pull/11692">whatwg/html#11692</a> .
147- we could probably define this more like "from" above. But it's probably
148- also OK as is since the transition and the ongoing navigate event basically have
149- the same lifetime.
150-
151- -->
152-
153- ISSUE: The above definitions of from and to probably don't do the right thing
154- during the loading of the new document in a cross-document navigation,
155- since I think they reference concepts that are only present on the old document.
149+ is non-null, and either:
150+
151+ * its [=ongoing navigate event=] is non-null,
152+ and its {{NavigateEvent/destination}} 's
153+ {{NavigationDestination/url}}
154+ [=URL pattern/match|matches=]
155+ the [=route location URL pattern=] of <<route-location>> .
156+
157+ ISSUE: This assumes that the [=ongoing navigate event=]
158+ and the [=transition=] have the same lifetime,
159+ but this isn't really
160+ true if the event is intercepted.
161+ After
162+ <a href="https://github.com/whatwg/html/issues/11690">whatwg/html#11690</a> /
163+ <a href="https://github.com/whatwg/html/pull/11692">whatwg/html#11692</a> .
164+ we could probably define this more like "from" above.
165+ But which lifetime is the one we want?
166+
167+ * its [=activation=] is non-null,
168+ the document's [=has been revealed=] is false or
169+ was false at the start of the current [=task=] ,
170+ and the activation's {{NavigationActivation/entry}} 's
171+ {{NavigationHistoryEntry/url}} 's
172+ is non-null and
173+ [=URL pattern/match|matches=]
174+ the [=route location URL pattern=] of <<route-location>> .
156175
157176 ISSUE: The above definitions of from and to apparently don't work right
158177 if you start a same-document navigation (e.g., with {{History/pushState}} )
159178 in the middle of a cross-document navigation.
160179
180+ ISSUE: Improve integration with [=has been revealed=] rather than monkeypatching it.
181+
161182: <<general-enclosed>>
162183::
163184 The result is false.
0 commit comments