Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) Make sure close() on EventSource works well with fetch().
git-svn-id: http://svn.whatwg.org/webapps@6252 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 17, 2011
1 parent 32bc24c commit d92d43e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
29 changes: 16 additions & 13 deletions complete.html
Expand Up @@ -78901,10 +78901,10 @@ <h4 id=the-eventsource-interface><span class=secno>11.2.2 </span>The <code><a hr
changes.</p>

<p>The <dfn id=dom-eventsource-close title=dom-EventSource-close><code>close()</code></dfn>
method must close the connection, if any; must abort any
reconnection attempt, if any; and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
<code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>. If the
connection is already closed, the method must do nothing.</p>
method must close the connection, if any; must abort any instances
of the <a href=#fetch>fetch</a> algorithm started for this
<code><a href=#eventsource>EventSource</a></code> object; and must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
<code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>.</p>

<p>The following are the <a href=#event-handlers>event handlers</a> (and their
corresponding <a href=#event-handler-event-type title="event handler event type">event handler
Expand Down Expand Up @@ -79015,18 +79015,19 @@ <h4 id=processing-model-5><span class=secno>11.2.3 </span>Processing model</h4>
task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named <code title=event-open>open</code> at the
<code><a href=#eventsource>EventSource</a></code> object.</p>

<p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>, the user
agent must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
<p>When a user agent is to <dfn id=reestablish-the-connection>reestablish the connection</dfn>,
the user agent must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
<code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>,
<a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a> named
<code title=event-error>error</code> at the
<code><a href=#eventsource>EventSource</a></code> object, and then <a href=#fetch>fetch</a> the
event source resource again after a delay equal to the reconnection
time of the event source, from the same <a href=#origin>origin</a> as the
original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code>
constructor. <strong>Only if the user agent <a href=#reestablish-the-connection title="reestablish the
connection">reestablishes the connection</a> does the connection get
opened anew!</strong></p>
<code><a href=#eventsource>EventSource</a></code> object, and then, after a delay equal to
the reconnection time of the event source, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
still set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>,
<a href=#fetch>fetch</a> the event source resource again from the same
<a href=#origin>origin</a> as the original request triggered by the <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor.
<strong>Only if the user agent <a href=#reestablish-the-connection title="reestablish the
connection">reestablishes the connection</a> does the connection
get opened anew!</strong></p>

<p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
agent must set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
Expand Down Expand Up @@ -100478,7 +100479,9 @@ <h3 class="no-num">Reflecting IDL attributes</h3>
Henry Mason,
Hugh Winkler,
Ian Bicking,
Ian Clelland,
Ian Davis,
Ian Fette,
Ignacio Javier,
Ivan Enderlin,
Ivo Emanuel Gon&ccedil;alves,
Expand Down
2 changes: 2 additions & 0 deletions index
Expand Up @@ -96230,7 +96230,9 @@ interface <a href=#htmldocument>HTMLDocument</a> {
Henry Mason,
Hugh Winkler,
Ian Bicking,
Ian Clelland,
Ian Davis,
Ian Fette,
Ignacio Javier,
Ivan Enderlin,
Ivo Emanuel Gon&ccedil;alves,
Expand Down
33 changes: 19 additions & 14 deletions source
Expand Up @@ -89433,11 +89433,11 @@ interface <dfn>EventSource</dfn> {
changes.</p>

<p>The <dfn title="dom-EventSource-close"><code>close()</code></dfn>
method must close the connection, if any; must abort any
reconnection attempt, if any; and must set the <code
method must close the connection, if any; must abort any instances
of the <span>fetch</span> algorithm started for this
<code>EventSource</code> object; and must set the <code
title="dom-EventSource-readyState">readyState</code> attribute to
<code title="dom-EventSource-CLOSED">CLOSED</code>. If the
connection is already closed, the method must do nothing.</p>
<code title="dom-EventSource-CLOSED">CLOSED</code>.</p>

<p>The following are the <span>event handlers</span> (and their
corresponding <span title="event handler event type">event handler
Expand Down Expand Up @@ -89574,20 +89574,23 @@ interface <dfn>EventSource</dfn> {
title="event-open">open</code> at the
<code>EventSource</code> object.</p>

<p>When a user agent is to <dfn>reestablish the connection</dfn>, the user
agent must set the <code
<p>When a user agent is to <dfn>reestablish the connection</dfn>,
the user agent must set the <code
title="dom-EventSource-readyState">readyState</code> attribute to
<code title="dom-EventSource-CONNECTING">CONNECTING</code>,
<span>queue a task</span> to <span>fire a simple event</span> named
<code title="event-error">error</code> at the
<code>EventSource</code> object, and then <span>fetch</span> the
event source resource again after a delay equal to the reconnection
time of the event source, from the same <span>origin</span> as the
original request triggered by the <code
title="dom-EventSource">EventSource()</code>
constructor. <strong>Only if the user agent <span title="reestablish the
connection">reestablishes the connection</span> does the connection get
opened anew!</strong></p>
<code>EventSource</code> object, and then, after a delay equal to
the reconnection time of the event source, if the <code
title="dom-EventSource-readyState">readyState</code> attribute is
still set to <code
title="dom-EventSource-CONNECTING">CONNECTING</code>,
<span>fetch</span> the event source resource again from the same
<span>origin</span> as the original request triggered by the <code
title="dom-EventSource">EventSource()</code> constructor.
<strong>Only if the user agent <span title="reestablish the
connection">reestablishes the connection</span> does the connection
get opened anew!</strong></p>

<p>When a user agent is to <dfn>fail the connection</dfn>, the user
agent must set the <code
Expand Down Expand Up @@ -114692,7 +114695,9 @@ interface <span>HTMLDocument</span> {
Henry Mason,
Hugh Winkler,
Ian Bicking,
Ian Clelland,
Ian Davis,
Ian Fette,
Ignacio Javier,
Ivan Enderlin,
Ivo Emanuel Gon&ccedil;alves,
Expand Down

0 comments on commit d92d43e

Please sign in to comment.