[html5] r1861 - [] (1) Messaging: introduce placeholders for pipes; make all the messaging syste [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Jul 11 02:33:35 PDT 2008


Author: ianh
Date: 2008-07-11 02:33:33 -0700 (Fri, 11 Jul 2008)
New Revision: 1861

Modified:
   index
   source
Log:
[] (1) Messaging: introduce placeholders for pipes; make all the messaging systems use 'message' and MessageEvent; rename 'server sent dom events' to 'server sent events'.

Modified: index
===================================================================
--- index	2008-07-10 19:54:09 UTC (rev 1860)
+++ index	2008-07-11 09:33:33 UTC (rev 1861)
@@ -25,7 +25,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 10 July
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 11 July
     2008</h2>
 
    <p>You can take part in this work. <a
@@ -1549,7 +1549,7 @@
       
 
      <li><a href="#server-sent-events"><span class=secno>7.2
-      </span>Server-sent DOM events</a>
+      </span>Server-sent events</a>
       <ul class=toc>
        <li><a href="#the-remoteeventtarget"><span class=secno>7.2.1
         </span>The <code>RemoteEventTarget</code> interface</a>
@@ -1616,8 +1616,8 @@
       </ul>
     </ul>
 
-   <li><a href="#repetition"><span class=secno>8. </span>Repetition
-    templates</a>
+   <li><a href="#pipe-messaging"><span class=secno>8. </span>Pipe
+    messaging</a>
 
    <li><a href="#syntax"><span class=secno>9. </span>The HTML syntax</a>
     <ul class=toc>
@@ -30253,6 +30253,7 @@
 
   // <a href="#cross-document">cross-document messaging</a>
   void <a href="#postmessage" title=dom-window-postMessage>postMessage</a>(in DOMString message, in DOMString targetOrigin);
+  void <a href="#postmessage" title=dom-window-postMessage>postMessage</a>(in DOMString message, in <a href="#pipeend0">PipeEnd</a> pipeEnd, in DOMString targetOrigin);
 
   // <a href="#event4">event handler DOM attributes</a>
            attribute <span>EventListener</span> <a href="#onabort" title=handler-onabort>onabort</a>;
@@ -30332,7 +30333,7 @@
     object
 
    <li>The <code title=dom-window-postMessage><a
-    href="#postmessage">postMessage()</a></code> method
+    href="#postmessage">postMessage()</a></code> methods
 
    <li>The <code title=dom-window-frames>frames</code> attribute
 
@@ -40736,9 +40737,11 @@
 
   <h3 id=event1><span class=secno>7.1 </span>Event definitions</h3>
 
-  <p>Messages in <a href="#cross-document">cross-document messaging</a> and
-   in <a href="#server-sent">server-sent DOM events</a>, use the <dfn
-   id=message0 title=event-message><code>message</code></dfn> event.
+  <p>Messages in <a href="#server-sent">server-sent events</a>, <a
+   href="#web-sockets">Web sockets</a>, <a
+   href="#cross-document">cross-document messaging</a>, and <a
+   href="#pipe-messaging0">pipe messaging</a> use the <dfn id=message0
+   title=event-message><code>message</code></dfn> event.
 
   <p>The following interface is defined for this event:
 
@@ -40747,8 +40750,9 @@
   readonly attribute DOMString <a href="#origin1" title=dom-MessageEvent-origin>origin</a>;
   readonly attribute DOMString <a href="#lasteventid" title=dom-MessageEvent-lastEventId>lastEventId</a>;
   readonly attribute <a href="#window">Window</a> <a href="#source3" title=dom-MessageEvent-source>source</a>;
-  void <a href="#initmessageevent" title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
-  void <a href="#initmessageeventns" title=dom-MessageEvent-initMessageEventNS>initMessageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
+  readonly attribute <a href="#pipeend0">PipeEnd</a> <a href="#pipeend" title=dom-MessageEvent-pipeEnd>pipeEnd</a>;
+  void <a href="#initmessageevent" title=dom-MessageEvent-initMessageEvent>initMessageEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <a href="#pipeend0">PipeEnd</a> pipeEndArg);
+  void <a href="#initmessageeventns" title=dom-MessageEvent-initMessageEventNS>initMessageEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <a href="#pipeend0">PipeEnd</a> pipeEndArg);
 };</pre>
 
   <p>The <dfn id=initmessageevent
@@ -40764,23 +40768,41 @@
 
   <p>The <dfn id=origin1
    title=dom-MessageEvent-origin><code>origin</code></dfn> attribute
-   represents, in <a href="#cross-document">cross-document messaging</a>, the
-   <a href="#origin0">origin</a> of the document that sent the message
+   represents, in <a href="#server-sent">server-sent events</a> and <a
+   href="#cross-document">cross-document messaging</a>, the <a
+   href="#origin0">origin</a> of the document that sent the message
    (typically the scheme, hostname, and port of the document, but not its
    path or fragment identifier).
 
   <p>The <dfn id=lasteventid
    title=dom-MessageEvent-lastEventId><code>lastEventId</code></dfn>
-   attribute represents, in <a href="#server-sent">server-sent dom
-   events</a>, the <span>last event ID string</span> of the event source.
+   attribute represents, in <a href="#server-sent">server-sent events</a>,
+   the <span>last event ID string</span> of the event source.
 
   <p>The <dfn id=source3
    title=dom-MessageEvent-source><code>source</code></dfn> attribute
    represents, in <a href="#cross-document">cross-document messaging</a>, the
    <code><a href="#window">Window</a></code> from which the message came.
 
+  <p>The <dfn id=pipeend
+   title=dom-MessageEvent-pipeEnd><code>pipeEnd</code></dfn> attribute
+   represents, in <a href="#cross-document">cross-document messaging</a> and
+   <a href="#pipe-messaging0">pipe messaging</a> the <code><a
+   href="#pipeend0">PipeEnd</a></code> being sent, if any.
+
+  <p>Unless otherwise specified, when the user agent creates and dispatches a
+   <code title=event-message><a href="#message0">message</a></code> event in
+   the algorithms described in the following sections, the <code
+   title=dom-MessageEvent-lastEventId><a
+   href="#lasteventid">lastEventId</a></code> attribute must be the empty
+   string, the <code title=dom-MessageEvent-origin><a
+   href="#origin1">origin</a></code> attribute must be the empty string, the
+   <code title=dom-MessageEvent-source><a href="#source3">source</a></code>
+   attribute must be null, and the <code title=dom-MessageEvent-pipeEnd><a
+   href="#pipeend">pipeEnd</a></code> attribute must be null.
+
   <h3 id=server-sent-events><span class=secno>7.2 </span><dfn
-   id=server-sent>Server-sent DOM events</dfn></h3>
+   id=server-sent>Server-sent events</dfn></h3>
   <!-- event-source -->
 
   <p>This section describes a mechanism for allowing servers to dispatch DOM
@@ -41127,12 +41149,11 @@
      attribute must be set to the value of the <var title="">data</var>
      buffer, the <code title=dom-MessageEvent-origin><a
      href="#origin1">origin</a></code> attribute must be set to the <a
-     href="#origin0">origin</a> of the event stream's URL, the <code
-     title=dom-MessageEvent-lastEventId><a
+     href="#unicode" title="Unicode serialization of an origin">Unicode
+     serialization</a> of the <a href="#origin0">origin</a> of the event
+     stream's URL, and the <code title=dom-MessageEvent-lastEventId><a
      href="#lasteventid">lastEventId</a></code> attribute must be set to the
-     <span>last event ID string</span> of the event source, and the <code
-     title=dom-MessageEvent-source><a href="#source3">source</a></code>
-     attribute must be set to null.
+     <span>last event ID string</span> of the event source.
 
    <li>
     <p>If the <var title="">event name</var> buffer has a value other than
@@ -41261,7 +41282,8 @@
    href="#event-source">event-source</a></code> functionality on a per-page
    basis.
 
-  <h3 id=network><span class=secno>7.3 </span>Web sockets</h3>
+  <h3 id=network><span class=secno>7.3 </span><dfn id=web-sockets>Web
+   sockets</dfn></h3>
 
   <p>To enable Web applications to maintain bidirectional communications with
    their originating server, this specification introduces the <code><a
@@ -41294,9 +41316,9 @@
 
   // networking
            attribute EventListener <a href="#onopen" title=handler-WebSocket-onopen>onopen</a>;
-           attribute EventListener <a href="#onread" title=handler-WebSocket-onread>onread</a>;
+           attribute EventListener <a href="#onmessage0" title=handler-WebSocket-onmessage>onmessage</a>;
            attribute EventListener <span title=handler-WebSocket-onclosed>onclosed</span>;
-  void <a href="#senddata" title=dom-WebSocket-send>send</a>(in DOMString data);
+  void <span title=dom-WebSocket-postMessage>postMessage</span>(in DOMString data);
   void <a href="#disconnect" title=dom-WebSocket-disconnect>disconnect</a>();
 };</pre>
 
@@ -41383,46 +41405,14 @@
   <p class=note>No information regarding why the connection was closed is
    passed to the application in this version of this specification.
 
-  <p>The <dfn id=read title=event-WebSocket-read><code>read</code></dfn>
-   event is fired when when data is received for a connection. It uses the
-   <code><a href="#websocketreadevent">WebSocketReadEvent</a></code>
-   interface:
+  <p>The <code title=event-message><a href="#message0"><code>message</code>
+   event is fired when when data is received for a connection.</a></code>
 
-  <pre
-   class=idl>interface <dfn id=websocketreadevent>WebSocketReadEvent</dfn> : Event {
-  readonly attribute DOMString <a href="#data5" title=dom-WebSocketReadEvent-data>data</a>;
-  void <a href="#initwebsocketreadevent" title=dom-WebSocketReadEvent-initWebSocketReadEvent>initWebSocketReadEvent</a>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
-  void <a href="#initwebsocketreadeventns" title=dom-WebSocketReadEvent-initWebSocketReadEventNS>initWebSocketReadEventNS</a>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
-};
-</pre>
-
-  <p>The <dfn id=initwebsocketreadevent
-   title=dom-WebSocketReadEvent-initWebSocketReadEvent><code>initWebSocketReadEvent()</code></dfn>
-   and <dfn id=initwebsocketreadeventns
-   title=dom-WebSocketReadEvent-initWebSocketReadEventNS><code>initWebSocketReadEventNS()</code></dfn>
-   methods must initialise the event in a manner analogous to the
-   similarly-named methods in the DOM3 Events interfaces. <a
-   href="#refsDOM3EVENTS">[DOM3EVENTS]</a>
-
-  <p>The <dfn id=data5
-   title=dom-WebSocketReadEvent-data><code>data</code></dfn> attribute
-   represents the data that was received.
-
-  <p>When the user agent is to <dfn id=fire-a title="fire a read event">fire
-   a <code title=event-WebSocket-read>read</code> event</dfn> with data <var
-   title="">data</var>, the user agent must dispatch an event whose name is
-   <code title=event-WebSocket-read><a href="#read">read</a></code>, with no
-   namespace, which does not bubble but is cancelable, which uses the
-   <code><a href="#websocketreadevent">WebSocketReadEvent</a></code>
-   interface, and whose <code title=dom-WebSocketReadEvent-data><a
-   href="#data5">data</a></code> attribute is set to <var
-   title="">data</var>, at the given object.
-
   <p>Events that would be fired during script execution (e.g. between the
    <code><a href="#websocket0">WebSocket</a></code> object being created
    — and thus the connection being established — and the current
    script completing; or, during the execution of a <code
-   title=event-WebSocket-read><a href="#read">read</a></code> event handler)
+   title=event-message><a href="#message0">message</a></code> event handler)
    must be buffered, and those events queued up and each one individually
    fired after the script has completed.</p>
   <!-- XXX make this more generic
@@ -41443,13 +41433,13 @@
      href="#open4">open</a></code> event is targeted at or bubbles through
      the <code><a href="#websocket0">WebSocket</a></code> object.
 
-   <dt><dfn id=onread
-    title=handler-WebSocket-onread><code>onread</code></dfn>
+   <dt><dfn id=onmessage0
+    title=handler-WebSocket-onmessage><code>onmessage</code></dfn>
 
    <dd>
-    <p>Must be invoked whenever an <code title=event-WebSocket-read><a
-     href="#read">read</a></code> event is targeted at or bubbles through the
-     <code><a href="#websocket0">WebSocket</a></code> object.
+    <p>Must be invoked whenever a <code title=event-message><a
+     href="#message0">message</a></code> event is targeted at or bubbles
+     through the <code><a href="#websocket0">WebSocket</a></code> object.
 
    <dt><dfn id=onclose
     title=handler-WebSocket-onclose><code>onclose</code></dfn>
@@ -41922,10 +41912,15 @@
          store that string in <var title="">data</var>.</p>
 
        <li>
-        <p>If <var title="">frame type</var> is 0x00, <a href="#fire-a">fire
-         a <code title=event-WebSocket-read>read</code> event</a> at the
-         <code><a href="#websocket0">WebSocket</a></code> object with data
-         <var title="">data</var>. Otherwise, discard the data.
+        <p>If <var title="">frame type</var> is 0x00, create an event that
+         uses the <code><a href="#messageevent">MessageEvent</a></code>
+         interface, with the event name <code title=event-message><a
+         href="#message0">message</a></code>, which does not bubble, is
+         cancelable, has no default action, and whose <code
+         title=dom-MessageEvent-data><a href="#data4">data</a></code>
+         attribute is set to <var title="">data</var>, and dispatch it at the
+         <code><a href="#websocket0">WebSocket</a></code> object. Otherwise,
+         discard the data.
       </ol>
     </dl>
 
@@ -42198,10 +42193,8 @@
      title=dom-MessageEvent-origin><a href="#origin1">origin</a></code>
      attribute must be set to the <a href="#unicode" title="Unicode
      serialization of an origin">Unicode serialization</a> of the <a
-     href="#origin0">origin</a> of the script that invoked the method, the
-     <code title=dom-MessageEvent-lastEventId><a
-     href="#lasteventid">lastEventId</a></code> attribute must be set to the
-     empty string, and the <code title=dom-MessageEvent-source><a
+     href="#origin0">origin</a> of the script that invoked the method, and
+     the <code title=dom-MessageEvent-source><a
      href="#source3">source</a></code> attribute must be set to the <code><a
      href="#window">Window</a></code> object of the <a
      href="#default3">default view</a> of the <a href="#browsing1">browsing
@@ -42275,12 +42268,32 @@
    security reasons. It also requires that UAs be careful to allow access to
    certain properties but not others.
 
-  <h2 id=repetition><span class=secno>8. </span>Repetition templates</h2>
+  <p class=big-issue>postMessage() with a pipe isn't yet defined
 
-  <p class=big-issue>See <a
-   href="http://www.whatwg.org/specs/web-forms/current-work/#repeatingFormControls">WF2</a>
-   for now
+  <h2 id=pipe-messaging><span class=secno>8. </span><dfn
+   id=pipe-messaging0>Pipe messaging</dfn></h2>
 
+  <p class=big-issue>...
+
+  <pre class=idl>[Constructor] interface <dfn id=pipe>Pipe</dfn> {
+  readonly attribute <a href="#pipeend0">PipeEnd</a> <span title=dom-pipe-end1>end1</span>;
+  readonly attribute <a href="#pipeend0">PipeEnd</a> <span title=dom-pipe-end2>end2</span>;
+};
+
+interface <dfn id=pipeend0>PipeEnd</dfn> {
+  readonly attribute <a href="#window">Window</a> <span title=dom-owner>ownerWindow</span>;
+  readonly attribute boolean <span title=dom-endpipe>active</span>;
+  void <span title=dom-pipeend-postMessage>postMessage</span>(in DOMString message);
+  void <span title=dom-pipeend-postMessage>postMessage</span>(in DOMString message, in <a href="#pipeend0">PipeEnd</a> pipeEnd);
+  void <span title=dom-pipeend-close>close</span>();
+
+  // event handler attributes
+           attribute <span>EventListener</span> <span title=handler-endpipe-onmessage>onmessage</span>;
+           attribute <span>EventListener</span> <span title=handler-endpipe-onunload>onunload</span>;
+};</pre>
+
+  <p class=big-issue>...
+
   <h2 id=syntax><span class=secno>9. </span>The HTML syntax</h2>
 
   <h3 id=writing0><span class=secno>9.1 </span>Writing HTML documents</h3>

Modified: source
===================================================================
--- source	2008-07-10 19:54:09 UTC (rev 1860)
+++ source	2008-07-11 09:33:33 UTC (rev 1861)
@@ -27779,6 +27779,7 @@
 
   // <span>cross-document messaging</span>
   void <span title="dom-window-postMessage">postMessage</span>(in DOMString message, in DOMString targetOrigin);
+  void <span title="dom-window-postMessage">postMessage</span>(in DOMString message, in <span>PipeEnd</span> pipeEnd, in DOMString targetOrigin);
 
   // <span>event handler DOM attributes</span>
            attribute <span>EventListener</span> <span title="handler-onabort">onabort</span>;
@@ -27857,7 +27858,7 @@
    <li>The <code title="dom-location">location</code> object
 
    <li>The <code title="dom-window-postMessage">postMessage()</code>
-   method
+   methods
 
    <li>The <code title="dom-window-frames">frames</code> attribute
 
@@ -38275,8 +38276,9 @@
 
   <h3>Event definitions</h3>
 
-  <p>Messages in <span>cross-document messaging</span> and in
-  <span>server-sent DOM events</span>, use the <dfn
+  <p>Messages in <span>server-sent events</span>, <span>Web
+  sockets</span>, <span>cross-document messaging</span>, and
+  <span>pipe messaging</span> use the <dfn
   title="event-message"><code>message</code></dfn> event.</p>
 
   <p>The following interface is defined for this event:</p>
@@ -38286,8 +38288,9 @@
   readonly attribute DOMString <span title="dom-MessageEvent-origin">origin</span>;
   readonly attribute DOMString <span title="dom-MessageEvent-lastEventId">lastEventId</span>;
   readonly attribute <span>Window</span> <span title="dom-MessageEvent-source">source</span>;
-  void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
-  void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg);
+  readonly attribute <span>PipeEnd</span> <span title="dom-MessageEvent-pipeEnd">pipeEnd</span>;
+  void <span title="dom-MessageEvent-initMessageEvent">initMessageEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>PipeEnd</span> pipeEndArg);
+  void <span title="dom-MessageEvent-initMessageEventNS">initMessageEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg, in DOMString originArg, in DOMString lastEventIdArg, in Window sourceArg, in <span>PipeEnd</span> pipeEndArg);
 };</pre>
 
   <p>The <dfn
@@ -38304,14 +38307,15 @@
 
   <p>The <dfn
   title="dom-MessageEvent-origin"><code>origin</code></dfn> attribute
-  represents, in <span>cross-document messaging</span>, the
-  <span>origin</span> of the document that sent the message (typically
-  the scheme, hostname, and port of the document, but not its path or
-  fragment identifier).</p>
+  represents, in <span>server-sent events</span> and
+  <span>cross-document messaging</span>, the <span>origin</span> of
+  the document that sent the message (typically the scheme, hostname,
+  and port of the document, but not its path or fragment
+  identifier).</p>
 
   <p>The <dfn
   title="dom-MessageEvent-lastEventId"><code>lastEventId</code></dfn>
-  attribute represents, in <span>server-sent dom events</span>, the
+  attribute represents, in <span>server-sent events</span>, the
   <span>last event ID string</span> of the event source.</p>
 
   <p>The <dfn
@@ -38319,8 +38323,26 @@
   represents, in <span>cross-document messaging</span>, the
   <code>Window</code> from which the message came.</p>
 
+  <p>The <dfn
+  title="dom-MessageEvent-pipeEnd"><code>pipeEnd</code></dfn>
+  attribute represents, in <span>cross-document messaging</span> and
+  <span>pipe messaging</span> the <code>PipeEnd</code> being sent, if
+  any.</p>
 
-  <h3 id="server-sent-events"><dfn>Server-sent DOM events</dfn></h3>
+  <p>Unless otherwise specified, when the user agent creates and
+  dispatches a <code title="event-message">message</code> event in the
+  algorithms described in the following sections, the <code
+  title="dom-MessageEvent-lastEventId">lastEventId</code> attribute
+  must be the empty string, the <code
+  title="dom-MessageEvent-origin">origin</code> attribute must be the
+  empty string, the <code
+  title="dom-MessageEvent-source">source</code> attribute must be
+  null, and the <code title="dom-MessageEvent-pipeEnd">pipeEnd</code>
+  attribute must be null.</p>
+
+
+
+  <h3 id="server-sent-events"><dfn>Server-sent events</dfn></h3>
   <!-- event-source -->
 
   <p>This section describes a mechanism for allowing servers to
@@ -38691,11 +38713,12 @@
    title="dom-MessageEvent-data">data</code> attribute must be set to
    the value of the <var title="">data</var> buffer, the <code
    title="dom-MessageEvent-origin">origin</code> attribute must be set
-   to the <span>origin</span> of the event stream's URL, the <code
+   to the <span title="Unicode serialization of an origin">Unicode
+   serialization</span> of the <span>origin</span> of the event
+   stream's URL, and the <code
    title="dom-MessageEvent-lastEventId">lastEventId</code> attribute
    must be set to the <span>last event ID string</span> of the event
-   source, and the <code title="dom-MessageEvent-source">source</code>
-   attribute must be set to null.</p></li>
+   source.</p></li>
    
    <li><p>If the <var title="">event name</var> buffer has a value
    other than the empty string, change the type of the newly created
@@ -38829,7 +38852,7 @@
 
 
 
-  <h3 id="network">Web sockets</h3>
+  <h3 id="network"><dfn>Web sockets</dfn></h3>
 
   <p>To enable Web applications to maintain bidirectional
   communications with their originating server, this specification
@@ -38864,9 +38887,9 @@
 
   // networking
            attribute EventListener <span title="handler-WebSocket-onopen">onopen</span>;
-           attribute EventListener <span title="handler-WebSocket-onread">onread</span>;
+           attribute EventListener <span title="handler-WebSocket-onmessage">onmessage</span>;
            attribute EventListener <span title="handler-WebSocket-onclosed">onclosed</span>;
-  void <span title="dom-WebSocket-send">send</span>(in DOMString data);
+  void <span title="dom-WebSocket-postMessage">postMessage</span>(in DOMString data);
   void <span title="dom-WebSocket-disconnect">disconnect</span>();
 };</pre>
 
@@ -38953,43 +38976,14 @@
   closed is passed to the application in this version of this
   specification.</p>
 
-  <p>The <dfn title="event-WebSocket-read"><code>read</code></dfn>
-  event is fired when when data is received for a connection. It uses
-  the <code>WebSocketReadEvent</code> interface:</p>
+  <p>The <code title="event-message"><code>message</code></dfn>
+  event is fired when when data is received for a connection.</p>
 
-  <pre class="idl">interface <dfn>WebSocketReadEvent</dfn> : Event {
-  readonly attribute DOMString <span title="dom-WebSocketReadEvent-data">data</span>;
-  void <span title="dom-WebSocketReadEvent-initWebSocketReadEvent">initWebSocketReadEvent</span>(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
-  void <span title="dom-WebSocketReadEvent-initWebSocketReadEventNS">initWebSocketReadEventNS</span>(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString dataArg);
-};
-</pre>
-
-  <p>The <dfn
-  title="dom-WebSocketReadEvent-initWebSocketReadEvent"><code>initWebSocketReadEvent()</code></dfn>
-  and <dfn
-  title="dom-WebSocketReadEvent-initWebSocketReadEventNS"><code>initWebSocketReadEventNS()</code></dfn>
-  methods must initialise the event in a manner analogous to the
-  similarly-named methods in the DOM3 Events interfaces. <a
-  href="#refsDOM3EVENTS">[DOM3EVENTS]</a></p>
-
-  <p>The <dfn
-  title="dom-WebSocketReadEvent-data"><code>data</code></dfn>
-  attribute represents the data that was received.</p>
-
-  <p>When the user agent is to <dfn title="fire a read event">fire a
-  <code title="event-WebSocket-read">read</code> event</dfn> with data
-  <var title="">data</var>, the user agent must dispatch an event
-  whose name is <code title="event-WebSocket-read">read</code>, with
-  no namespace, which does not bubble but is cancelable, which uses
-  the <code>WebSocketReadEvent</code> interface, and whose <code
-  title="dom-WebSocketReadEvent-data">data</code> attribute is set to
-  <var title="">data</var>, at the given object.</p>
-
   <p>Events that would be fired during script execution (e.g. between
   the <code>WebSocket</code> object being created — and thus the
   connection being established — and the current script
   completing; or, during the execution of a <code
-  title="event-WebSocket-read">read</code> event handler) must be
+  title="event-message">message</code> event handler) must be
   buffered, and those events queued up and each one individually fired
   after the script has completed.</p> <!-- XXX make this more generic
   -->
@@ -39008,10 +39002,10 @@
    title="event-WebSocket-open">open</code> event is targeted at or
    bubbles through the <code>WebSocket</code> object.</p></dd>
 
-   <dt><dfn title="handler-WebSocket-onread"><code>onread</code></dfn></dt>
+   <dt><dfn title="handler-WebSocket-onmessage"><code>onmessage</code></dfn></dt>
 
-   <dd><p>Must be invoked whenever an <code
-   title="event-WebSocket-read">read</code> event is targeted at or
+   <dd><p>Must be invoked whenever a <code
+   title="event-message">message</code> event is targeted at or
    bubbles through the <code>WebSocket</code> object.</p></dd>
 
    <dt><dfn title="handler-WebSocket-onclose"><code>onclose</code></dfn></dt>
@@ -39568,10 +39562,14 @@
        <li><p>Interpret <var title="">raw data</var> as a UTF-8
        string, and store that string in <var title="">data</var>.</p>
 
-       <li><p>If <var title="">frame type</var> is 0x00, <span>fire a
-       <code title="event-WebSocket-read">read</code> event</span> at
-       the <code>WebSocket</code> object with data <var
-       title="">data</var>. Otherwise, discard the data.</p></li>
+       <li><p>If <var title="">frame type</var> is 0x00, create an
+       event that uses the <code>MessageEvent</code> interface, with
+       the event name <code title="event-message">message</code>,
+       which does not bubble, is cancelable, has no default action,
+       and whose <code title="dom-MessageEvent-data">data</code>
+       attribute is set to <var title="">data</var>, and dispatch it
+       at the <code>WebSocket</code> object. Otherwise, discard the
+       data.</p></li>
 
       </ol>
 
@@ -39823,6 +39821,7 @@
   domain, in a way designed to not enable cross-site scripting
   attacks.</p>
 
+
   <h4>Processing model</h4>
 
   <p>When a script invokes the <dfn
@@ -39883,9 +39882,7 @@
     method, the <code title="dom-MessageEvent-origin">origin</code>
     attribute must be set to the <span title="Unicode serialization of
     an origin">Unicode serialization</span> of the <span>origin</span>
-    of the script that invoked the method, the <code
-    title="dom-MessageEvent-lastEventId">lastEventId</code> attribute
-    must be set to the empty string, and the <code
+    of the script that invoked the method, and the <code
     title="dom-MessageEvent-source">source</code> attribute must be
     set to the <code>Window</code> object of the <span>default
     view</span> of the <span>browsing context</span> for which the
@@ -39966,16 +39963,35 @@
   disallowed for security reasons. It also requires that UAs be
   careful to allow access to certain properties but not others.</p>
 
+  <p class="big-issue">postMessage() with a pipe isn't yet defined</p>
 
 
 
-  <h2 id="repetition">Repetition templates</h2>
+  <h2><dfn>Pipe messaging</dfn></h2>
 
-  <p class="big-issue">See <a href="http://www.whatwg.org/specs/web-forms/current-work/#repeatingFormControls">WF2</a> for now</p>
+  <p class="big-issue">...</p>
 
+  <pre class="idl">[Constructor] interface <dfn>Pipe</dfn> {
+  readonly attribute <span>PipeEnd</span> <span title="dom-pipe-end1">end1</span>;
+  readonly attribute <span>PipeEnd</span> <span title="dom-pipe-end2">end2</span>;
+};
 
+interface <dfn>PipeEnd</dfn> {
+  readonly attribute <span>Window</span> <span title="dom-owner">ownerWindow</span>;
+  readonly attribute boolean <span title="dom-endpipe">active</span>;
+  void <span title="dom-pipeend-postMessage">postMessage</span>(in DOMString message);
+  void <span title="dom-pipeend-postMessage">postMessage</span>(in DOMString message, in <span>PipeEnd</span> pipeEnd);
+  void <span title="dom-pipeend-close">close</span>();
 
+  // event handler attributes
+           attribute <span>EventListener</span> <span title="handler-endpipe-onmessage">onmessage</span>;
+           attribute <span>EventListener</span> <span title="handler-endpipe-onunload">onunload</span>;
+};</pre>
 
+  <p class="big-issue">...</p>
+
+
+
   <h2 id="syntax">The HTML syntax</h2>
 
   <h3>Writing HTML documents</h3>




More information about the Commit-Watchers mailing list