@@ -10314,6 +10314,35 @@ <h3><dfn>Release Actions</dfn></h3>
10314
10314
as if the state was released by an explicit series of actions.
10315
10315
It also clears all the internal state of the virtual devices.
10316
10316
10317
+ < p > The algorithm to < a > get undo actions</ a > takes an input state and returns its < a > input cancel list</ a > in reverse order.
10318
+
10319
+ < p > To < dfn > get undo actions</ dfn > given < var > input
10320
+ state</ var > :
10321
+
10322
+ < ol class =algorithm >
10323
+ < li > < p > Let < var > token</ var > be a new unique identifier.
10324
+
10325
+ < li > < p > Enqueue < var > token</ var > in < var > input state</ var > 's < a > actions
10326
+ queue</ a > .
10327
+
10328
+ < li > < p > Wait for < var > token</ var > to be the first item
10329
+ in < var > input state</ var > 's < a > actions queue</ a > .
10330
+
10331
+ < aside class =note >
10332
+ < p > This ensures that only one set of actions can be run at a time,
10333
+ and therefore different actions commands using the same underlying
10334
+ state don't race. In a session that is only a HTTP session only one
10335
+ command can run at a time, so this will never block. But other
10336
+ session types can allow running multiple commands in parallel, in
10337
+ which case this is necessary to ensure sequential access.
10338
+ </ aside >
10339
+
10340
+ < li > < p > Let < var > undo actions</ var > be < var > input
10341
+ state</ var > 's < a > input cancel list</ a > in reverse order.
10342
+
10343
+ < li > < p > Return < var > undo actions</ var > .
10344
+ </ ol >
10345
+
10317
10346
< p > The < a > remote end steps</ a > , given < var > session</ var > , < var > URL
10318
10347
variables</ var > and < var > parameters</ var > are:
10319
10348
@@ -10323,25 +10352,24 @@ <h3><dfn>Release Actions</dfn></h3>
10323
10352
code</ a > < a > no such window</ a > .
10324
10353
10325
10354
< li > < p > Let < var > input state</ var > be the result of < a > get the
10326
- input state</ a > with < a > session</ a > and < a > current
10327
- top-level browsing context</ a > .
10355
+ input state</ a > with < a > session</ a > and < a > current
10356
+ top-level browsing context</ a > .
10328
10357
10329
10358
< li > < p > Let < var > actions options</ var > be a new < a > actions options</ a >
10330
10359
with the < a > is element origin</ a > steps set to < a > represents a web
10331
10360
element</ a > , and the < a > get element origin</ a > steps set
10332
10361
to < a > get a WebElement origin</ a > .
10333
10362
10334
- < li > < p > Let < var > undo actions</ var > be < var > input
10335
- state</ var > 's < a > input cancel list</ a > in reverse order.
10363
+ < li > < p > Let < var > undo actions</ var > be the result of < a > get undo actions</ a > .
10336
10364
10337
- < li > < p > < a > Try </ a > to < a > dispatch tick actions </ a > with arguments
10338
- < var > undo
10339
- actions </ var > , < code > 0 </ code > , < var > session </ var > 's < a > current
10340
- browsing context </ a > , and < a > actions options </ a > .
10365
+ < li > < p > < a > Dispatch actions </ a > with < var > input state </ var > ,
10366
+ < var > undo actions </ var > , < a > current browsing context </ a > ,
10367
+ and < var > actions options </ var > . If this results in an < a > error </ a >
10368
+ return that error .
10341
10369
10342
10370
< li > < p > < a > Reset the input state</ a > with < var > session</ var >
10343
- and < var > session</ var > 's < a > current top-level browsing
10344
- context</ a > .
10371
+ and < var > session</ var > 's < a > current top-level browsing
10372
+ context</ a > .
10345
10373
10346
10374
< li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
10347
10375
</ ol >
0 commit comments