@@ -9120,18 +9120,16 @@ <h3>Dispatching actions</h3>
91209120 grouped by < a > tick</ a > , and then causes each action to be run at the
91219121 appropriate point in the sequence.
91229122
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 > :
91269124
91279125< ol class =algorithm >
91289126 < li > < p > Let < var > token</ var > be a new unique identifier.
91299127
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 > .
91329130
91339131 < 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 > .
91359133
91369134 < aside class =note >
91379135 < p > This ensures that only one set of actions can be run at a time,
@@ -9141,13 +9139,21 @@ <h3>Dispatching actions</h3>
91419139 session types can allow running multiple commands in parallel, in
91429140 which case this is necessary to ensure sequential access.
91439141 </ aside >
9142+ </ ol >
91449143
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 > .
91489154
91499155 < 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 >
91519157
91529158 < li > < p > Return < var > actions result</ var > .
91539159</ ol >
@@ -10325,26 +10331,26 @@ <h3><dfn>Release Actions</dfn></h3>
1032510331 is < a > no longer open</ a > , return < a > error</ a > with < a > error
1032610332 code</ a > < a > no such window</ a > .
1032710333
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 > .
1033110336
1033210337 < li > < p > Let < var > actions options</ var > be a new < a > actions options</ a >
1033310338 with the < a > is element origin</ a > steps set to < a > represents a web
1033410339 element</ a > , and the < a > get element origin</ a > steps set
1033510340 to < a > get a WebElement origin</ a > .
1033610341
10342+ < li > < p > < a > Wait for an action queue token</ a > with < var > input state</ var > .
10343+
1033710344 < 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 > .
1033910350
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 > .
1034410351
1034510352 < 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 > .
1034810354
1034910355 < li > < p > Return < a > success</ a > with data < a > < code > null</ code > </ a > .
1035010356</ ol >
0 commit comments