Skip to content

Commit

Permalink
[o] (2) Rename <event-source> to <eventsource> for consistency, while…
Browse files Browse the repository at this point in the history
… we sill can

git-svn-id: http://svn.whatwg.org/webapps@1863 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 11, 2008
1 parent e0a07c6 commit d157945
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 95 deletions.
105 changes: 52 additions & 53 deletions index
Expand Up @@ -928,8 +928,8 @@
<li><a href="#the-noscript"><span class=secno>4.10.2 </span>The
<code>noscript</code> element</a>

<li><a href="#the-event-source"><span class=secno>4.10.3 </span>The
<code>event-source</code> element</a>
<li><a href="#the-eventsource"><span class=secno>4.10.3 </span>The
<code>eventsource</code> element</a>
</ul>

<li><a href="#interactive-elements"><span class=secno>4.11
Expand Down Expand Up @@ -25518,8 +25518,8 @@ function AddCloud(data, x, y) { ... }</pre>
that will have <code title=dom-document-designMode><a
href="#designMode">designMode</a></code> enabled.

<h4 id=the-event-source><span class=secno>4.10.3 </span>The <dfn
id=event-source><code>event-source</code></dfn> element</h4>
<h4 id=the-eventsource><span class=secno>4.10.3 </span>The <dfn
id=eventsource><code>eventsource</code></dfn> element</h4>

<dl class=element>
<dt>Categories
Expand All @@ -25540,56 +25540,56 @@ function AddCloud(data, x, y) { ... }</pre>

<dt>Element-specific attributes:

<dd><code title=attr-event-source-src><a href="#src11">src</a></code>
<dd><code title=attr-eventsource-src><a href="#src11">src</a></code>

<dt>DOM interface:

<dd>
<pre
class=idl>interface <dfn id=htmleventsourceelement>HTMLEventSourceElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#src12" title=dom-event-source-src>src</a>;
attribute DOMString <a href="#src12" title=dom-eventsource-src>src</a>;
};</pre>
</dl>

<p>The <code><a href="#event-source">event-source</a></code> element
<p>The <code><a href="#eventsource">eventsource</a></code> element
represents a target for events generated by a remote server.

<p>The <dfn id=src11 title=attr-event-source-src><code>src</code></dfn>
<p>The <dfn id=src11 title=attr-eventsource-src><code>src</code></dfn>
attribute, if specified, must give a <a href="#valid">valid URL</a>
identifying a resource that uses the <code>text/event-stream</code>
format.

<p>When an <code><a href="#event-source">event-source</a></code> element
with a <code title=attr-event-source-src><a href="#src11">src</a></code>
<p>When an <code><a href="#eventsource">eventsource</a></code> element with
a <code title=attr-eventsource-src><a href="#src11">src</a></code>
attribute specified is inserted into the document<!-- XXX xref -->, and
when an <code><a href="#event-source">event-source</a></code> element that
when an <code><a href="#eventsource">eventsource</a></code> element that
is already in the document<!--XXX xref--> has a <code
title=attr-event-source-src><a href="#src11">src</a></code> attribute
title=attr-eventsource-src><a href="#src11">src</a></code> attribute
added, the user agent must run the <a href="#add-declared">add declared
event source</a> algorithm.

<p>While an <code><a href="#event-source">event-source</a></code> element
is in a document<!--
<p>While an <code><a href="#eventsource">eventsource</a></code> element is
in a document<!--
XXX xref -->, if its <code
title=attr-event-source-src><a href="#src11">src</a></code> attribute is
title=attr-eventsource-src><a href="#src11">src</a></code> attribute is
mutated, the user agent must must run the <a href="#remove1">remove
declared event source</a> algorithm followed by the <a
href="#add-declared">add declared event source</a> algorithm.

<p>When an <code><a href="#event-source">event-source</a></code> element
with a <code title=attr-event-source-src><a href="#src11">src</a></code>
<p>When an <code><a href="#eventsource">eventsource</a></code> element with
a <code title=attr-eventsource-src><a href="#src11">src</a></code>
attribute specified is removed from a document<!-- XXX xref -->, and when
an <code><a href="#event-source">event-source</a></code> element that is
in a document<!--XXX
xref--> with a <code title=attr-event-source-src><a
an <code><a href="#eventsource">eventsource</a></code> element that is in
a document<!--XXX
xref--> with a <code title=attr-eventsource-src><a
href="#src11">src</a></code> attribute specified has its <code
title=attr-event-source-src><a href="#src11">src</a></code> attribute
title=attr-eventsource-src><a href="#src11">src</a></code> attribute
removed, the user agent must run the <a href="#remove1">remove declared
event source</a> algorithm.</p>
<!-- changing the base URL doesn't trigger these algorithms -->

<p>When it is created, an <code><a
href="#event-source">event-source</a></code> element must have its
href="#eventsource">eventsource</a></code> element must have its
<i>current declared event source</i> set to "undefined".

<p>The <dfn id=add-declared>add declared event source</dfn> algorithm is as
Expand All @@ -25598,17 +25598,17 @@ function AddCloud(data, x, y) { ... }</pre>
<ol>
<li><a href="#resolve" title="resolve a url">Resolve</a> the <a
href="#url">URL</a> specified by the <code><a
href="#event-source">event-source</a></code> element's <code
title=attr-event-source-src><a href="#src11">src</a></code> attribute.
href="#eventsource">eventsource</a></code> element's <code
title=attr-eventsource-src><a href="#src11">src</a></code> attribute.

<li>If that fails, then set the element's <i>current declared event
source</i> to "undefined" and abort these steps.

<li>Otherwise, act as if the <code
title=dom-remoteEventTarget-addEventSource><a
href="#addeventsource">addEventSource()</a></code> method on the <code><a
href="#event-source">event-source</a></code> element had been invoked
with the resulting <a href="#absolute">absolute URL</a>.
href="#eventsource">eventsource</a></code> element had been invoked with
the resulting <a href="#absolute">absolute URL</a>.

<li>Let the element's <i>current declared event source</i> be that <a
href="#absolute">absolute URL</a>.
Expand All @@ -25624,21 +25624,21 @@ function AddCloud(data, x, y) { ... }</pre>
<li>Otherwise, act as if the <code
title=dom-remoteEventTarget-removeEventSource><a
href="#removeeventsource">removeEventSource()</a></code> method on the
<code><a href="#event-source">event-source</a></code> element had been
<code><a href="#eventsource">eventsource</a></code> element had been
invoked with the element's <i>current declared event source</i>.

<li>Let the element's <i>current declared event source</i> be "undefined".
</ol>

<p>There can be more than one <code><a
href="#event-source">event-source</a></code> element per document, but
href="#eventsource">eventsource</a></code> element per document, but
authors should take care to avoid opening multiple connections to the same
server as HTTP recommends a limit to the number of simultaneous
connections that a user agent can open per server.</p>
<!-- XXX should we make 'load', 'error', 'abort' events fire on this
element? -->

<p>The <dfn id=src12 title=dom-event-source-src><code>src</code></dfn> DOM
<p>The <dfn id=src12 title=dom-eventsource-src><code>src</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the content attribute of the
same name.

Expand Down Expand Up @@ -31373,7 +31373,7 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
the element.

<dt><dfn id=onmessage title=handler-onmessage><code>onmessage</code></dfn></dt>
<!-- introduced for <event-source> -->
<!-- introduced for <eventsource> -->

<dd>
<p>Must be invoked whenever a <code title=event-message><a
Expand Down Expand Up @@ -40803,11 +40803,11 @@ XXX Once we resolve the style="" issue, address these:

<h3 id=server-sent-events><span class=secno>7.2 </span><dfn
id=server-sent>Server-sent events</dfn></h3>
<!-- event-source -->
<!-- eventsource -->

<p>This section describes a mechanism for allowing servers to dispatch DOM
events into documents that expect it. The <code><a
href="#event-source">event-source</a></code> element provides a simple
href="#eventsource">eventsource</a></code> element provides a simple
interface to this mechanism.

<h4 id=the-remoteeventtarget><span class=secno>7.2.1 </span>The <code><a
Expand All @@ -40829,7 +40829,7 @@ XXX Once we resolve the style="" issue, address these:
href="#resolve" title="resolve a url">resolve</a> the <a
href="#url">URL</a> specified in <var title="">src</var>, and if that
succeeds, add the resulting <a href="#absolute">absolute URL</a> to the <a
href="#list-of3" title=concept-event-source-list>list of event sources</a>
href="#list-of3" title=concept-eventsource-list>list of event sources</a>
for that object. The same URL can be registered multiple times. If the URL
fails to resolve, then the user agent must raise a <code>SYNTAX_ERR</code>
exception.
Expand All @@ -40840,7 +40840,7 @@ XXX Once we resolve the style="" issue, address these:
href="#resolve" title="resolve a url">resolve</a> the <a
href="#url">URL</a> specified in <var title="">src</var>, and if that
succeeds, remove the resulting <a href="#absolute">absolute URL</a> from
the <a href="#list-of3" title=concept-event-source-list>list of event
the <a href="#list-of3" title=concept-eventsource-list>list of event
sources</a> for that object. If the same URI has been registered multiple
times, removing it must remove only one instance of that URI for each
invocation of the <code title=removeEventSource>removeEventSource()</code>
Expand All @@ -40851,7 +40851,7 @@ XXX Once we resolve the style="" issue, address these:

<p>Each object implementing the <code>EventTarget</code> and <code><a
href="#remoteeventtarget">RemoteEventTarget</a></code> interfaces has a
<dfn id=list-of3 title=concept-event-source-list>list of event
<dfn id=list-of3 title=concept-eventsource-list>list of event
sources</dfn> that are registered for that object.

<p>When a new URI is added to this list, the user agent should, as soon as
Expand Down Expand Up @@ -41186,14 +41186,14 @@ data: 10</pre>
<p>...would cause an event <code title=event-message><a
href="#message0">message</a></code> with the interface <code><a
href="#messageevent">MessageEvent</a></code> to be dispatched on the
<code><a href="#event-source">event-source</a></code> element, whose
<code title=dom-MessageEvent-data><a href="#data4">data</a></code>
attribute would contain the string <code>YHOO\n-2\n10</code> (where
<code>\n</code> represents a newline).</p>
<code><a href="#eventsource">eventsource</a></code> element, whose <code
title=dom-MessageEvent-data><a href="#data4">data</a></code> attribute
would contain the string <code>YHOO\n-2\n10</code> (where <code>\n</code>
represents a newline).</p>

<p>This could be used as follows:

<pre>&lt;event-source src="http://stocks.example.com/ticker.php"
<pre>&lt;eventsource src="http://stocks.example.com/ticker.php"
onmessage="var data = event.data.split('\n'); updateStocks(data[0], data[1], data[2]);"&gt;</pre>

<p>...where <code title="">updateStocks()</code> is a function defined as:</p>
Expand Down Expand Up @@ -41270,17 +41270,16 @@ data:&nbsp;test</pre>
addresses can have multiple clients (due to sharing a proxy server). It is
better to include a unique identifier in the document when it is served
and then pass that identifier as part of the URL in the <code
title=attr-event-source-src><a href="#src11">src</a></code> attribute of
the <code><a href="#event-source">event-source</a></code> element.
title=attr-eventsource-src><a href="#src11">src</a></code> attribute of
the <code><a href="#eventsource">eventsource</a></code> element.

<p>Implementations that support HTTP's per-server connection limitation
might run into trouble when opening multiple pages from a site if each
page has an <code><a href="#event-source">event-source</a></code> to the
page has an <code><a href="#eventsource">eventsource</a></code> to the
same domain. Authors can avoid this using the relatively complex mechanism
of using unique domain names per connection, or by allowing the user to
enable or disable the <code><a
href="#event-source">event-source</a></code> functionality on a per-page
basis.
enable or disable the <code><a href="#eventsource">eventsource</a></code>
functionality on a per-page basis.

<h3 id=network><span class=secno>7.3 </span><dfn id=web-sockets>Web
sockets</dfn></h3>
Expand Down Expand Up @@ -42423,7 +42422,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {

<dd><code><a href="#base">base</a></code>, <code><a
href="#command0">command</a></code>, <code><a
href="#event-source">event-source</a></code>, <code><a
href="#eventsource">eventsource</a></code>, <code><a
href="#link">link</a></code>, <code><a href="#meta0">meta</a></code>,
<code><a href="#hr">hr</a></code>, <code><a href="#br">br</a></code>,
<code><a href="#img">img</a></code>, <code><a
Expand Down Expand Up @@ -44115,7 +44114,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {
<code><a href="#dialog">dialog</a></code>, <code>dir</code>, <code><a
href="#div">div</a></code>, <code><a href="#dl">dl</a></code>, <code><a
href="#dt">dt</a></code>, <code><a href="#embed">embed</a></code>,
<code><a href="#event-source">event-source</a></code>
<code><a href="#eventsource">eventsource</a></code>
<code>fieldset</code>, <code><a href="#figure">figure</a></code>,
<code><a href="#footer">footer</a></code>, <code>form</code>,
<code>frame</code>, <code>frameset</code>, <code><a
Expand Down Expand Up @@ -44176,7 +44175,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {
</dl>

<p class=big-issue>Still need to add these new elements to the lists:
<code><a href="#event-source">event-source</a></code>, <code><a
<code><a href="#eventsource">eventsource</a></code>, <code><a
href="#section">section</a></code>, <code><a href="#nav">nav</a></code>,
<code><a href="#article">article</a></code>, <code><a
href="#aside">aside</a></code>, <code><a href="#header">header</a></code>,
Expand Down Expand Up @@ -47090,7 +47089,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {
<span>insertion mode</span>.</p>

<dt>A start tag whose tag name is one of: "base", "command",
"event-source", "link"
"eventsource", "link"

<dd>
<p><a href="#insert0">Insert an HTML element</a> for the token.
Expand Down Expand Up @@ -47487,7 +47486,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {
attribute and its corresponding value to that element.</p>

<dt>A start tag token whose tag name is one of: "base", "command",
"event-source", "link", "meta", "noframes", "script", "style", "title"
"eventsource", "link", "meta", "noframes", "script", "style", "title"

<dd>
<p>Process the token <a href="#using8">using the rules for</a> the "<a
Expand Down Expand Up @@ -48527,7 +48526,7 @@ interface <dfn id=pipeend0>PipeEnd</dfn> {
"colgroup", "frame", "frameset", "head", "tbody", "td", "tfoot", "th",
"thead", "tr"</dt>
<!--<dt>An end tag whose tag name is one of: "area", "base",
"basefont", "bgsound", "command", "embed", "event-source", "hr",
"basefont", "bgsound", "command", "embed", "eventsource", "hr",
"iframe", "image", "img", "input", "isindex", "link", "meta",
"noembed", "noframes", "param", "script", "select", "source",
"spacer", "style", "table", "textarea", "title", "wbr"</dt>-->
Expand Down Expand Up @@ -50067,7 +50066,7 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
those "elements", more "macros", and thus we should never
serialize them -->
<!-- XXX when we get around to it, add
event-source -->
eventsource -->
<p>If <var title="">current node</var> is a <code><a
href="#pre">pre</a></code> <code>textarea</code>, or
<code>listing</code> element, append a U+000A LINE FEED (LF)
Expand Down

0 comments on commit d157945

Please sign in to comment.