On 2012-07-11 20:25, Julian Reschke wrote:
On 2012-07-11 15:44, Julian Reschke wrote:
On 2012-07-11 15:11, Arthur Barstow wrote:
Yesterday Hixie closed several of the Web Sockets bugs mentioned in the
e-mail below and he updated others. I think this now provides a basis to
determine if we have consensus to publish a Candidate Recommendation. As
such, this is a Call for Consensus to publish a Candidate Recommendation
of Web Sockets.
I propose the CR be based on the May 24 LC [1] plus include:
1. The editorial patch for 17224 [2]
2. The patch [3] to remove the TreatNonCallableAsNull qualifier for some
attributes. If anyone considers this change as substantive, please speak
up. Cameron - what's your opinion on this?
Additionally:
* 12510 - as Hixie indicated in the bug, if anyone is willing to create
a patch, please contact Hixie privately and please let me know of your
intent
...
I'll re-state that the current spec is under defined, and should not be
published.
As far as I can tell, the W3C team will have to tune some parts of the
spec anyway, so why not also insert the missing links?
(If the answer to that is: "too much work" then why do you consider that
it's not a problem for the *audience* of the spec?)
...
OK; the amount of work is ~45 minutes (and probably can be automated for
future publication cycles).
See attachments; an edited version of the current editor's draft, and
the diffs.
...
..and the diff was reversed; new version attached.
--- wsapi.html 2012-07-10 22:38:35.000000000 +0100
+++ ws.html 2012-07-11 19:20:05.712293700 +0100
@@ -507,7 +507,7 @@
<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>(DOMString url, optional (DOMString or
DOMString[]) protocols)]
-interface <dfn id="websocket">WebSocket</dfn> : <span>EventTarget</span> {
+interface <dfn id="websocket">WebSocket</dfn> : <a
href="http://dev.w3.org/html5/spec/infrastructure.html#eventtarget">EventTarget</a>
{
readonly attribute DOMString <a href="#dom-websocket-url"
title="dom-WebSocket-url">url</a>;
// ready state
@@ -519,23 +519,23 @@
readonly attribute unsigned long <a href="#dom-websocket-bufferedamount"
title="dom-WebSocket-bufferedAmount">bufferedAmount</a>;
// networking
- attribute <span>EventHandler</span> <a
href="#handler-websocket-onopen" title="handler-WebSocket-onopen">onopen</a>;
- attribute <span>EventHandler</span> <a
href="#handler-websocket-onerror" title="handler-WebSocket-onerror">onerror</a>;
- attribute <span>EventHandler</span> <a
href="#handler-websocket-onclose" title="handler-WebSocket-onclose">onclose</a>;
+ attribute <a
href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">EventHandler</a>
<a href="#handler-websocket-onopen"
title="handler-WebSocket-onopen">onopen</a>;
+ attribute <a
href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">EventHandler</a>
<a href="#handler-websocket-onerror"
title="handler-WebSocket-onerror">onerror</a>;
+ attribute <a
href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">EventHandler</a>
<a href="#handler-websocket-onclose"
title="handler-WebSocket-onclose">onclose</a>;
readonly attribute DOMString <a href="#dom-websocket-extensions"
title="dom-WebSocket-extensions">extensions</a>;
readonly attribute DOMString <a href="#dom-websocket-protocol"
title="dom-WebSocket-protocol">protocol</a>;
void <a href="#dom-websocket-close"
title="dom-WebSocket-close">close</a>([Clamp] optional unsigned short code,
optional DOMString reason);
// messaging
- attribute <span>EventHandler</span> <a
href="#handler-websocket-onmessage"
title="handler-WebSocket-onmessage">onmessage</a>;
+ attribute <a
href="http://dev.w3.org/html5/spec/webappapis.html#eventhandler">EventHandler</a>
<a href="#handler-websocket-onmessage"
title="handler-WebSocket-onmessage">onmessage</a>;
attribute DOMString <a href="#dom-websocket-binarytype"
title="dom-WebSocket-binaryType">binaryType</a>;
void <a href="#dom-websocket-send"
title="dom-WebSocket-send">send</a>(DOMString data);
void <a href="#dom-websocket-send"
title="dom-WebSocket-send">send</a>(<span>ArrayBufferView</span> data);
- void <a href="#dom-websocket-send"
title="dom-WebSocket-send">send</a>(<span>Blob</span> data);
+ void <a href="#dom-websocket-send" title="dom-WebSocket-send">send</a>(<a
href="http://dev.w3.org/html5/spec/infrastructure.html#blob">Blob</a> data);
};</pre>
<p>The <dfn id="dom-websocket" title="dom-WebSocket"><code>WebSocket(<var
title="">url</var>, <var title="">protocols</var>)</code></dfn>
- constructor takes one or two arguments. The first argument, <var
title="">url</var>, specifies the <span>URL</span> to which to
+ constructor takes one or two arguments. The first argument, <var
title="">url</var>, specifies the <a
href="http://dev.w3.org/html5/spec/urls.html#url">URL</a> to which to
connect. The second, <var title="">protocols</var>, if present, is
either a string or an array of strings. If it is a string, it is
equivalent to an array consisting of just that string; if it is
@@ -555,7 +555,7 @@
<code>SyntaxError</code> exception and abort these steps. <a
href="#refsWSP">[WSP]</a></li>
<li><p>If <var title="">secure</var> is false but the
- <span>origin</span> of the <span>entry script</span> has a scheme
+ <a href="http://dev.w3.org/html5/spec/origin-0.html#origin">origin</a> of
the <a href="http://dev.w3.org/html5/spec/browsers.html#entry-script">entry
script</a> has a scheme
component that is itself a secure protocol, e.g. HTTPS, then throw
a <code>SecurityError</code> exception.</li>
@@ -594,8 +594,8 @@
<li><p>Let <var title="">origin</var> be the <span title="ASCII
serialization of an origin">ASCII serialization</span> of the
- <span>origin</span> of the <span>entry script</span>,
- <span>converted to ASCII lowercase</span>.</li>
+ <a href="http://dev.w3.org/html5/spec/origin-0.html#origin">origin</a> of
the <a href="http://dev.w3.org/html5/spec/browsers.html#entry-script">entry
script</a>,
+ <a
href="http://dev.w3.org/html5/spec/infrastructure.html#converted-to-ascii-lowercase">converted
to ASCII lowercase</a>.</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>
@@ -633,15 +633,15 @@
</li>
- </ol><p>This constructor must be visible when the <span>script's global
- object</span> is either a <code>Window</code> object or an object
+ </ol><p>This constructor must be visible when the <a
href="http://dev.w3.org/html5/spec/webappapis.html#script-s-global-object">script's
global
+ object</a> is either a <code>Window</code> object or an object
implementing the <code>WorkerUtils</code> interface.</p>
<hr><p>The <dfn id="dom-websocket-url"
title="dom-WebSocket-url"><code>url</code></dfn>
attribute must return the result of <span title="resolve a
- url">resolving</span> the <span>URL</span> that was passed to the
+ url">resolving</span> the <a
href="http://dev.w3.org/html5/spec/urls.html#url">URL</a> that was passed to the
constructor. (It doesn't matter what it is resolved relative to,
- since we already know it is an <span>absolute URL</span>.)</p>
+ since we already know it is an <a
href="http://dev.w3.org/html5/spec/urls.html#absolute-url">absolute
URL</a>.)</p>
<p>The <dfn id="dom-websocket-readystate"
title="dom-WebSocket-readyState"><code>readyState</code></dfn>
attribute represents the state of the connection. It can have the
@@ -792,7 +792,7 @@
</ol><hr><p>The <dfn id="dom-websocket-bufferedamount"
title="dom-WebSocket-bufferedAmount"><code>bufferedAmount</code></dfn>
attribute must return the number of bytes of application data (UTF-8
text and binary data) that have been queued using <code
title="dom-WebSocket-send"><a href="#dom-websocket-send">send()</a></code> but
that, as of the last
- time the <span>event loop</span> started executing a <span
title="concept-task">task</span>, had not yet been transmitted to
+ time the <a
href="http://dev.w3.org/html5/spec/webappapis.html#event-loop">event loop</a>
started executing a <span title="concept-task">task</span>, had not yet been
transmitted to
the network. (This thus includes any text sent during the execution
of the current task, regardless of whether the user agent is able to
transmit text asynchronously with script execution.) This does not
@@ -920,12 +920,12 @@
</dd>
- </dl><hr><p>The following are the <span>event handlers</span> (and their
- corresponding <span title="event handler event type">event handler
- event types</span>) that must be supported, as IDL attributes, by
+ </dl><hr><p>The following are the <a
href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers">event
handlers</a> (and their
+ corresponding <a title="event handler event type"
href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type">event
handler
+ event types</a>) that must be supported, as IDL attributes, by
all objects implementing the <code><a href="#websocket">WebSocket</a></code>
interface:</p>
- <table><thead><tr><th><span title="event handlers">Event handler</span>
<th><span>Event handler event type</span>
+ <table><thead><tr><th><span title="event handlers">Event handler</span>
<th><a
href="href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type"">Event
handler event type</a>
<tbody><tr><td><dfn id="handler-websocket-onopen"
title="handler-WebSocket-onopen"><code>onopen</code></dfn> <td> <code
title="event-open">open</code>
<tr><td><dfn id="handler-websocket-onmessage"
title="handler-WebSocket-onmessage"><code>onmessage</code></dfn> <td> <code
title="event-message">message</code>
<tr><td><dfn id="handler-websocket-onerror"
title="handler-WebSocket-onerror"><code>onerror</code></dfn> <td> <code
title="event-error">error</code>
@@ -933,7 +933,7 @@
</table><h2 id="feedback-from-the-protocol"><span class="secno">5
</span>Feedback from the protocol</h2>
<p>When <i>the WebSocket connection is established</i>, the user
- agent must <span>queue a task</span> to run these steps:</p>
+ agent must <a
href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a
task</a> to run these steps:</p>
<ol><li><p>Change the <code title="dom-WebSocket-readyState"><a
href="#dom-websocket-readystate">readyState</a></code> attribute's
value to <code title="dom-WebSocket-OPEN"><a
href="#dom-websocket-open">OPEN</a></code> (1).</li>
@@ -949,11 +949,11 @@
of the <i>cookies set during the server's opening handshake</i>,
for the URL <var title="">url</var> given to the <code
title="dom-WebSocket"><a href="#dom-websocket">WebSocket()</a></code>
constructor. <a href="#refsCOOKIES">[COOKIES]</a> <a
href="#refsRFC3629">[RFC3629]</a> <a href="#refsWSP">[WSP]</a></li>
- <li><p><span>Fire a simple event</span> named <code
title="event-open">open</code> at the <code><a
href="#websocket">WebSocket</a></code>
+ <li><p><a
href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">Fire a
simple event</a> named <code title="event-open">open</code> at the <code><a
href="#websocket">WebSocket</a></code>
object.</p>
</ol><hr><p>When <i>a WebSocket message has been received</i> with type <var
title="">type</var> and data <var title="">data</var>, the user
- agent must <span>queue a task</span> to follow these steps: <a
href="#refsWSP">[WSP]</a></p>
+ agent must <a
href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a
task</a> to follow these steps: <a href="#refsWSP">[WSP]</a></p>
<ol><li>
@@ -977,8 +977,8 @@
<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>
+ serialization</span> of the <a
href="http://dev.w3.org/html5/spec/origin-0.html#origin">origin</a> of the
+ <a href="http://dev.w3.org/html5/spec/urls.html#url">URL</a> that was
passed to the <code><a href="#websocket">WebSocket</a></code>
object's constructor.</li>
<li>
@@ -1036,7 +1036,7 @@
</div>
<hr><p>When <i>the WebSocket closing handshake is started</i>, the user
- agent must <span>queue a task</span> to change the <code
title="dom-WebSocket-readyState"><a
href="#dom-websocket-readystate">readyState</a></code> attribute's value
+ agent must <a
href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a
task</a> to change the <code title="dom-WebSocket-readyState"><a
href="#dom-websocket-readystate">readyState</a></code> attribute's value
to <code title="dom-WebSocket-CLOSING"><a
href="#dom-websocket-closing">CLOSING</a></code> (2). (If the
<code title="dom-WebSocket-close"><a
href="#dom-websocket-close">close()</a></code> method was called,
the <code title="dom-WebSocket-readyState"><a
href="#dom-websocket-readystate">readyState</a></code>
@@ -1045,7 +1045,7 @@
<hr><p id="closeWebSocket">When <i>the WebSocket connection is
closed</i>, possibly <i title="">cleanly</i>, the user agent must
- <span>queue a task</span> to run the following substeps:</p>
+ <a href="http://dev.w3.org/html5/spec/webappapis.html#queue-a-task">queue a
task</a> to run the following substeps:</p>
<ol><li><p>Change the <code title="dom-WebSocket-readyState"><a
href="#dom-websocket-readystate">readyState</a></code> attribute's
value to <code title="dom-WebSocket-CLOSED"><a
href="#dom-websocket-closed">CLOSED</a></code>
@@ -1053,7 +1053,7 @@
<li><p>If the user agent was required to <i>fail the websocket
connection</i> or <i>the WebSocket connection is closed</i> <dfn
id="concept-websocket-close-fail" title="concept-websocket-close-fail">with
prejudice</dfn>,
- <span>fire a simple event</span> named <code title="">error</code>
+ <a
href="http://dev.w3.org/html5/spec/webappapis.html#fire-a-simple-event">fire a
simple event</a> named <code title="">error</code>
at the <code><a href="#websocket">WebSocket</a></code> object. <a
href="#refsWSP">[WSP]</a></li>
<li><p>Create an event that uses the <code><a
href="#closeevent">CloseEvent</a></code>
@@ -1064,10 +1064,10 @@
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 initialized to <i>the WebSocket connection close reason</i>
- <span>decoded as UTF-8, with error handling</span>, and dispatch
+ <span><!--MISSINGREF-->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
+ </ol><p>The <a
href="http://dev.w3.org/html5/spec/webappapis.html#task-source">task source</a>
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>.</p>
@@ -1098,7 +1098,7 @@
flag, or they fail.</p>
<ol><li><p>If the <var title="">url</var> string is not an
- <span>absolute URL</span>, then fail this algorithm.</li>
+ <a href="http://dev.w3.org/html5/spec/urls.html#absolute-url">absolute
URL</a>, then fail this algorithm.</li>
<li>
@@ -1106,13 +1106,13 @@
UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p>
<p class="note">It doesn't matter what it is resolved relative to,
- since we already know it is an <span>absolute URL</span> at this
+ since we already know it is an <a
href="http://dev.w3.org/html5/spec/urls.html#absolute-url">absolute URL</a> at
this
point.</p>
</li>
<li><p>If <var title="">url</var> does not have a <span
title="url-scheme"><scheme></span> component whose value,
- when <span>converted to ASCII lowercase</span>, is either "<code
title="">ws</code>" or "<code title="">wss</code>", then fail this
+ when <a
href="http://dev.w3.org/html5/spec/infrastructure.html#converted-to-ascii-lowercase">converted
to ASCII lowercase</a>, is either "<code title="">ws</code>" or "<code
title="">wss</code>", then fail this
algorithm.</li>
<li><p>If <var title="">url</var> has a <span
title="url-fragment"><fragment></span> component, then fail
@@ -1123,8 +1123,8 @@
set <var title="">secure</var> to false; otherwise, the <span
title="url-scheme"><scheme></span> component is "<code
title="">wss</code>", set <var title="">secure</var> to
true.</li>
- <li><p>Let <var title="">host</var> be the value of the <span
title="url-host"><host></span> component of <var title="">url</var>,
<span>converted to ASCII
- lowercase</span>.</li>
+ <li><p>Let <var title="">host</var> be the value of the <span
title="url-host"><host></span> component of <var title="">url</var>, <a
href="http://dev.w3.org/html5/spec/infrastructure.html#converted-to-ascii-lowercase">converted
to ASCII
+ lowercase</a>.</li>
<li><p>If <var title="">url</var> has a <span
title="url-port"><port></span> component, then let <var
title="">port</var> be that component's value; otherwise, there is
no explicit <var title="">port</var>.</li>
@@ -1150,13 +1150,13 @@
</ol><h2 id="event-definitions"><span class="secno">8 </span>Event
definitions</h2>
<pre class="idl">[Constructor(DOMString type, optional <a
href="#closeeventinit">CloseEventInit</a> eventInitDict)]
-interface <dfn id="closeevent">CloseEvent</dfn> : <span>Event</span> {
+interface <dfn id="closeevent">CloseEvent</dfn> : <a
href="http://dev.w3.org/html5/spec/infrastructure.html#event">Event</a> {
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>;
};
-dictionary <dfn id="closeeventinit">CloseEventInit</dfn> :
<span>EventInit</span> {
+dictionary <dfn id="closeeventinit">CloseEventInit</dfn> : <a
href="http://dev.w3.org/html5/spec/infrastructure.html#eventinit">EventInit</a>
{
boolean wasClean;
unsigned short code;
DOMString reason;
@@ -1185,19 +1185,19 @@
<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
+ (0) as of the last time the <a
href="http://dev.w3.org/html5/spec/webappapis.html#event-loop">event loop</a>
started
executing a <span title="concept-task">task</span> must not be
garbage collected if there are any event listeners registered for
<code title="event-open">open</code> events, <code
title="event-message">message</code> events, <code
title="event-error">error</code> events, or <code
title="event-close">close</code> events.</p>
<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-OPEN"><a
href="#dom-websocket-open">OPEN</a></code> (1) as of
- the last time the <span>event loop</span> started executing a <span
title="concept-task">task</span> must not be garbage collected if
+ the last time the <a
href="http://dev.w3.org/html5/spec/webappapis.html#event-loop">event loop</a>
started executing a <span title="concept-task">task</span> must not be garbage
collected if
there are any event listeners registered for <code
title="event-message">message</code> events, <code
title="event-error">error</code>, or <code title="event-close">close</code>
events.</p>
<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-CLOSING"><a
href="#dom-websocket-closing">CLOSING</a></code> (2) as
- of the last time the <span>event loop</span> started executing a
+ of the last time the <a
href="http://dev.w3.org/html5/spec/webappapis.html#event-loop">event loop</a>
started executing a
<span title="concept-task">task</span> must not be garbage collected
if there are any event listeners registered for <code
title="event-error">error</code> or <code title="event-close">close</code>
events.</p>