Skip to content

Commit

Permalink
Editorial: less continue after returning
Browse files Browse the repository at this point in the history
This fixes EventSource and WebSocket to follow a more accepted pattern for "in parallel".

Fixes whatwg#692.
  • Loading branch information
annevk committed Jan 24, 2018
1 parent 539326c commit 0d097af
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -93848,10 +93848,14 @@ dictionary <dfn>EventSourceInit</dfn> {
<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>
Expand Down Expand Up @@ -94689,24 +94693,28 @@ interface <dfn>WebSocket</dfn> : <span>EventTarget</span> {
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>
Expand Down

0 comments on commit 0d097af

Please sign in to comment.