- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 10 Sep 2011 01:26:13 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/postmsg In directory hutz:/tmp/cvs-serv747 Modified Files: Overview.html Log Message: Update Event interfaces to use constructors instead of init*Event methods; remove some typedefs. (whatwg r6551) Index: Overview.html =================================================================== RCS file: /sources/public/html5/postmsg/Overview.html,v retrieving revision 1.95 retrieving revision 1.96 diff -u -d -r1.95 -r1.96 --- Overview.html 17 Aug 2011 23:33:21 -0000 1.95 +++ Overview.html 10 Sep 2011 01:26:10 -0000 1.96 @@ -214,7 +214,7 @@ <h1>HTML5 Web Messaging</h1> - <h2 class="no-num no-toc" id="editor-s-draft-17-august-2011">Editor's Draft 17 August 2011</h2> + <h2 class="no-num no-toc" id="editor-s-draft-10-september-2011">Editor's Draft 10 September 2011</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/webmessaging/">http://www.w3.org/TR/webmessaging/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -316,7 +316,7 @@ </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 17 August 2011 Editor's Draft. + This specification is the 10 September 2011 Editor's Draft. </p><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>. W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables @@ -410,13 +410,21 @@ <a href="#refsEVENTSOURCE">[EVENTSOURCE]</a> <a href="#refsWEBSOCKET">[WEBSOCKET]</a> - <p>The following interface is defined for this event:<pre class="idl">interface <dfn id="messageevent">MessageEvent</dfn> : <span>Event</span> { + <p>The following interface is defined for this event:<pre class="idl">[Constructor(DOMString type, optional <a href="#messageeventinit">MessageEventInit</a> eventInitDict)] +interface <dfn id="messageevent">MessageEvent</dfn> : <span>Event</span> { readonly attribute any <a href="#dom-messageevent-data" title="dom-MessageEvent-data">data</a>; readonly attribute DOMString <a href="#dom-messageevent-origin" title="dom-MessageEvent-origin">origin</a>; readonly attribute DOMString <a href="#dom-messageevent-lasteventid" title="dom-MessageEvent-lastEventId">lastEventId</a>; readonly attribute <span>WindowProxy</span>? <a href="#dom-messageevent-source" title="dom-MessageEvent-source">source</a>; - readonly attribute <a href="#messageport">MessagePort</a>[] <a href="#dom-messageevent-ports" title="dom-MessageEvent-ports">ports</a>; - void <a href="#dom-messageevent-initmessageevent" title="dom-MessageEvent-initMessageEvent">initMessageEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, any dataArg, DOMString originArg, DOMString lastEventIdArg, <span>WindowProxy</span>? sourceArg, sequence<<a href="#messageport">MessagePort</a>> portsArg); + readonly attribute <a href="#messageport">MessagePort</a>[]? <a href="#dom-messageevent-ports" title="dom-MessageEvent-ports">ports</a>; +}; + +dictionary <dfn id="messageeventinit">MessageEventInit</dfn> : <span>EventInit</span> { + any data; + DOMString origin; + DOMString lastEventId; + <span>WindowProxy</span>? source; + <a href="#messageport">MessagePort</a>[]? ports; };</pre><dl class="domintro"><dt><var title="">event</var> . <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code></dt> <dd> @@ -464,14 +472,14 @@ </dl><div class="impl"> - <p>The <dfn id="dom-messageevent-initmessageevent" title="dom-MessageEvent-initMessageEvent"><code>initMessageEvent()</code></dfn> - method must initialize the event in a manner analogous to the - similarly-named method in the DOM Events interfaces. <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p> - <p>The <dfn id="dom-messageevent-data" title="dom-MessageEvent-data"><code>data</code></dfn> - attribute represents the message being sent.</p> + attribute must return the value it was initialized to. When the + object is created, this attribute must be initialized to null. It + represents the message being sent.</p> <p>The <dfn id="dom-messageevent-origin" title="dom-MessageEvent-origin"><code>origin</code></dfn> attribute + must return the value it was initialized to. When the object is + created, this attribute must be initialized to the empty string. It represents, in <span>server-sent events</span> and <a href="#web-messaging">cross-document messaging</a>, the <span>origin</span> of the document that sent the message (typically the scheme, hostname, @@ -479,27 +487,25 @@ identifier).</p> <p>The <dfn id="dom-messageevent-lasteventid" title="dom-MessageEvent-lastEventId"><code>lastEventId</code></dfn> - attribute represents, in <span>server-sent events</span>, the <span title="concept-event-stream-last-event-id">last event ID + attribute must return the value it was initialized to. When the + object is created, this attribute must be initialized to the empty + string. It represents, in <span>server-sent events</span>, the <span title="concept-event-stream-last-event-id">last event ID string</span> of the event source.</p> <p>The <dfn id="dom-messageevent-source" title="dom-MessageEvent-source"><code>source</code></dfn> attribute - represents, in <a href="#web-messaging">cross-document messaging</a>, the + must return the value it was initialized to. When the object is + created, this attribute must be initialized to null. It represents, + in <a href="#web-messaging">cross-document messaging</a>, the <code>WindowProxy</code> of the <span>browsing context</span> of the <code>Window</code> object from which the message came.</p> <p>The <dfn id="dom-messageevent-ports" title="dom-MessageEvent-ports"><code>ports</code></dfn> - attribute represents, in <a href="#web-messaging">cross-document messaging</a> and + attribute must return the value it was initialized to. When the + object is created, this attribute must be initialized to null. + It represents, in <a href="#web-messaging">cross-document messaging</a> and <a href="#channel-messaging">channel messaging</a> the <code><a href="#messageport">MessagePort</a></code> array being sent, if any.</p> - <p>Except where otherwise specified, when the user agent creates and - dispatches a <code title="event-message"><a href="#event-message">message</a></code> event in the - algorithms described in the following sections, the <code title="dom-MessageEvent-lastEventId"><a href="#dom-messageevent-lasteventid">lastEventId</a></code> attribute - must be the empty string, the <code title="dom-MessageEvent-origin"><a href="#dom-messageevent-origin">origin</a></code> attribute must be the - empty string, the <code title="dom-MessageEvent-source"><a href="#dom-messageevent-source">source</a></code> attribute must be - null, and the <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> - attribute must be null.</p> - </div><h2 id="web-messaging"><span class="secno">4 </span><dfn id="crossDocumentMessages">Cross-document messaging</dfn></h2><p>Web browsers, for security and privacy reasons, prevent documents in different domains from affecting each other; that is, cross-site scripting is disallowed.<p>While this is an important security feature, it prevents pages @@ -713,14 +719,15 @@ <p>Create an event that uses the <code><a href="#messageevent">MessageEvent</a></code> interface, with the event name <code title="event-message"><a href="#event-message">message</a></code>, which does not bubble, is - not cancelable, and has no default action. The <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> attribute must be set to - the value of <var title="">message clone</var>, the <code title="dom-MessageEvent-origin"><a href="#dom-messageevent-origin">origin</a></code> attribute must be - set to the <span title="Unicode serialization of an + not cancelable, and has no default action. The <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> attribute must be + initialized to the value of <var title="">message clone</var>, the + <code title="dom-MessageEvent-origin"><a href="#dom-messageevent-origin">origin</a></code> attribute must + be initialized 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-source"><a href="#dom-messageevent-source">source</a></code> attribute must be - set to the <span>script's global object</span>'s - <code>WindowProxy</code> object, and the <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> attribute must be set - to the <var title="">new ports</var> array.</p> + initialized to the <span>script's global object</span>'s + <code>WindowProxy</code> object, and the <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> attribute must be + initialized to the <var title="">new ports</var> array.</p> </li> <li> @@ -1000,20 +1007,19 @@ </li> + <li><p>If there is no <var title="">target port</var> (i.e. if <var title="">source port</var> is not entangled), then abort these + steps.</li> <li><p>Create an event that uses the <code><a href="#messageevent">MessageEvent</a></code> interface, with the name <code title="event-message"><a href="#event-message">message</a></code>, which does not bubble, is not cancelable, and has no default action.</li> <li><p>Let the <code title="dom-MessageEvent-data"><a href="#dom-messageevent-data">data</a></code> - attribute of the event have the value of <var title="">message - clone</var>.</li> + attribute of the event be initialized to the value of <var title="">message clone</var>.</li> <li><p>Let the <code title="dom-MessageEvent-ports"><a href="#dom-messageevent-ports">ports</a></code> - attribute of the event be the <var title="">new ports</var> - array.</li> + attribute of the event be initialized to the <var title="">new + ports</var> array.</li> - <li><p>If there is no <var title="">target port</var> (i.e. if <var title="">source port</var> is not entangled), then abort these - steps.</li> <li><p>Add the event to the <a href="#port-message-queue">port message queue</a> of <var title="">target port</var>.</li> </ol><hr><p>The <dfn id="dom-messageport-start" title="dom-MessagePort-start"><code>start()</code></dfn> @@ -1084,11 +1090,6 @@ memory usage.<h2 class="no-num" id="references">References</h2><p>All references are normative unless marked "Non-normative".</p><dl><dt id="refsDOMCORE">[DOMCORE]</dt> <dd><cite><a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html">Web DOM Core</a></cite>, A. van Kesteren. W3C.</dd> - <dt id="refsDOMEVENTS">[DOMEVENTS]</dt> - <dd><cite><a href="http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html">Document - Object Model (DOM) Level 3 Events Specification</a></cite>, - D. Schepers. W3C.</dd> - <dt id="refsEVENTSOURCE">[EVENTSOURCE]</dt> <dd><cite><a href="http://dev.w3.org/html5/eventsource/">Server-Sent Events</a></cite>, I. Hickson. W3C.</dd>
Received on Saturday, 10 September 2011 01:26:15 UTC