@@ -9120,18 +9120,16 @@ <h3>Dispatching actions</h3>
9120
9120
grouped by < a > tick</ a > , and then causes each action to be run at the
9121
9121
appropriate point in the sequence.
9122
9122
9123
- < p > To < dfn > dispatch actions</ dfn > given < var > input
9124
- state</ var > , < var > actions by tick</ var > , < var > browsing
9125
- context</ var > , and < var > actions options</ var > :
9123
+ < p > To < dfn > wait for an action queue token</ dfn > given < var > input state</ var > :
9126
9124
9127
9125
< ol class =algorithm >
9128
9126
< li > < p > Let < var > token</ var > be a new unique identifier.
9129
9127
9130
- < li > < p > Enqueue < var > token</ var > in < var > input state</ var > 's < a > actions
9131
- queue</ a > .
9128
+ < li > < p > Enqueue < var > token</ var > in < var > input state</ var > 's
9129
+ < a > actions queue</ a > .
9132
9130
9133
9131
< li > < p > Wait for < var > token</ var > to be the first item
9134
- in < var > input state</ var > 's < a > actions queue</ a > .
9132
+ in < var > input state</ var > 's < a > actions queue</ a > .
9135
9133
9136
9134
< aside class =note >
9137
9135
< p > This ensures that only one set of actions can be run at a time,
@@ -9141,13 +9139,21 @@ <h3>Dispatching actions</h3>
9141
9139
session types can allow running multiple commands in parallel, in
9142
9140
which case this is necessary to ensure sequential access.
9143
9141
</ aside >
9142
+ </ ol >
9144
9143
9145
- < li > < p > Let < var > actions result</ var > be the result of < a > dispatch
9146
- actions inner</ a > with < var > input state</ var > , < var > actions by
9147
- tick</ var > , < var > browsing context</ var > , and < var > actions options</ var > .
9144
+ < p > To < dfn > dispatch actions</ dfn > given < var > input
9145
+ state</ var > , < var > actions by tick</ var > , < var > browsing
9146
+ context</ var > , and < var > actions options</ var > :
9147
+
9148
+ < ol class =algorithm >
9149
+ < li > < p > < a > Wait for an action queue token</ a > with < var > input state</ var > .
9150
+
9151
+ < li > < p > Let < var > actions result</ var > be the result of
9152
+ < a > dispatch actions inner</ a > with < var > input state</ var > , < var > actions by
9153
+ tick</ var > , < var > browsing context</ var > , and < var > actions options</ var > .
9148
9154
9149
9155
< li > < p > Dequeue < var > input state</ var > 's < a > actions queue</ a > .
9150
- < p > Assert: this returns < var > token</ var >
9156
+ < p > Assert: this returns < var > token</ var >
9151
9157
9152
9158
< li > < p > Return < var > actions result</ var > .
9153
9159
</ ol >
@@ -10325,26 +10331,26 @@ <h3><dfn>Release Actions</dfn></h3>
10325
10331
is < a > no longer open</ a > , return < a > error</ a > with < a > error
10326
10332
code</ a > < a > no such window</ a > .
10327
10333
10328
- < li > < p > Let < var > input state</ var > be the result of < a > get the
10329
- input state</ a > with < a > session</ a > and < a > current
10330
- top-level browsing context</ a > .
10334
+ < li > < p > Let < var > input state</ var > be the result of < a > get the input state</ a >
10335
+ with < a > session</ a > and < a > current top-level browsing context</ a > .
10331
10336
10332
10337
< li > < p > Let < var > actions options</ var > be a new < a > actions options</ a >
10333
10338
with the < a > is element origin</ a > steps set to < a > represents a web
10334
10339
element</ a > , and the < a > get element origin</ a > steps set
10335
10340
to < a > get a WebElement origin</ a > .
10336
10341
10342
+ < li > < p > < a > Wait for an action queue token</ a > with < var > input state</ var > .
10343
+
10337
10344
< li > < p > Let < var > undo actions</ var > be < var > input
10338
- state</ var > 's < a > input cancel list</ a > in reverse order.
10345
+ state</ var > 's < a > input cancel list</ a > in reverse order.
10346
+
10347
+ < li > < p > < a > Try</ a > to < a > dispatch actions</ a > with < var > input state</ var > ,
10348
+ < var > undo actions</ var > , < a > current browsing context</ a > ,
10349
+ and < var > actions options</ var > .
10339
10350
10340
- < li > < p > < a > Try</ a > to < a > dispatch tick actions</ a > with arguments
10341
- < var > undo
10342
- actions</ var > , < code > 0</ code > ,< var > session</ var > 's < a > current
10343
- browsing context</ a > , and < a > actions options</ a > .
10344
10351
10345
10352
< li > < p > < a > Reset the input state</ a > with < var > session</ var >
10346
- and < var > session</ var > 's < a > current top-level browsing
10347
- context</ a > .
10353
+ and < var > session</ var > 's < a > current top-level browsing context</ a > .
10348
10354
10349
10355
< li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
10350
10356
</ ol >
0 commit comments