Skip to content
Permalink
Browse files

Editorial: less continue after returning

This fixes EventSource and WebSocket to follow a more accepted pattern for "in parallel".

Fixes #692.
  • Loading branch information...
annevk committed Jan 23, 2018
1 parent 539326c commit 0d097af1acbeabe56a1b0d0c2e2f521eca4defa8
Showing with 24 additions and 16 deletions.
  1. +24 −16 source
40 source
<li><p>Set <var>ev</var>'s <span data-x="concept-event-stream-request">request</span> to
<var>request</var>.</p></li>

<li><p>Return <var>ev</var>, but continue these steps <span>in parallel</span>.</p></li>
<li>
<p>Run this step <span>in parallel</span>:</p>

<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>.</p></li>
<ol>
<!--FETCH--><li><p><span data-x="concept-fetch">Fetch</span> <var>request</var>.</p></li>
</ol>

<li><p>Return <var>ev</var>.</p></li>
</ol>

<hr>
WebSocket protocol specification, then throw a <span>"<code>SyntaxError</code>"</span>
<code>DOMException</code>. <ref spec=WSP></p></li>

<li><p>Return a new <code>WebSocket</code> object whose <span
data-x="concept-websocket-url">url</span> is <var>urlRecord</var>, but continue these steps
<span>in parallel</span>.</p></li>

<li>
<p><span data-x="concept-websocket-establish">Establish a WebSocket connection</span> given
<var>urlRecord</var>, <var>protocols</var>, and the <span>entry settings object</span>. <ref
spec=FETCH></p>
<p>Run this step <span>in parallel</span>:</p>

<ol>
<li>
<p><span data-x="concept-websocket-establish">Establish a WebSocket connection</span> given
<var>urlRecord</var>, <var>protocols</var>, and the <span>entry settings object</span>. <ref
spec=FETCH></p>

<p class="note">If the <span data-x="concept-websocket-establish">establish a WebSocket
connection</span> algorithm fails, it triggers the <i data-x="concept-websocket-fail">fail the
WebSocket connection</i> algorithm, which then invokes the <i
data-x="concept-websocket-close">close the WebSocket connection</i> algorithm, which then
establishes that <i data-x="concept-websocket-closed">the WebSocket connection is closed</i>,
which fires the <code data-x="event-close">close</code> event <a href="#closeWebSocket">as
described below</a>.</p>
<p class="note">If the <span data-x="concept-websocket-establish">establish a WebSocket
connection</span> algorithm fails, it triggers the <i data-x="concept-websocket-fail">fail the
WebSocket connection</i> algorithm, which then invokes the <i
data-x="concept-websocket-close">close the WebSocket connection</i> algorithm, which then
establishes that <i data-x="concept-websocket-closed">the WebSocket connection is closed</i>,
which fires the <code data-x="event-close">close</code> event <a href="#closeWebSocket">as
described below</a>.</p>
</li>
</ol>
</li>

<li><p>Return a new <code>WebSocket</code> object whose <span
data-x="concept-websocket-url">url</span> is <var>urlRecord</var>.</p></li>
</ol>

<hr>

0 comments on commit 0d097af

Please sign in to comment.
You can’t perform that action at this time.