Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9120,18 +9120,16 @@ <h3>Dispatching actions</h3>
grouped by <a>tick</a>, and then causes each action to be run at the
appropriate point in the sequence.

<p>To <dfn>dispatch actions</dfn> given <var>input
state</var>, <var>actions by tick</var>, <var>browsing
context</var>, and <var>actions options</var>:
<p>To <dfn>wait for an action queue token</dfn> given <var>input state</var>:

<ol class=algorithm>
<li><p>Let <var>token</var> be a new unique identifier.

<li><p>Enqueue <var>token</var> in <var>input state</var>&apos;s <a>actions
queue</a>.
<li><p>Enqueue <var>token</var> in <var>input state</var>&apos;s
<a>actions queue</a>.

<li><p>Wait for <var>token</var> to be the first item
in <var>input state</var>&apos;s <a>actions queue</a>.
in <var>input state</var>&apos;s <a>actions queue</a>.

<aside class=note>
<p>This ensures that only one set of actions can be run at a time,
Expand All @@ -9141,13 +9139,21 @@ <h3>Dispatching actions</h3>
session types can allow running multiple commands in parallel, in
which case this is necessary to ensure sequential access.
</aside>
</ol>

<p>To <dfn>dispatch actions</dfn> given <var>input
state</var>, <var>actions by tick</var>, <var>browsing
context</var>, and <var>actions options</var>:

<ol class=algorithm>
<li><p><a>Wait for an action queue token</a> with <var>input state</var>.

<li><p>Let <var>actions result</var> be the result of <a>dispatch
actions inner</a> with <var>input state</var>, <var>actions by
tick</var>, <var>browsing context</var>, and <var>actions options</var>.
<li><p>Let <var>actions result</var> be the result of
<a>dispatch actions inner</a> with <var>input state</var>, <var>actions by
tick</var>, <var>browsing context</var>, and <var>actions options</var>.

<li><p>Dequeue <var>input state</var>&apos;s <a>actions queue</a>.
<p>Assert: this returns <var>token</var>
<p>Assert: this returns <var>token</var>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that "wait for an action queue token" is a separate algorithm, there is no token variable here in "dispatch actions".


<li><p>Return <var>actions result</var>.
</ol>
Expand Down Expand Up @@ -10325,26 +10331,29 @@ <h3><dfn>Release Actions</dfn></h3>
is <a>no longer open</a>, return <a>error</a> with <a>error
code</a> <a>no such window</a>.

<li><p>Let <var>input state</var> be the result of <a>get the
input state</a> with <a>session</a> and <a>current
top-level browsing context</a>.
<li><p>Let <var>input state</var> be the result of <a>get the input state</a>
with <a>session</a> and <a>current top-level browsing context</a>.

<li><p>Let <var>actions options</var> be a new <a>actions options</a>
with the <a>is element origin</a> steps set to <a>represents a web
element</a>, and the <a>get element origin</a> steps set
to <a>get a WebElement origin</a>.

<li><p>Call <a>wait for an action queue token</a> with <var>input state</var>.
Comment thread
whimboo marked this conversation as resolved.
Outdated

<li><p>Let <var>undo actions</var> be <var>input
state</var>&apos;s <a>input cancel list</a> in reverse order.
state</var>&apos;s <a>input cancel list</a> in reverse order.

<li><p><a>Try</a> to <a>dispatch tick actions</a> with arguments
<var>undo
actions</var>, <code>0</code>,<var>session</var>&apos;s <a>current
browsing context</a>, and <a>actions options</a>.
<li><p><a>Dispatch actions</a> with <var>input state</var>,
<var>undo actions</var>, <a>current browsing context</a>,
and <var>actions options</var>. If this results in an <a>error</a>
return that error.
Comment thread
whimboo marked this conversation as resolved.
Outdated

<li><p>Dequeue <var>input state</var>&apos;s <a>actions queue</a>.
<p>Assert: this returns <var>token</var>
Comment thread
whimboo marked this conversation as resolved.
Outdated

<li><p><a>Reset the input state</a> with <var>session</var>
and <var>session</var>&apos;s <a>current top-level browsing
context</a>.
and <var>session</var>&apos;s <a>current top-level browsing context</a>.

<li><p>Return <a>success</a> with data <a><code>null</code></a>.
</ol>
Expand Down