- From: poot <cvsmail@w3.org>
- Date: Fri, 24 Apr 2009 16:33:36 +0900 (JST)
- To: public-html-diffs@w3.org
Add a protocol flag to WebSocket(), which, if set, must be echoed by the server. (whatwg r2977) URL http://people.w3.org/mike/diffs/html5/websockets/Overview.1.70.html#dom-websocket-url WebSocket(url, protocol) http://people.w3.org/mike/diffs/html5/websockets/Overview.1.70.html#dom-websocket WebSocket http://people.w3.org/mike/diffs/html5/websockets/Overview.1.70.html#websocket 4 The WebSocket interface http://people.w3.org/mike/diffs/html5/websockets/Overview.1.70.html#the-websocket-interface 3 Terminology http://people.w3.org/mike/diffs/html5/websockets/Overview.1.70.html#terminology http://people.w3.org/mike/diffs/html5/websockets/Overview.diff.html http://dev.w3.org/cvsweb/html5/websockets/Overview.html?r1=1.69&r2=1.70&f=h http://html5.org/tools/web-apps-tracker?from=2976&to=2977 =================================================================== RCS file: /sources/public/html5/websockets/Overview.html,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- Overview.html 24 Apr 2009 06:48:32 -0000 1.69 +++ Overview.html 24 Apr 2009 07:33:12 -0000 1.70 @@ -295,7 +295,7 @@ <code>Node</code> objects as defined in the DOM Core specifications. <a href="#references">[DOM3CORE]</a><p>A DOM attribute is said to be <em>getting</em> when its value is being retrieved (e.g. by author script), and is said to be - <em>setting</em> when a new value is assigned to it.<h2 id="the-websocket-interface"><span class="secno">4 </span>The <code><a href="#websocket">WebSocket</a></code> interface</h2><pre class="idl">[<a href="#dom-websocket" title="dom-WebSocket">Constructor</a>(in DOMString url)] + <em>setting</em> when a new value is assigned to it.<h2 id="the-websocket-interface"><span class="secno">4 </span>The <code><a href="#websocket">WebSocket</a></code> interface</h2><pre class="idl">[<a href="#dom-websocket" title="dom-WebSocket">Constructor</a>(in DOMString url, [Optional] in DOMString protocol)] interface <dfn id="websocket">WebSocket</dfn> { readonly attribute DOMString <a href="#dom-websocket-url" title="dom-WebSocket-URL">URL</a>; @@ -314,10 +314,12 @@ };</pre><p><code><a href="#websocket">WebSocket</a></code> objects must also implement the <code>EventTarget</code> interface. <a href="#references">[DOM3EVENTS]</a> - <p>The <dfn id="dom-websocket" title="dom-WebSocket"><code>WebSocket(<var title="">url</var>)</code></dfn> constructor takes one argument, - <var title="">url</var>, which specifies the <span>URL</span> to - which to connect. When the <code>WebSocket()</code> constructor is - invoked, the UA must run these steps:<ol><li><p><span title="parse a url">Parse</span> the <var title="">url</var> argument.</li> + <p>The <dfn id="dom-websocket" title="dom-WebSocket"><code>WebSocket(<var title="">url</var>, <var title="">protocol</var>)</code></dfn> + constructor takes one or two arguments. The first argument, <var title="">url</var>, specifies the <span>URL</span> to which to + connect. The second, <var title="">protocol</var>, if present, + specifies a sub-protocol that the server must support for the + connection to be successful. When the <code>WebSocket()</code> + constructor is invoked, the UA must run these steps:<ol><li><p><span title="parse a url">Parse</span> the <var title="">url</var> argument.</li> <li><p>If the previous step failed, or if <var title="">url</var> does not have a <span title="url-scheme"><scheme></span> @@ -326,6 +328,11 @@ case-insensitive</span> manner, then throw a <code>SYNTAX_ERR</code> exception.</li> + <li><p>If <var title="">protocol</var> is specified but is either + the empty string or contains characters that are not in the range + U+0021 .. U+007E, then throw a <code>SYNTAX_ERR</code> + exception.</li> + <li><p>Return a new <code><a href="#websocket">WebSocket</a></code> object, and continue these steps in the background (without blocking scripts).</li> @@ -357,8 +364,9 @@ <li><p><span>Establish a Web Socket connection</span> to a host <var title="">host</var>, on port <var title="">port</var> (if one - was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, and with <var title="">resource name</var> - as the resource name.</li> + was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, with <var title="">resource name</var> as + the resource name, and with <var title="">protocol</var> as the + protocol (if it is present).</li> </ol><hr><p>The <dfn id="dom-websocket-url" title="dom-WebSocket-URL"><code>URL</code></dfn> attribute must return the value that was passed to the
Received on Friday, 24 April 2009 07:34:13 UTC