Skip to content
Permalink
Browse files
[] (0) Fix how line feeds and line endings are handled by the EventSo…
…urce format. Also, defer to DOM Events for what makes a correct event type, since it is unstable.

git-svn-id: http://svn.whatwg.org/webapps@4079 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 5, 2009
1 parent 829cb74 commit ab5910e0162a5f66448a4190d3ceefe91e83fa64
Showing 1 changed file with 17 additions and 12 deletions.
29 source
@@ -73180,7 +73180,7 @@ bom = %xFEFF ; U+FEFF BYTE ORDER MARK
name-char = %x0000-0009 / %x000B-000C / %x000E-0039 / %x003B-10FFFF
; a Unicode character other than U+000A LINE FEED, U+000D CARRIAGE RETURN, or U+003A COLON
any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
; a Unicode character other than U+000D CARRIAGE RETURN or U+003A COLON</pre>
; a Unicode character other than U+000A LINE FEED or U+000D CARRIAGE RETURN</pre>

<p>Event streams in this format must always be encoded as
UTF-8.</p>
@@ -73207,9 +73207,11 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

<p>The stream must then be parsed by reading everything line by
line, with a U+000D CARRIAGE RETURN U+000A LINE FEED (CRLF)
character pair, a single U+000A LINE FEED (LF) character, a single
U+000D CARRIAGE RETURN (CR) character, and the end of the file being
the four ways in which a line can end.</p>
character pair, a single U+000A LINE FEED (LF) character not
preceded by a U+000D CARRIAGE RETURN (CR) character, a single U+000D
CARRIAGE RETURN (CR) character not followd by a U+000D CARRIAGE
RETURN (LF) character, and the end of the file being the four ways
in which a line can end.</p>

<p>When a stream is parsed, a <var title="">data</var> buffer and an
<var title="">event name</var> buffer must be associated with
@@ -73283,9 +73285,8 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF

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

<dd><p>If the <var title="">data</var> buffer is not the empty
string, then append a single U+000A LINE FEED character to the <var
title="">data</var> buffer. Append the field value to the <var
<dd><p>Append the field value to the <var title="">data</var>
buffer, then append a single U+000A LINE FEED character to the <var
title="">data</var> buffer.</p></dd>


@@ -73334,12 +73335,16 @@ any-char = %x0000-0009 / %x000B-000C / %x000E-10FFFF
name</var> buffer to the empty string and abort these
steps.</p></li>

<li>If the <var title="">data</var> buffer's last character is a
U+000A LINE FEED character, then remove the last character from the
<var title="">data</var> buffer.</p>

<li><p>If the <var title="">event name</var> buffer is not the
empty string but is also not a valid <a
href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>,
set the <var title="">data</var> buffer and the <var title="">event
name</var> buffer to the empty string and abort these
steps.</p></li>
empty string but is also not a valid event type name, as defined by
the DOM Events specification, set the <var title="">data</var>
buffer and the <var title="">event name</var> buffer to the empty
string and abort these steps. <a
href="#refsDOMEVENTS">[DOMEVENTS]</a></p></li>

<li><p>Otherwise, create an event that uses the
<code>MessageEvent</code> interface, with the event name <code

0 comments on commit ab5910e

Please sign in to comment.