@@ -136,8 +136,16 @@ <h3>Dependencies</h3>
136
136
-->
137
137
138
138
< dl >
139
+ < dt > Web App Security
140
+ < dd > < p > The following terms are defined
141
+ in the Content Security Policy Level 3 specification: [[!CSP3]]
142
+ < ul >
143
+ < li > < dfn data-lt ="blocked by content security policy "> < a href =https://w3c.github.io/webappsec-csp/#should-block-navigation-response > Should block navigation response</ a > </ dfn >
144
+ </ ul >
145
+
139
146
< dt > DOM
140
- < dd > < p > The following terms are defined in the Document Object Model specification: [[!DOM]]
147
+ < dd > < p > The following terms are defined
148
+ in the Document Object Model specification: [[!DOM]]
141
149
< ul >
142
150
<!-- Attribute --> < li > < dfn > < a href =https://dom.spec.whatwg.org/#concept-attribute > Attribute</ a > </ dfn >
143
151
<!-- context object --> < li > < dfn > < a href ="https://dom.spec.whatwg.org/#context-object "> context object</ a > </ dfn >
@@ -279,6 +287,7 @@ <h3>Dependencies</h3>
279
287
<!-- Disabled --> < li > < dfn > < a href =https://html.spec.whatwg.org/#concept-fe-disabled > Disabled</ a > </ dfn >
280
288
<!-- Document address --> < li > < dfn data-lt =address > < a href =https://dom.spec.whatwg.org/#concept-document-url > Document address</ a > </ dfn >
281
289
<!-- Document title --> < li > < dfn data-lt =title > < a href =https://html.spec.whatwg.org/#document.title > Document title</ a > </ dfn >
290
+ <!-- Document readiness --> < li > < dfn > < a href =https://html.spec.whatwg.org/#current-document-readiness > Document readiness</ a > </ dfn >
282
291
<!-- Enumerated attribute --> < li > < dfn > < a href =https://html.spec.whatwg.org/#enumerated-attribute > Enumerated attribute</ a > </ dfn >
283
292
<!-- Environment settings object --> < li > < dfn > < a href =https://html.spec.whatwg.org/#environment-settings-object > Environment settings object</ a > </ dfn >
284
293
<!-- Event loop --> < li > < dfn > < a href =https://html.spec.whatwg.org/#event-loop > Event loop</ a > </ dfn >
@@ -290,7 +299,7 @@ <h3>Dependencies</h3>
290
299
<!-- Input type file selected --> < li > < dfn > < a href ="https://html.spec.whatwg.org/#concept-input-type-file-selected "> Selected Files</ a > </ dfn >
291
300
<!-- Joint session history --> < li > < dfn > < a href =https://html.spec.whatwg.org/#joint-session-history > Joint session history</ a > </ dfn >
292
301
<!-- Missing value default state --> < li > < dfn > < a href =https://html.spec.whatwg.org/#missing-value-default > Missing value default state</ a > </ dfn >
293
- <!-- Navigate --> < li > < dfn > < a href =https://html.spec.whatwg.org/#navigate > Navigate</ a > </ dfn >
302
+ <!-- Navigate --> < li > < dfn data-lt =" navigating|navigation " > < a href =https://html.spec.whatwg.org/#navigate > Navigate</ a > </ dfn >
294
303
<!-- Nested browsing context --> < li > < dfn > < a href =https://html.spec.whatwg.org/#nested-browsing-context > Nested browsing context</ a > </ dfn >
295
304
<!-- Origin-clean --> < li > < dfn > < a href =https://html.spec.whatwg.org/#concept-canvas-origin-clean > Origin-clean</ a > </ dfn >
296
305
<!-- Parent browsing context --> < li > < dfn > < a href =https://html.spec.whatwg.org/#parent-browsing-context > Parent browsing context</ a > </ dfn >
@@ -354,6 +363,7 @@ <h3>Dependencies</h3>
354
363
< dd > < p > The following events are also defined in the HTML specification:
355
364
< ul >
356
365
<!-- beforeunload --> < li > < dfn > < a href =https://html.spec.whatwg.org/#event-beforeunload > < code > beforeunload</ code > </ a > </ dfn >
366
+ <!-- DOMContentLoaded --> < li > < dfn > < a href =https://html.spec.whatwg.org/#event-domcontentloaded > < code > DOMContentLoaded</ code > </ a > </ dfn >
357
367
</ ul >
358
368
359
369
< dd > < p > The “data” URL scheme specification defines the following terms: [[!RFC2397]]
@@ -1200,6 +1210,14 @@ <h3>Handling Errors</h3>
1200
1210
< a data-lt ="keyboard interactable "> keyboard</ a > < a > interactable</ a > .
1201
1211
</ tr >
1202
1212
1213
+ < tr >
1214
+ < td > < dfn > insecure certificate</ dfn >
1215
+ < td > 400
1216
+ < td > < code > insecure certificate</ code >
1217
+ < td > < a > Navigation</ a > caused
1218
+ the user agent to hit a certificate warning,
1219
+ which is usually the result of an expired or invalid TLS certificate.
1220
+
1203
1221
< tr >
1204
1222
< td > < dfn > invalid argument</ dfn >
1205
1223
< td > 400
@@ -1680,10 +1698,10 @@ <h2>Capabilities</h2>
1680
1698
append a string saying that a JSON Object is required,
1681
1699
else call < a > set the proxy</ a > passing in < var > proxy</ var > .
1682
1700
1683
- < li > < p > Let < var > page load strategy</ var > be the result of < a > getting a property</ a >
1684
- named < code > pageLoadStrategy </ code > from < var > unprocessed capability</ var > .
1685
- If < var > page load strategy</ var > is < a > undefined</ a > ,
1686
- then set the entry < code > pageLoadStrategy </ code >
1701
+ < li > < p > Let < var > page loading strategy</ var > be the result of < a > getting a property</ a >
1702
+ named < code > pageLoadingStrategy </ code > from < var > unprocessed capability</ var > .
1703
+ If < var > page loading strategy</ var > is < a > undefined</ a > ,
1704
+ then set the entry < code > pageLoadingStrategy </ code >
1687
1705
in < var > server capabilities</ var > to < a > normal</ a > .
1688
1706
</ ol >
1689
1707
@@ -1850,8 +1868,8 @@ <h2>Sessions</h2>
1850
1868
Unless stated otherwise it is zero milliseconds.
1851
1869
1852
1870
< p > A < a > session</ a > has an associated < dfn > page loading strategy</ dfn > ,
1853
- which is one of < i > none</ i > , < i > normal</ i > , and < i > eager</ i > .
1854
- Unless stated otherwise, it is < i > normal</ i > .
1871
+ which is one of < a > none</ a > , < a > normal</ a > , and < a > eager</ a > .
1872
+ Unless stated otherwise, it is < a > normal</ a > .
1855
1873
1856
1874
< p > A < a > session</ a > has an associated < dfn > secure SSL</ dfn > state
1857
1875
that indicates whether untrusted or self-signed SSL certificates
@@ -2143,24 +2161,112 @@ <h3>Set Timeouts</h3>
2143
2161
2144
2162
< section >
2145
2163
< h2 > Navigation</ h2 >
2164
+
2146
2165
< p > The < a > commands</ a > in this section allow navigation of
2147
2166
the < a > current top-level browsing context</ a > to new URLs
2148
2167
and introspection of the document currently loaded in this < a > browsing context</ a > .
2149
2168
2150
- < p > For commands that cause a new document to load,
2151
- the point at which the < a > command</ a > returns
2152
- is determined by the session’s < a > page load strategy</ a > .
2153
- A value of < code > normal</ code > causes the command
2154
- to return after the < code > load</ code > event fires on the new page,
2155
- a value of < code > eager</ code > causes it to return
2156
- after < code > DOMContentLoaded</ code > fires,
2157
- and a value of < code > none</ code > causes it to return immediately.
2169
+ < p > For < a > commands</ a > that cause a new document to load,
2170
+ the point at which the command returns
2171
+ is determined by the session’s < a > page loading strategy</ a > .
2172
+ The < a > normal</ a > state causes it
2173
+ to return after the load event fires on the new page,
2174
+ < a > eager</ a > causes it to return
2175
+ after the < a > < code > DOMContentLoaded</ code > </ a > event fires,
2176
+ and < a > none</ a > causes it to return immediately.
2158
2177
2159
2178
< p > Navigation actions are also affected by the value of
2160
2179
the < a > session page load timeout</ a > ,
2161
2180
which determines the maximum time that commands will block
2162
2181
before returning with a < a > timeout</ a > < a > error</ a > .
2163
2182
2183
+ < p > The following is the < dfn > table of page load strategies</ dfn >
2184
+ that links the < code > pageLoadingStrategy</ code > < a > capability</ a > keyword
2185
+ to a < a > page loading strategy</ a > state,
2186
+ and shows which < a > document readiness</ a > state
2187
+ that corresponds to it:
2188
+
2189
+ < table class =simple >
2190
+ < tr >
2191
+ < th > Keyword
2192
+ < th > Page load strategy state
2193
+ < th > Document readiness state
2194
+ </ tr >
2195
+
2196
+ < tr >
2197
+ < td > "< code > none</ code > "
2198
+ < td > < dfn data-lt ="none page loading strategy "> none</ dfn >
2199
+ < td >
2200
+ </ tr >
2201
+
2202
+ < tr >
2203
+ < td > "< code > eager</ code > "
2204
+ < td > < dfn data-lt ="eager page loading strategy "> eager</ dfn >
2205
+ < td > "< code > interactive</ code > "
2206
+ </ tr >
2207
+
2208
+ < tr >
2209
+ < td > "< code > normal</ code > "
2210
+ < td > < dfn data-lt ="normal page loading strategy "> normal</ dfn >
2211
+ < td > "< code > complete</ code > "
2212
+ </ tr >
2213
+ </ table >
2214
+
2215
+ < p > When asked to < dfn data-lt ="waiting for the navigation to complete "> wait for navigation to complete</ dfn > ,
2216
+ run the following steps:
2217
+
2218
+ < ol >
2219
+ < li > < p > If the < a > current session</ a > has a < a > page loading strategy</ a > :
2220
+
2221
+ < ol >
2222
+ < li > < p > Let < var > readiness target</ var > be the < a > document readiness</ a > state
2223
+ tied to the < a > current session</ a > ’s < a > page loading strategy</ a > ,
2224
+ which can be found in the < a > table of page load strategies</ a > .
2225
+
2226
+ < li > < p > Wait for the the < a > current browsing context</ a > ’s
2227
+ < a > document readiness</ a > state
2228
+ to reach < var > readiness target</ var > ,
2229
+ or for the < a > session page load timeout</ a > to pass,
2230
+ whichever occurs sooner.
2231
+
2232
+ < p class =example > This can typically be implemented
2233
+ by registering an event handler for
2234
+ the < a > < code > DOMContentLoaded</ code > </ a > event,
2235
+ and comparing the < a > document readiness</ a > state
2236
+ against < var > readiness target</ var > whenever it fires.
2237
+ When it reaches its designated < var > readiness target</ var > ,
2238
+ return from the overall step of this algorithm.
2239
+
2240
+ < li > < p > If the previous step completed
2241
+ by the load timeout being reached
2242
+ and the browser is does not have an < a > active user prompt</ a > ,
2243
+ return < a > error</ a > with < a > error code</ a > < a > timeout</ a > .
2244
+ </ ol >
2245
+ </ ol >
2246
+
2247
+ < p > When asked to run the < dfn > post-navigation checks</ dfn > ,
2248
+ run the substeps of the first matching statement:
2249
+
2250
+ < dl class =switch >
2251
+ < dt > < a > response</ a > is a network error
2252
+ < dd > < p > Return < a > error</ a > with < a > error code</ a > < a > unknown error</ a > .
2253
+
2254
+ < dt > < a > response</ a > be < a > blocked by content security policy</ a >
2255
+ < dd > < p > If the < a > current session</ a > ’s < a > secure SSL</ a > state is disabled,
2256
+ take implementation specific steps to ensure
2257
+ the navigation is not aborted
2258
+ and that the untrusted- or invalid TLS certificate error
2259
+ that would normally occur under these circumstances,
2260
+ are suppressed.
2261
+
2262
+ < p > Otherwise return < a > error</ a > with < a > error code</ a > < a > insecure certificate</ a > .
2263
+
2264
+ < dt > < a > response</ a > ’s < a > HTTP status code</ a > is 401
2265
+ < dt > Otherwise
2266
+ < dd > < p > Irrespective of how a possible authentication challenge is handled,
2267
+ return < a > success</ a > with data null.
2268
+ </ dl >
2269
+
2164
2270
< section >
2165
2271
< h3 > Go</ h3 >
2166
2272
@@ -2219,39 +2325,11 @@ <h3>Go</h3>
2219
2325
2220
2326
< li > < p > < a > Navigate</ a > the < a > current top-level browsing context</ a > to < var > url</ var > .
2221
2327
2222
- < p > If this navigation’s HTTP request
2223
- results in a HTTP 401 response,
2224
- the < a > remote end</ a > must proceed with the steps below,
2225
- irrespective of how the authentication challenge is handled.
2226
-
2227
- < p > If this navigation’s HTTP request
2228
- results in a TLS client certificate negotiation
2229
- and the certificate is found to not be valid
2230
- and the < a > active session</ a > ’s < a > secure SSL</ a > state is disabled,
2231
- take implementation specific steps to ensure
2232
- the navigation is not aborted
2233
- and that the untrusted- or invalid SSL certificate error
2234
- that would normally occur under these circumstances, are suppressed.
2328
+ < li > < p > Run the < a > post-navigation checks</ a >
2329
+ and return its value if it is an < a > error</ a > .
2235
2330
2236
- < li > < p > If the < a > current session</ a > ’s < a > page loading strategy</ a >
2237
- is < a > none</ a > jump to the next step in this overall set of steps.
2238
-
2239
- < p > Otherwise:
2240
-
2241
- < ol >
2242
- < li > < p > Let < var > readiness target</ var > be "< code > interactive</ code > "
2243
- if the < a > current session</ a > ’s < a > page loading strategy</ a > is < a > eager</ a > ,
2244
- or "< code > complete</ code > " if it is < a > normal</ a > .
2245
-
2246
- < li > < p > Wait for the < a > current document readiness</ a > to reach < var > readiness target</ var > ,
2247
- or for the < a > session page load timeout</ a > milliseconds to pass,
2248
- whichever occurs sooner.
2249
-
2250
- < li > < p > If the previous step completed by the < a > load timeout</ a > being reached,
2251
- and the browser is not currently displaying an alert,
2252
- <!-- perhaps? Not sure if this is what the spec is trying to say -->
2253
- return < a > error</ a > with < a > error code</ a > < a > timeout</ a > .
2254
- </ ol >
2331
+ < li > < p > < a > Wait for navigation to complete</ a >
2332
+ and return its value if it is an < a > error</ a > .
2255
2333
2256
2334
< li > < p > Set the < a > current browsing context</ a >
2257
2335
to the < a > current top-level browsing context</ a > .
@@ -2436,31 +2514,19 @@ <h3>Refresh</h3>
2436
2514
2437
2515
< li > < p > < a > Handle any user prompts</ a > and return its value if it is an < a > error</ a > .
2438
2516
2439
- < li > < p class =issue > Not sure if this needs to consider the reload override flag.
2440
-
2441
- < p > < a > Navigate</ a > the < a > current top-level browsing context</ a >
2517
+ < li > < p > < a > Navigate</ a > the < a > current top-level browsing context</ a >
2442
2518
to the same resource as its < a > active document</ a > ,
2443
2519
with < a > replacement enabled</ a > .
2444
2520
</ li >
2445
2521
2446
- < li > < p > If the < a > current session</ a > ’s < a > page load strategy</ a > is < a > none</ a > ,
2447
- jump to the next step in this overall set of steps.
2448
-
2449
- < p > Otherwise:
2450
-
2451
- < ol >
2452
- < li > < p > Let < var > readiness target</ var > be "< code > interactive</ code > "
2453
- if the < a > current session</ a > ’s < a > page load strategy</ a > is < a > eager</ a > ,
2454
- or "< code > complete</ code > " if it is < a > normal</ a > .
2522
+ < li > < p > Run the < a > post-navigation checks</ a >
2523
+ and return its value if it is an < a > error</ a > .
2455
2524
2456
- < li > < p > Wait for the < a > current document readiness</ a > to reach < var > readiness target</ var > ,
2457
- or for the < a > session page load timeout</ a > milliseconds to pass,
2458
- whichever occurs sooner.
2525
+ < li > < p > < a > Wait for navigation to complete</ a >
2526
+ and return its value if it is an < a > error</ a > .
2459
2527
2460
- < li > < p > If the previous step completed by the < a > load timeout</ a > being reached,
2461
- and the browser is not currently displaying an alert,
2462
- return < a > error</ a > with < a > error code</ a > < a > timeout</ a > .
2463
- </ ol >
2528
+ < li > < p > Set the < a > current browsing context</ a >
2529
+ to the < a > current top-level browsing context</ a > .
2464
2530
2465
2531
< li > < p > Return < a > success</ a > with data null.
2466
2532
</ ol >
@@ -4383,6 +4449,22 @@ <h3>Element Click</h3>
4383
4449
4384
4450
< li > < p class =issue > Run interaction steps on coordinate.
4385
4451
4452
+ < li > < p > If the click causes < a > navigation</ a > :
4453
+
4454
+ < ol >
4455
+ < li > < p > Run the < a > post-navigation checks</ a >
4456
+ and return its value if it is an < a > error</ a > .
4457
+
4458
+ < li > < p > < a > Wait for navigation to complete</ a >
4459
+ and return its value if it is an < a > error</ a > .
4460
+ </ ol >
4461
+
4462
+ < p class =example > Note that one may not know
4463
+ if a click causes < a > navigation</ a > .
4464
+ It is safe to run the < a > post-navigation checks</ a >
4465
+ and < a > waiting for the navigation to complete</ a >
4466
+ even though navigation < em > did not</ em > occur.
4467
+
4386
4468
< li > < p > Return < a > success</ a > with data null.
4387
4469
</ ol >
4388
4470
</ section > <!-- /Element Click -->
0 commit comments