[html5] r6772 - [giow] (1) Make sure once you call closed() that EventSource objects stay down. [...]
whatwg at whatwg.org
whatwg at whatwg.org
Thu Oct 27 13:27:23 PDT 2011
Author: ianh
Date: 2011-10-27 13:27:22 -0700 (Thu, 27 Oct 2011)
New Revision: 6772
Modified:
complete.html
index
source
Log:
[giow] (1) Make sure once you call closed() that EventSource objects stay down.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14331
Modified: complete.html
===================================================================
--- complete.html 2011-10-27 20:02:03 UTC (rev 6771)
+++ complete.html 2011-10-27 20:27:22 UTC (rev 6772)
@@ -80195,9 +80195,10 @@
<a href=#networking-task-source>networking task source</a> places on the <a href=#task-queue>task
queue</a> once the <a href=#fetch title=fetch>fetching algorithm</a>
for such a resource (with the correct <a href=#mime-type>MIME type</a>) has
- completed must <a href=#reestablish-the-connection>reestablish the connection</a>. This applies
- whether the connection is closed gracefully or unexpectedly. It
- doesn't apply for the error conditions listed below.</p>
+ completed must cause the user agent to asynchronously
+ <a href=#reestablish-the-connection>reestablish the connection</a>. This applies whether the
+ connection is closed gracefully or unexpectedly. It doesn't apply
+ for the error conditions listed below.</p>
<p>HTTP 200 OK responses that have a <a href=#content-type>Content-Type</a>
specifying an unsupported type (including the
@@ -80238,37 +80239,68 @@
<p>For non-HTTP protocols, UAs should act in equivalent ways.</p>
<hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the
- user agent must <a href=#queue-a-task>queue a task</a> to set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <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>
+ user agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
+ <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire
+ a simple event">fires 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 <a href=#queue-a-task>queue a task</a> to 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> and
- <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, 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>, once again do
- a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of the <a href=#absolute-url>absolute
- URL</a> of the event source resource, with the <i>mode</i> being
- <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use
- Credentials</a>, and the <i title="">origin</i> being the same as the
- <a href=#origin>origin</a> used in the original request triggered by the
- <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor<!--,
- and the <i>default origin behaviour</i> set to <i>fail</i> (though
- it has no effect in the "Use Credentials" mode)-->, and process the
- resource obtained in this fashion, if any, as described in this
- section.</p>
+ the user agent must run the following steps. These steps are run
+ asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of
+ course, are run like normal tasks and not asynchronously.)</p>
- <p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
- agent must <a href=#queue-a-task>queue a task</a> to 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> and <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. <strong>Once the user agent has
- <a href=#fail-the-connection title="fail the connection">failed the connection</a>, it
- does <em>not</em> attempt to reconnect!</strong></p>
+ <ol><li>
+ <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort
+ the task.</li>
+
+ <li><p>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>.</li>
+
+ <li><p><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.</li>
+
+ </ol></li>
+
+ <li><p>Wait a delay equal to the reconnection time of the event
+ source.</li>
+
+ <li><p>Wait until the aforementioned task has run, if it has not
+ yet run.</li>
+
+ <li>
+
+ <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ not set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these
+ steps.</li>
+
+ <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of
+ the <a href=#absolute-url>absolute URL</a> of the event source resource, with
+ the <i>mode</i> being <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use Credentials</a>,
+ and the <i title="">origin</i> being the same as the
+ <a href=#origin>origin</a> used in the original request triggered by the
+ <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code>
+ constructor<!--, and the <i>default origin behaviour</i> set to
+ <i>fail</i> (though it has no effect in the "Use Credentials"
+ mode)-->, and process the resource obtained in this fashion, if
+ any, as described earlier in this section.</li>
+
+ </ol></li>
+
+ </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
+ agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets 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> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
+ object. <strong>Once the user agent has <a href=#fail-the-connection title="fail the
+ connection">failed the connection</a>, it does <em>not</em>
+ attempt to reconnect!</strong></p>
+
<hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a
task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the
<dfn id=remote-event-task-source>remote event task source</dfn>.</p>
Modified: index
===================================================================
--- index 2011-10-27 20:02:03 UTC (rev 6771)
+++ index 2011-10-27 20:27:22 UTC (rev 6772)
@@ -80195,9 +80195,10 @@
<a href=#networking-task-source>networking task source</a> places on the <a href=#task-queue>task
queue</a> once the <a href=#fetch title=fetch>fetching algorithm</a>
for such a resource (with the correct <a href=#mime-type>MIME type</a>) has
- completed must <a href=#reestablish-the-connection>reestablish the connection</a>. This applies
- whether the connection is closed gracefully or unexpectedly. It
- doesn't apply for the error conditions listed below.</p>
+ completed must cause the user agent to asynchronously
+ <a href=#reestablish-the-connection>reestablish the connection</a>. This applies whether the
+ connection is closed gracefully or unexpectedly. It doesn't apply
+ for the error conditions listed below.</p>
<p>HTTP 200 OK responses that have a <a href=#content-type>Content-Type</a>
specifying an unsupported type (including the
@@ -80238,37 +80239,68 @@
<p>For non-HTTP protocols, UAs should act in equivalent ways.</p>
<hr><p>When a user agent is to <dfn id=announce-the-connection>announce the connection</dfn>, the
- user agent must <a href=#queue-a-task>queue a task</a> to set the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
- <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <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>
+ user agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute to
+ <code title=dom-EventSource-OPEN><a href=#dom-eventsource-open>OPEN</a></code> and <a href=#fire-a-simple-event title="fire
+ a simple event">fires 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 <a href=#queue-a-task>queue a task</a> to 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> and
- <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, 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>, once again do
- a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of the <a href=#absolute-url>absolute
- URL</a> of the event source resource, with the <i>mode</i> being
- <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use
- Credentials</a>, and the <i title="">origin</i> being the same as the
- <a href=#origin>origin</a> used in the original request triggered by the
- <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code> constructor<!--,
- and the <i>default origin behaviour</i> set to <i>fail</i> (though
- it has no effect in the "Use Credentials" mode)-->, and process the
- resource obtained in this fashion, if any, as described in this
- section.</p>
+ the user agent must run the following steps. These steps are run
+ asynchronously, not as part of a <a href=#concept-task title=concept-task>task</a>. (The tasks that it queues, of
+ course, are run like normal tasks and not asynchronously.)</p>
- <p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
- agent must <a href=#queue-a-task>queue a task</a> to 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> and <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. <strong>Once the user agent has
- <a href=#fail-the-connection title="fail the connection">failed the connection</a>, it
- does <em>not</em> attempt to reconnect!</strong></p>
+ <ol><li>
+ <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, abort
+ the task.</li>
+
+ <li><p>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>.</li>
+
+ <li><p><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.</li>
+
+ </ol></li>
+
+ <li><p>Wait a delay equal to the reconnection time of the event
+ source.</li>
+
+ <li><p>Wait until the aforementioned task has run, if it has not
+ yet run.</li>
+
+ <li>
+
+ <p><a href=#queue-a-task>Queue a task</a> to run the following steps:</p>
+
+ <ol><li><p>If the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ not set to <code title=dom-EventSource-CONNECTING><a href=#dom-eventsource-connecting>CONNECTING</a></code>, abort these
+ steps.</li>
+
+ <li><p>Perform a <a href=#potentially-cors-enabled-fetch>potentially CORS-enabled fetch</a> of
+ the <a href=#absolute-url>absolute URL</a> of the event source resource, with
+ the <i>mode</i> being <a href=#attr-crossorigin-use-credentials title=attr-crossorigin-use-credentials>Use Credentials</a>,
+ and the <i title="">origin</i> being the same as the
+ <a href=#origin>origin</a> used in the original request triggered by the
+ <code title=dom-EventSource><a href=#dom-eventsource>EventSource()</a></code>
+ constructor<!--, and the <i>default origin behaviour</i> set to
+ <i>fail</i> (though it has no effect in the "Use Credentials"
+ mode)-->, and process the resource obtained in this fashion, if
+ any, as described earlier in this section.</li>
+
+ </ol></li>
+
+ </ol><p>When a user agent is to <dfn id=fail-the-connection>fail the connection</dfn>, the user
+ agent must <a href=#queue-a-task>queue a task</a> which, if the <code title=dom-EventSource-readyState><a href=#dom-eventsource-readystate>readyState</a></code> attribute is
+ set to a value other than <code title=dom-EventSource-CLOSED><a href=#dom-eventsource-closed>CLOSED</a></code>, sets 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> and <a href=#fire-a-simple-event title="fire a simple event">fires a simple event</a> named <code title=event-error>error</code> at the <code><a href=#eventsource>EventSource</a></code>
+ object. <strong>Once the user agent has <a href=#fail-the-connection title="fail the
+ connection">failed the connection</a>, it does <em>not</em>
+ attempt to reconnect!</strong></p>
+
<hr><p>The <a href=#task-source>task source</a> for any <a href=#concept-task title=concept-task>tasks</a> that are <a href=#queue-a-task title="queue a
task">queued</a> by <code><a href=#eventsource>EventSource</a></code> objects is the
<dfn id=remote-event-task-source>remote event task source</dfn>.</p>
Modified: source
===================================================================
--- source 2011-10-27 20:02:03 UTC (rev 6771)
+++ source 2011-10-27 20:27:22 UTC (rev 6772)
@@ -90762,9 +90762,10 @@
<span>networking task source</span> places on the <span>task
queue</span> once the <span title="fetch">fetching algorithm</span>
for such a resource (with the correct <span>MIME type</span>) has
- completed must <span>reestablish the connection</span>. This applies
- whether the connection is closed gracefully or unexpectedly. It
- doesn't apply for the error conditions listed below.</p>
+ completed must cause the user agent to asynchronously
+ <span>reestablish the connection</span>. This applies whether the
+ connection is closed gracefully or unexpectedly. It doesn't apply
+ for the error conditions listed below.</p>
<p>HTTP 200 OK responses that have a <span>Content-Type</span>
specifying an unsupported type (including the
@@ -90808,42 +90809,96 @@
<hr>
<p>When a user agent is to <dfn>announce the connection</dfn>, the
- user agent must <span>queue a task</span> to set the <code
+ user agent must <span>queue a task</span> which, if the <code
+ title="dom-EventSource-readyState">readyState</code> attribute is
+ set to a value other than <code
+ title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-OPEN">OPEN</code> and <span>fire a
- simple event</span> named <code title="event-open">open</code> at
- the <code>EventSource</code> object.</p>
+ <code title="dom-EventSource-OPEN">OPEN</code> and <span title="fire
+ a simple event">fires a simple event</span> named <code
+ 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 <span>queue a task</span> to set the <code
- title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-CONNECTING">CONNECTING</code> and
- <span>fire a simple event</span> named <code
- title="event-error">error</code> at the <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>, once again do
- a <span>potentially CORS-enabled fetch</span> of the <span>absolute
- URL</span> of the event source resource, with the <i>mode</i> being
- <span title="attr-crossorigin-use-credentials">Use
- Credentials</span>, and the <i title="">origin</i> being the same as the
- <span>origin</span> used in the original request triggered by the
- <code title="dom-EventSource">EventSource()</code> constructor<!--,
- and the <i>default origin behaviour</i> set to <i>fail</i> (though
- it has no effect in the "Use Credentials" mode)-->, and process the
- resource obtained in this fashion, if any, as described in this
- section.</p>
+ the user agent must run the following steps. These steps are run
+ asynchronously, not as part of a <span
+ title="concept-task">task</span>. (The tasks that it queues, of
+ course, are run like normal tasks and not asynchronously.)</p>
+ <ol>
+
+ <li>
+
+ <p><span>Queue a task</span> to run the following steps:</p>
+
+ <ol>
+
+ <li><p>If the <code
+ title="dom-EventSource-readyState">readyState</code> attribute is
+ set to <code title="dom-EventSource-CLOSED">CLOSED</code>, abort
+ the task.</p></li>
+
+ <li><p>Set the <code
+ title="dom-EventSource-readyState">readyState</code> attribute to
+ <code
+ title="dom-EventSource-CONNECTING">CONNECTING</code>.</p></li>
+
+ <li><p><span>Fire a simple event</span> named <code
+ title="event-error">error</code> at the <code>EventSource</code>
+ object.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li><p>Wait a delay equal to the reconnection time of the event
+ source.</li>
+
+ <li><p>Wait until the aforementioned task has run, if it has not
+ yet run.</p></li>
+
+ <li>
+
+ <p><span>Queue a task</span> to run the following steps:</p>
+
+ <ol>
+
+ <li><p>If the <code
+ title="dom-EventSource-readyState">readyState</code> attribute is
+ not set to <code
+ title="dom-EventSource-CONNECTING">CONNECTING</code>, abort these
+ steps.</p></li>
+
+ <li><p>Perform a <span>potentially CORS-enabled fetch</span> of
+ the <span>absolute URL</span> of the event source resource, with
+ the <i>mode</i> being <span
+ title="attr-crossorigin-use-credentials">Use Credentials</span>,
+ and the <i title="">origin</i> being the same as the
+ <span>origin</span> used in the original request triggered by the
+ <code title="dom-EventSource">EventSource()</code>
+ constructor<!--, and the <i>default origin behaviour</i> set to
+ <i>fail</i> (though it has no effect in the "Use Credentials"
+ mode)-->, and process the resource obtained in this fashion, if
+ any, as described earlier in this section.</p></li>
+
+ </ol>
+
+ </li>
+
+ </ol>
+
<p>When a user agent is to <dfn>fail the connection</dfn>, the user
- agent must <span>queue a task</span> to set the <code
+ agent must <span>queue a task</span> which, if the <code
+ title="dom-EventSource-readyState">readyState</code> attribute is
+ set to a value other than <code
+ title="dom-EventSource-CLOSED">CLOSED</code>, sets the <code
title="dom-EventSource-readyState">readyState</code> attribute to
- <code title="dom-EventSource-CLOSED">CLOSED</code> and <span>fire a
- simple event</span> named <code title="event-error">error</code> at
- the <code>EventSource</code> object. <strong>Once the user agent has
- <span title="fail the connection">failed the connection</span>, it
- does <em>not</em> attempt to reconnect!</strong></p>
+ <code title="dom-EventSource-CLOSED">CLOSED</code> and <span
+ title="fire a simple event">fires a simple event</span> named <code
+ title="event-error">error</code> at the <code>EventSource</code>
+ object. <strong>Once the user agent has <span title="fail the
+ connection">failed the connection</span>, it does <em>not</em>
+ attempt to reconnect!</strong></p>
<hr>
More information about the Commit-Watchers
mailing list