html5/websockets Overview.html,1.240,1.241

Update of /sources/public/html5/websockets
In directory hutz:/tmp/cvs-serv807

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/websockets/Overview.html,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -d -r1.240 -r1.241
--- Overview.html	25 Aug 2011 22:37:30 -0000	1.240
+++ Overview.html	10 Sep 2011 01:26:18 -0000	1.241
@@ -214,7 +214,7 @@
 
    <h1>The WebSocket API</h1>
    
-   <h2 class="no-num no-toc" id="editor-s-draft-25-august-2011">Editor's Draft 25 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/websockets/">http://www.w3.org/TR/websockets/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -318,7 +318,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 25 August 2011 Editor's Draft.
+  This specification is the 10 September 2011 Editor's Draft.
   <p>This specification is being developed in conjunction with an
   Internet Draft for a wire protocol, the WebSocket Protocol,
   available from the following location:<ul><li>WebSocket Protocol Internet-Draft: <a href="http://www.whatwg.org/specs/web-socket-protocol/">http://www.whatwg.org/specs/web-socket-protocol/</a></li>
@@ -817,7 +817,7 @@
 
    </li>
 
-   <li><p>Set <var title="">event</var>'s <code title="dom-MessageEvent-origin">origin</code> attribute to the
+   <li><p>Initialize <var title="">event</var>'s <code title="dom-MessageEvent-origin">origin</code> attribute to the
    <span title="Unicode serialization of an origin">Unicode
    serialization</span> of the <span>origin</span> of the
    <span>URL</span> that was passed to the <code><a href="#websocket">WebSocket</a></code>
@@ -826,17 +826,17 @@
    <li>
 
     <p>If <var title="">type</var> indicates that the data is Text,
-    then set <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to <var title="">data</var>.
+    then initialize <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to <var title="">data</var>.
 
     <p>If <var title="">type</var> indicates that the data is Binary,
     and <code title="dom-WebSocket-binaryType"><a href="#dom-websocket-binarytype">binaryType</a></code> is
-    set to "<code title="">blob</code>", then set <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to a new
+    set to "<code title="">blob</code>", then initialize <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to a new
     <code>Blob</code> object that represents <var title="">data</var>
     as its raw data. <a href="#refsFILEAPI">[FILEAPI]</a></p>
 
     <p>If <var title="">type</var> indicates that the data is Binary,
     and <code title="dom-WebSocket-binaryType"><a href="#dom-websocket-binarytype">binaryType</a></code> is
-    set to "<code title="">arraybuffer</code>", then set <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to a new
+    set to "<code title="">arraybuffer</code>", then initialize <var title="">event</var>'s <code title="dom-MessageEvent-data">data</code> attribute to a new
     read-only <code>ArrayBuffer</code> object whose contents are <var title="">data</var>. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
 
    </li>
@@ -876,30 +876,39 @@
 
    <li><p>Create an event that uses the <code><a href="#closeevent">CloseEvent</a></code>
    interface, with the event name <code title="event-close">close</code>, which does not bubble, is not
-   cancelable, has no default action, whose <code title="dom-CloseEvent-wasClean"><a href="#dom-closeevent-wasclean">wasClean</a></code> attribute is set to
+   cancelable, has no default action, whose <code title="dom-CloseEvent-wasClean"><a href="#dom-closeevent-wasclean">wasClean</a></code> attribute is initialized to
    true if the connection closed <i title="">cleanly</i> and false
    otherwise, whose <code title="dom-CloseEvent-code"><a href="#dom-closeevent-code">code</a></code>
-   attribute is set to <i>the WebSocket connection close code</i>, and
+   attribute is initialized to <i>the WebSocket connection close code</i>, and
    whose <code title="dom-CloseEvent-reason"><a href="#dom-closeevent-reason">reason</a></code> attribute
-   is set to <i>the WebSocket connection close reason</i>
+   is initialized to <i>the WebSocket connection close reason</i>
    <span>decoded as UTF-8, with error handling</span>, and dispatch
    the event at the <code><a href="#websocket">WebSocket</a></code> object. <a href="#refsWSP">[WSP]</a></li>
 
   </ol><p>The <span>task source</span> for all <span title="concept-task">tasks</span> <span title="queue a
   task">queued</span> in this section is the <dfn id="websocket-task-source">WebSocket task
-  source</dfn>.<h3 id="event-definitions"><span class="secno">5.1 </span>Event definitions</h3><pre class="idl">interface <dfn id="closeevent">CloseEvent</dfn> : <span>Event</span> {
+  source</dfn>.<h3 id="event-definitions"><span class="secno">5.1 </span>Event definitions</h3><pre class="idl">[Constructor(DOMString type, optional <a href="#closeeventinit">CloseEventInit</a> eventInitDict)]
+interface <dfn id="closeevent">CloseEvent</dfn> : <span>Event</span> {
   readonly attribute boolean <a href="#dom-closeevent-wasclean" title="dom-CloseEvent-wasClean">wasClean</a>;
   readonly attribute unsigned short <a href="#dom-closeevent-code" title="dom-CloseEvent-code">code</a>;
   readonly attribute DOMString <span title="dom-WebSocket-reason">reason</span>;
-  void <a href="#dom-closeevent-initcloseevent" title="dom-CloseEvent-initCloseEvent">initCloseEvent</a>(DOMString typeArg, boolean canBubbleArg, boolean cancelableArg, boolean wasCleanArg, unsigned short codeArg, DOMString reasonArg);
-};</pre><p>The <dfn id="dom-closeevent-initcloseevent" title="dom-CloseEvent-initCloseEvent"><code>initCloseEvent()</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>The <dfn id="dom-closeevent-wasclean" title="dom-CloseEvent-wasClean"><code>wasClean</code></dfn>
-  attribute represents whether the connection closed cleanly or
-  not.<p>The <dfn id="dom-closeevent-code" title="dom-CloseEvent-code"><code>code</code></dfn>
-  attribute represents the WebSocket connection close code provided by
-  the server.<p>The <dfn id="dom-closeevent-reason" title="dom-CloseEvent-reason"><code>reason</code></dfn>
-  attribute represents the WebSocket connection close reason provided
+};
+
+dictionary <dfn id="closeeventinit">CloseEventInit</dfn> : <span>EventInit</span> {
+  boolean wasClean;
+  unsigned short code;
+  DOMString reason;
+};</pre><p>The <dfn id="dom-closeevent-wasclean" title="dom-CloseEvent-wasClean"><code>wasClean</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to false. It
+  represents whether the connection closed cleanly or not.<p>The <dfn id="dom-closeevent-code" title="dom-CloseEvent-code"><code>code</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to zero. It
+  represents the WebSocket connection close code provided by the
+  server.<p>The <dfn id="dom-closeevent-reason" title="dom-CloseEvent-reason"><code>reason</code></dfn>
+  attribute must return the value it was initialized to. When the
+  object is created, this attribute must be initialized to empty
+  string. It represents the WebSocket connection close reason provided
   by the server.<h3 id="garbage-collection"><span class="secno">5.2 </span>Garbage collection</h3><p>A <code><a href="#websocket">WebSocket</a></code> object whose <code title="dom-WebSocket-readyState"><a href="#dom-websocket-readystate">readyState</a></code> attribute's value
   was set to <code title="dom-WebSocket-CONNECTING"><a href="#dom-websocket-connecting">CONNECTING</a></code>
   (0) as of the last time the <span>event loop</span> started
@@ -952,11 +961,6 @@
    <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="refsFILEAPI">[FILEAPI]</dt>
    <dd><cite><a href="http://dev.w3.org/2006/webapi/FileUpload/publish/FileAPI.html">File
    API</a></cite>, A. Ranganathan. W3C.</dd>

Received on Saturday, 10 September 2011 01:26:25 UTC