- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 11 Jul 2008 09:34:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec In directory hutz:/tmp/cvs-serv27537 Modified Files: Overview.html Log Message: Messaging: introduce placeholders for pipes; make all the messaging systems use 'message' and MessageEvent; rename 'server sent dom events' to 'server sent events'. (whatwg r1861) Index: Overview.html =================================================================== RCS file: /sources/public/html5/spec/Overview.html,v retrieving revision 1.1049 retrieving revision 1.1050 diff -u -d -r1.1049 -r1.1050 --- Overview.html 10 Jul 2008 19:54:16 -0000 1.1049 +++ Overview.html 11 Jul 2008 09:34:11 -0000 1.1050 @@ -19,7 +19,7 @@ for HTML and XHTML</h2> <h2 class="no-num no-toc" id=editors0><!-- "W3C Working Draft" --> - Editor's Draft <!--ZZZ-->10 July 2008</h2> + Editor's Draft <!--ZZZ-->11 July 2008</h2> <dl><!-- ZZZ: update the month/day <dt>This Version:</dt> @@ -167,7 +167,7 @@ <p>The W3C <a href="http://www.w3.org/html/wg/">HTML Working Group</a> is the W3C working group responsible for this specification's progress along - the W3C Recommendation track. <!--ZZZ:--> This specification is the 10 + the W3C Recommendation track. <!--ZZZ:--> This specification is the 11 July 2008 <!--ZZZ "Working Draft"-->Editor's Draft. <!--:ZZZ--></p> <!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --> <!-- relationship to other work (required) --> @@ -1611,7 +1611,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> @@ -1678,8 +1678,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> @@ -30315,6 +30315,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>; @@ -30394,7 +30395,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 @@ -40798,9 +40799,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: @@ -40809,8 +40812,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 @@ -40826,23 +40830,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 @@ -41189,12 +41211,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 @@ -41323,7 +41344,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 @@ -41356,9 +41378,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> @@ -41445,46 +41467,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: - - <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="#references">[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>The <code title=event-message><a href="#message0"><code>message</code> + event is fired when when data is received for a connection.</a></code> <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 @@ -41505,13 +41495,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> @@ -41984,10 +41974,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> @@ -42260,10 +42255,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 @@ -42337,11 +42330,31 @@ 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>
Received on Friday, 11 July 2008 09:34:49 UTC