Skip to content

Commit

Permalink
[e] (0) Make the EventSource processing model a mite more generic to …
Browse files Browse the repository at this point in the history
…allow other user agent types to implement this spec.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23693
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8475 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 8, 2014
1 parent b1e14d3 commit 46fafeb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 15 deletions.
15 changes: 10 additions & 5 deletions complete.html
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 February 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 8 February 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -79796,8 +79796,8 @@ <h4 id=event-stream-interpretation><span class=secno>9.2.5 </span>Interpreting a

<dt>If the field name is "reconnect"</dt>

<dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
event</a> as defined below, and then drop the connection and immediately reconnect as if the
<dd><p>If the field value is the empty string, then: <span>dispatch the
event</span> as defined below, and then drop the connection and immediately reconnect as if the
<span title="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
one time.</p></dd>

Expand All @@ -79807,8 +79807,11 @@ <h4 id=event-stream-interpretation><span class=secno>9.2.5 </span>Interpreting a

<dd><p>The field is ignored.</dd>

</dl><p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>,
then the user agent must act as follows:
</dl><p>When the user agent is required to <dfn id=dispatchMessage>dispatch the
event</dfn>, the user agent must process the <var title="">data</var> buffer, the <var title="">event type</var> buffer, and the <var title="">last event ID</var> buffer using steps
appropriate for the user agent.</p>

<p>For Web browsers, the appropriate steps to <a href=#dispatchMessage>dispatch the event</a> are as follows:</p>

<ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of
the event source to the value of the <var title="">last event ID</var> buffer. The buffer does
Expand Down Expand Up @@ -79847,6 +79850,8 @@ <h4 id=event-stream-interpretation><span class=secno>9.2.5 </span>Interpreting a
event's <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> field will be set to the
value of whatever the last seen "id" field was.</p>

<p>For other user agents, the appropriate steps to <a href=#dispatchMessage>dispatch the event</a> are
implementation dependent, but at a minimum they must set the <var title="">data</var> and <var title="">event type</var> buffers to the empty string before returning.</p>

<div class=example>

Expand Down
15 changes: 10 additions & 5 deletions index
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 7 February 2014</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 8 February 2014</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -79796,8 +79796,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dt>If the field name is "reconnect"</dt>

<dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
event</a> as defined below, and then drop the connection and immediately reconnect as if the
<dd><p>If the field value is the empty string, then: <span>dispatch the
event</span> as defined below, and then drop the connection and immediately reconnect as if the
<span title="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
one time.</p></dd>

Expand All @@ -79807,8 +79807,11 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dd><p>The field is ignored.</dd>

</dl><p id=dispatchMessage>When the user agent is required to <dfn title="">dispatch the event</dfn>,
then the user agent must act as follows:
</dl><p>When the user agent is required to <dfn id=dispatchMessage>dispatch the
event</dfn>, the user agent must process the <var title="">data</var> buffer, the <var title="">event type</var> buffer, and the <var title="">last event ID</var> buffer using steps
appropriate for the user agent.</p>

<p>For Web browsers, the appropriate steps to <a href=#dispatchMessage>dispatch the event</a> are as follows:</p>

<ol><li><p>Set the <a href=#concept-event-stream-last-event-id title=concept-event-stream-last-event-id>last event ID string</a> of
the event source to the value of the <var title="">last event ID</var> buffer. The buffer does
Expand Down Expand Up @@ -79847,6 +79850,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
event's <code title=dom-MessageEvent-lastEventId><a href=#dom-messageevent-lasteventid>lastEventId</a></code> field will be set to the
value of whatever the last seen "id" field was.</p>

<p>For other user agents, the appropriate steps to <a href=#dispatchMessage>dispatch the event</a> are
implementation dependent, but at a minimum they must set the <var title="">data</var> and <var title="">event type</var> buffers to the empty string before returning.</p>

<div class=example>

Expand Down
17 changes: 12 additions & 5 deletions source
Expand Up @@ -89327,7 +89327,7 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dt>If the line is empty (a blank line)</dt>

<dd><p><a href="#dispatchMessage">Dispatch the event</a>, as defined below.</p></dd>
<dd><p><span>Dispatch the event</span>, as defined below.</p></dd>


<dt>If the line starts with a U+003A COLON character (:)</dt>
Expand Down Expand Up @@ -89417,8 +89417,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<dt>If the field name is "reconnect"</dt>

<dd><p>If the field value is the empty string, then: <a href="#dispatchMessage">dispatch the
event</a> as defined below, and then drop the connection and immediately reconnect as if the
<dd><p>If the field value is the empty string, then: <span>dispatch the
event</span> as defined below, and then drop the connection and immediately reconnect as if the
<span data-x="concept-event-stream-reconnection-time">reconnection time</span> was zero for this
one time.</p></dd>

Expand All @@ -89431,8 +89431,12 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
</dl>


<p id="dispatchMessage">When the user agent is required to <dfn data-x="">dispatch the event</dfn>,
then the user agent must act as follows:
<p>When the user agent is required to <dfn id="dispatchMessage">dispatch the
event</dfn>, the user agent must process the <var data-x="">data</var> buffer, the <var
data-x="">event type</var> buffer, and the <var data-x="">last event ID</var> buffer using steps
appropriate for the user agent.</p>

<p>For Web browsers, the appropriate steps to <span>dispatch the event</span> are as follows:</p>

<ol>

Expand Down Expand Up @@ -89482,6 +89486,9 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
event's <code data-x="dom-MessageEvent-lastEventId">lastEventId</code> field will be set to the
value of whatever the last seen "id" field was.</p>

<p>For other user agents, the appropriate steps to <span>dispatch the event</span> are
implementation dependent, but at a minimum they must set the <var data-x="">data</var> and <var
data-x="">event type</var> buffers to the empty string before returning.</p>

<div class="example">

Expand Down

0 comments on commit 46fafeb

Please sign in to comment.