Skip to content

Commit

Permalink
Fix task queueing
Browse files Browse the repository at this point in the history
  • Loading branch information
markafoltz committed Sep 15, 2024
1 parent 74d1a41 commit 8b604c0
Showing 1 changed file with 41 additions and 28 deletions.
69 changes: 41 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ <h2>
context of {{Promise}} objects are used as defined in [[!ECMASCRIPT]].
</p>
<p>
The terms <dfn data-cite="rfc9110#field.accept-language">Accept-Language</dfn>
and <dfn data-cite="rfc9110#authentication">HTTP authentication</dfn> are
The terms <dfn data-cite=
"rfc9110#field.accept-language">Accept-Language</dfn> and
<dfn data-cite="rfc9110#authentication">HTTP authentication</dfn> are
used as defined in [[!RFC9110]].
</p>
<p>
Expand Down Expand Up @@ -840,6 +841,10 @@ <h3>
<p>
Unless otherwise specified, the <a>JavaScript realm</a> for script
objects constructed by algorithm steps is the <a>current realm</a>.
Unless otherwise specified, all global tasks use the <a data-cite=
"!HTML#networking-task-source">networking task source</a> associated
with the <a data-cite="!HTML#global-object">global object</a> of the
<a>current realm</a>.
</p>
</section>
<section>
Expand Down Expand Up @@ -1037,6 +1042,10 @@ <h4>
<h4>
Selecting a presentation display
</h4>
<p>
The global tasks queued in these steps use the <a data-cite=
"!HTML#-interaction-task-source">user interaction task source</a>.
</p>
<p>
When the <code><dfn data-dfn-for=
"PresentationRequest">start</dfn></code> method is called, the
Expand Down Expand Up @@ -1104,16 +1113,17 @@ <h4>
</ol>Then run the following steps:
<ol>
<li>
<a>Reject</a> <var>P</var> with a {{NotFoundError}}
exception.
<a data-cite="!HTML#queue-a-global-task">Queue a global
task</a> to <a>reject</a> <var>P</var> with a
{{NotFoundError}} exception.
</li>
<li>Abort all remaining steps.
</li>
</ol>
</li>
<li>If the user <em>denies permission</em> to use a display, reject
<var>P</var> with an {{NotAllowedError}} exception, and abort all
remaining steps.
<li>If the user <em>denies permission</em> to use a display,
<a>queue a global task</a> to reject <var>P</var> with an
{{NotAllowedError}} exception, and abort all remaining steps.
</li>
<li>Otherwise, the user <em>grants permission</em> to use a
display; let <var>D</var> be that display.
Expand Down Expand Up @@ -1250,10 +1260,10 @@ <h4>
<var>S</var>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named <a data-link-for=
"PresentationRequest">connectionavailable</a>, that uses the
<a>PresentationConnectionAvailableEvent</a> interface, with the
<a data-link-for=
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for="PresentationRequest">connectionavailable</a>,
that uses the <a>PresentationConnectionAvailableEvent</a>
interface, with the <a data-link-for=
"PresentationConnectionAvailableEvent">connection</a> attribute
initialized to <var>S</var>, at <var>presentationRequest</var>.
The event must not bubble and must not be cancelable.
Expand Down Expand Up @@ -1341,8 +1351,8 @@ <h4>
<a>PresentationConnection</a>.
</li>
<li>
<a>Resolve</a> <var>P</var> with
<var>existingConnection</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with <var>existingConnection</var>.
</li>
<li>If the <a>presentation connection state</a> of
<var>existingConnection</var> is <a data-link-for=
Expand Down Expand Up @@ -1404,10 +1414,11 @@ <h4>
presentations</a>.
</li>
<li>
<a>Resolve</a> <var>P</var> with <var>newConnection</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with <var>newConnection</var>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for=
"PresentationRequest">connectionavailable</a>, that uses the
<a>PresentationConnectionAvailableEvent</a> interface, with
Expand All @@ -1426,7 +1437,8 @@ <h4>
</ol>
</li>
<li>
<a>Reject</a> <var>P</var> with a {{NotFoundError}} exception.
<a>Queue a global task</a> to <a>reject</a> <var>P</var> with a
{{NotFoundError}} exception.
</li>
</ol>
</section>
Expand Down Expand Up @@ -1620,8 +1632,8 @@ <h4>
then:
<ol>
<li>
<a>Reject</a> <var>P</var> with a {{NotSupportedError}}
exception.
<a>Queue a global task</a> to <a>reject</a> <var>P</var> with
a {{NotSupportedError}} exception.
</li>
<li>Abort all the remaining steps.
</li>
Expand All @@ -1631,8 +1643,8 @@ <h4>
<var>presentationRequest</var> is not <code>null</code>, then:
<ol>
<li>
<a>Resolve</a> <var>P</var> with the request's
<a>presentation display availability</a>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var>
with the request's <a>presentation display availability</a>.
</li>
<li>Abort all the remaining steps.
</li>
Expand All @@ -1657,7 +1669,8 @@ <h4>
</div>
</li>
<li>
<a>Resolve</a> <var>P</var> with <var>A</var>.
<a>Queue a global task</a> to <a>resolve</a> <var>P</var> with
<var>A</var>.
</li>
</ol>
</section>
Expand Down Expand Up @@ -2220,8 +2233,8 @@ <h4>
</ol>
</li>
<li>
<a>Queue a task</a> to [=fire an event|fire=] <var>event</var> at
<var>presentationConnection</var>.
<a>Queue a global task</a> to [=fire an event|fire=]
<var>event</var> at <var>presentationConnection</var>.
</li>
</ol>
<p>
Expand Down Expand Up @@ -2386,7 +2399,7 @@ <h4>
<var>presentationConnection</var>, then abort the remaining steps.
</li>
<li>
<a>Queue a task</a> to run the following steps:
<a>Queue a global task</a> to run the following steps:
<ol>
<li>If the <a>presentation connection state</a> of
<var>presentationConnection</var> is not <a data-link-for=
Expand Down Expand Up @@ -2920,9 +2933,9 @@ <h4>
the <a>set of presentation controllers</a>.
</li>
<li>If the <a>presentation controllers promise</a> is not
<code>null</code>, <a>resolve</a> the <a>presentation
controllers promise</a> with the <a>presentation controllers
monitor</a>.
<code>null</code>, <a>queue a global task</a> to <a>resolve</a>
the <a>presentation controllers promise</a> with the
<a>presentation controllers monitor</a>.
</li>
<li>Abort all remaining steps.
</li>
Expand All @@ -2934,7 +2947,7 @@ <h4>
the <a>set of presentation controllers</a>.
</li>
<li>
<a>Queue a task</a> to [=fire an event=] named
<a>Queue a global task</a> to [=fire an event=] named
<a data-link-for=
"PresentationConnectionList">connectionavailable</a>, that
uses the <a>PresentationConnectionAvailableEvent</a>
Expand Down

0 comments on commit 8b604c0

Please sign in to comment.