[html5] r7704 - [e] (0) Cleanup Affected topics: HTML, Workers
whatwg at whatwg.org
whatwg at whatwg.org
Thu Feb 7 11:54:06 PST 2013
Author: ianh
Date: 2013-02-07 11:54:05 -0800 (Thu, 07 Feb 2013)
New Revision: 7704
Modified:
complete.html
index
source
Log:
[e] (0) Cleanup
Affected topics: HTML, Workers
Modified: complete.html
===================================================================
--- complete.html 2013-02-07 19:40:04 UTC (rev 7703)
+++ complete.html 2013-02-07 19:54:05 UTC (rev 7704)
@@ -16849,10 +16849,11 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-hgroup-element>hgroup</a></code> element <a href=#represents>represents</a> the heading of a section,
- which consists of all the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element children of the <code><a href=#the-hgroup-element>hgroup</a></code> element. The element
- is used to group a set of <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements when the heading has
- multiple levels, such as subheadings, alternative titles, or taglines.</p>
+ </dl><!--TOPIC:HTML--><p>The <code><a href=#the-hgroup-element>hgroup</a></code> element <a href=#represents>represents</a> the heading of a section, which
+ consists of all the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element children of the
+ <code><a href=#the-hgroup-element>hgroup</a></code> element. The element is used to group a set of
+ <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements when the heading has multiple levels, such as
+ subheadings, alternative titles, or taglines.</p>
<p>Other elements of <a href=#heading-content>heading content</a> in the <code><a href=#the-hgroup-element>hgroup</a></code> element indicate
subheadings or subtitles.</p>
@@ -25195,100 +25196,92 @@
interfaces.</p>
</div>
</dd>
- </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an
- integration point for an external (typically non-HTML) application
- or interactive content.</p>
+ </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an integration point for an external
+ (typically non-HTML) application or interactive content.</p>
- <p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute
- gives the address of the resource being embedded. The attribute, if
- present, must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially
- surrounded by spaces</a>.</p>
+ <p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute gives the address of the
+ resource being embedded. The attribute, if present, must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL
+ potentially surrounded by spaces</a>.</p>
- <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> is specified
- on an <code><a href=#the-embed-element>embed</a></code> element, then the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute must also be
- specified.</p>
+ <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> is specified on an <code><a href=#the-embed-element>embed</a></code>
+ element, then the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute must also be specified.</p>
- <p>The <dfn id=attr-embed-type title=attr-embed-type><code>type</code></dfn>
- attribute, if present, gives the <a href=#mime-type>MIME type</a> by which the
- plugin to instantiate is selected. The value must be a <a href=#valid-mime-type>valid
- MIME type</a>. If both the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute and the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute are present, then the
- <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute must specify the
- same type as the <a href=#content-type title=Content-Type>explicit Content-Type
- metadata</a> of the resource given by the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute.</p>
+ <p>The <dfn id=attr-embed-type title=attr-embed-type><code>type</code></dfn> attribute, if present, gives the
+ <a href=#mime-type>MIME type</a> by which the plugin to instantiate is selected. The value must be a
+ <a href=#valid-mime-type>valid MIME type</a>. If both the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute and
+ the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute are present, then the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute must specify the same type as the <a href=#content-type title=Content-Type>explicit Content-Type metadata</a> of the resource given by the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute.</p>
<div class=impl>
- <p>When the element is created with neither a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes
- are removed such that neither attribute is present on the element
- anymore, and when the element has a <a href=#media-element>media element</a>
- ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code>
- element that is <em>not</em> showing its <a href=#fallback-content>fallback
- content</a>, any plugins instantiated for the element must be
- removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
+ <p>When the element is created with neither a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute
+ nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes are removed such
+ that neither attribute is present on the element anymore, and when the element has a <a href=#media-element>media
+ element</a> ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code> element that is
+ <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any plugins instantiated for the element
+ must be removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
- <p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially active</dfn> when the
- following conditions are all met simultaneously:</p>
+ <p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially
+ active</dfn> when the following conditions are all met simultaneously:</p>
- <ul class=brief><li>The element is <a href=#in-a-document title="in a document">in a <code>Document</code></a> or was <a href=#in-a-document title="in a document">in a <code>Document</code></a> the last time the <a href=#event-loop>event loop</a> reached step 1.</li>
+ <ul class=brief><li>The element is <a href=#in-a-document title="in a document">in a <code>Document</code></a> or was <a href=#in-a-document title="in a document">in a <code>Document</code></a> the last time the <a href=#event-loop>event loop</a>
+ reached step 1.</li>
+
<li>The element's <code><a href=#document>Document</a></code> is <a href=#fully-active>fully active</a>.</li>
+
<li>The element has either a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set or a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set (or both).</li>
- <li>The element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute is either absent or its value is not the empty string.</li>
+
+ <li>The element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute is either absent or its value
+ is not the empty string.</li>
+
<li>The element is not a descendant of a <a href=#media-element>media element</a>.</li>
- <li>The element is not a descendant of an <code><a href=#the-object-element>object</a></code> element that is not showing its <a href=#fallback-content>fallback content</a>.</li>
- <li>The element is <a href=#being-rendered>being rendered</a>, or was <a href=#being-rendered>being rendered</a> the last time the <a href=#event-loop>event loop</a> reached step 1.</li>
- </ul><!--CLEANUP--><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever
- a <a href=#concept-embed-active title=concept-embed-active>potentially active</a>
- <code><a href=#the-embed-element>embed</a></code> element that is remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its
- <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or
- removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute
- set, changed, or removed, the user agent must <a href=#queue-a-task>queue a task</a>
- using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+ <li>The element is not a descendant of an <code><a href=#the-object-element>object</a></code> element that is not showing its
+ <a href=#fallback-content>fallback content</a>.</li>
+
+ <li>The element is <a href=#being-rendered>being rendered</a>, or was <a href=#being-rendered>being rendered</a> the last time
+ the <a href=#event-loop>event loop</a> reached step 1.</li>
+
+ </ul><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever a <a href=#concept-embed-active title=concept-embed-active>potentially active</a> <code><a href=#the-embed-element>embed</a></code> element that is
+ remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set, changed, or removed, the user agent must
+ <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+
<ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run these steps
for this element, then abort these steps.</li>
<li>
- <dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code>
- attribute set</dt>
+ <dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd>
+ <dd>
- <p>The user agent must <a href=#resolve-a-url title="resolve a url">resolve</a>
- the value of the element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code>
- attribute, relative to the element. If that is successful, the
- user agent should <a href=#fetch>fetch</a><!--FETCH--> the resulting
- <a href=#absolute-url>absolute URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing
- context scope origin</a> if it has one<!-- potentially
- http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that is <a href=#queue-a-task title="queue a
- task">queued</a> by the <a href=#networking-task-source>networking task source</a>
- once the resource has been <a href=#fetch title=fetch>fetched</a> must
- find and instantiate an appropriate <a href=#plugin>plugin</a> based on
- the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and
- hand that <a href=#plugin>plugin</a> the content of the resource,
- replacing any previously instantiated plugin for the element.</p>
- <!-- Note that this doesn't happen when the base URL changes. -->
+ <p>The user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the element's
+ <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute, relative to the element. If that is
+ successful, the user agent should <a href=#fetch>fetch</a><!--FETCH--> the resulting <a href=#absolute-url>absolute
+ URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing context scope origin</a> if it has one<!--
+ potentially http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that
+ is <a href=#queue-a-task title="queue a task">queued</a> by the <a href=#networking-task-source>networking task source</a> once
+ the resource has been <a href=#fetch title=fetch>fetched</a> must find and instantiate an
+ appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>, and hand that <a href=#plugin>plugin</a> the content of the resource, replacing any
+ previously instantiated plugin for the element.</p>
+ <!-- Note that this doesn't happen when the base URL changes. -->
- <p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of
- the element's document.</p>
- <!-- if we add load/error events, then replace the previous
- paragraph with the text one: -->
- <!-- similar text in various places -->
- <!--<p>Fetching the resource must <span>delay the load
- event</span> of the element's document until the final <span
- title="concept-task">task</span> that is <span title="queue a
- task">queued</span> by the <span>networking task source</span>
- once the resource has been <span title="fetch">fetched</span> has
- been run.</p>-->
+ <p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of the element's document.</p>
+ <!-- if we add load/error events, then replace the previous paragraph with the text one: -->
+ <!-- similar text in various places -->
+ <!--<p>Fetching the resource must <span>delay the load event</span> of the element's document
+ until the final <span title="concept-task">task</span> that is <span title="queue a
+ task">queued</span> by the <span>networking task source</span> once the resource has been
+ <span title="fetch">fetched</span> has been run.</p>-->
- </dd>
+ </dd>
- <dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
+ <dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on the
- value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
+ <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on
+ the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
- </dl></li>
+ </dl></li>
</ol><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
active</a> stops being <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, any
@@ -25397,8 +25390,8 @@
<p>If the user does not have the plugin (for example if the plugin vendor doesn't support the
user's platform), then the user will be unable to use the resource.</p>
- <p>To pass the plugin a parameter "quality" with the value "high",
- an attribute can be specified:</p>
+ <p>To pass the plugin a parameter "quality" with the value "high", an attribute can be
+ specified:</p>
<pre><embed src="catgame.swf" quality="high"></pre>
@@ -80269,10 +80262,10 @@
shutting down unexpectedly.</p></li>
-->
- <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event <!--CLEANUP-->
- loop</a>'s <a href=#task-queue title="task queue">task queues</a><!-- v2-onclose other than the <code
- title="event-worker-close">close</code> event that this algorithm just added-->, discard them
- without processing them.</li>
+ <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event loop</a>'s <a href=#task-queue title="task queue">task
+ queues</a><!-- v2-onclose other than the <code title="event-worker-close">close</code> event
+ that this algorithm just added-->, discard them without processing them.</li>
<!-- v2-onclose
<li><p>If the <code title="event-worker-close">close</code> event that this algorithm just queued
@@ -80296,9 +80289,9 @@
<ol><li><p>Set the worker's <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag to true.</li>
- <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event <!--CLEANUP-->
- loop</a>'s <a href=#task-queue title="task queue">task queues</a>, discard them without processing
- them.</li>
+ <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event loop</a>'s <a href=#task-queue title="task queue">task
+ queues</a>, discard them without processing them.</li>
<li><p>Abort the script currently running in the worker.</li>
@@ -82071,118 +82064,98 @@
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#arraybufferview>ArrayBufferView</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 <a href=#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
- omitted, it is equivalent to the empty array. Each string in the
- array is a subprotocol name. The connection will only be established
- if the server reports that it has selected one of these
- subprotocols. The subprotocol names must all be strings that match
- the requirements for elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification. <a href=#refsWSP>[WSP]</a></p>
+ <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 <a href=#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 omitted, it is
+ equivalent to the empty array. Each string in the array is a subprotocol name. The connection will
+ only be established if the server reports that it has selected one of these subprotocols. The
+ subprotocol names must all be strings that match the requirements for elements that comprise the
+ value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code> header fields as
+ defined by the WebSocket protocol specification. <a href=#refsWSP>[WSP]</a></p>
- <p>When the <code>WebSocket()</code> constructor is invoked, the UA
- must run these steps:</p>
+ <p>When the <code>WebSocket()</code> constructor is invoked, the UA must run these steps:</p>
- <ol><li><p><i><a href="#parse-a-websocket-url's-components">Parse a WebSocket URL's components</a></i> from the <var title="">url</var> argument, to obtain <var title="">host</var>,
- <var title="">port</var>, <var title="">resource name</var>, and
- <var title="">secure</var>. If this fails, throw a
- <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsWSP>[WSP]</a></li>
+ <ol><li><p><i><a href="#parse-a-websocket-url's-components">Parse a WebSocket URL's components</a></i> from the <var title="">url</var> argument, to
+ obtain <var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, and
+ <var title="">secure</var>. If this fails, throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
+ these steps. <a href=#refsWSP>[WSP]</a></li>
- <li><p>If <var title="">secure</var> is false but the
- <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a> has a scheme
- component that is itself a secure protocol, e.g. HTTPS, then throw
- a <code><a href=#securityerror>SecurityError</a></code> exception.</li>
+ <li><p>If <var title="">secure</var> is false but the <a href=#origin>origin</a> of the <a href=#entry-script>entry
+ script</a> has a scheme component that is itself a secure protocol, e.g. HTTPS, then throw a
+ <code><a href=#securityerror>SecurityError</a></code> exception.</li>
<li>
- <p>If <var title="">port</var> is a port to which the user agent
- is configured to block access, then throw a
- <code><a href=#securityerror>SecurityError</a></code> exception. (User agents typically block
- access to well-known ports like SMTP.)</p>
-
+ <p>If <var title="">port</var> is a port to which the user agent is configured to block access,
+ then throw a <code><a href=#securityerror>SecurityError</a></code> exception. (User agents typically block access to
+ well-known ports like SMTP.)</p>
<!-- e.g. http://www.mozilla.org/projects/netlib/PortBanning.html -->
- <p>Access to ports 80 and 443 should not be blocked, including the
- unlikely cases when <var title="">secure</var> is false but <var title="">port</var> is 443 or <var title="">secure</var> is true
- but <var title="">port</var> is 80.</p>
+ <p>Access to ports 80 and 443 should not be blocked, including the unlikely cases when <var title="">secure</var> is false but <var title="">port</var> is 443 or <var title="">secure</var>
+ is true but <var title="">port</var> is 80.</p>
<!-- paragraph requested by zcorpan -->
</li>
<li>
- <p>If <var title="">protocols</var> is absent, let <var title="">protocols</var> be an empty array.</p>
+ <p>If <var title="">protocols</var> is absent, let <var title="">protocols</var> be an empty
+ array.</p>
- <p>Otherwise, if <var title="">protocols</var> is present and a
- string, let <var title="">protocols</var> instead be an array
- consisting of just that string.</p>
+ <p>Otherwise, if <var title="">protocols</var> is present and a string, let <var title="">protocols</var> instead be an array consisting of just that string.</p>
</li>
- <li><p>If any of the values in <var title="">protocols</var> occur
- more than once or otherwise fail to match the requirements for
- elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification,
- then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
+ <li><p>If any of the values in <var title="">protocols</var> occur more than once or otherwise
+ fail to match the requirements for elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code> header fields as defined by the
+ WebSocket protocol specification, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
steps. <a href=#refsWSP>[WSP]</a></li>
- <li><p>Let <var title="">origin</var> be the <a href=#ascii-serialization-of-an-origin title="ASCII
- serialization of an origin">ASCII serialization</a> of the
- <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a>,
- <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>.</li>
+ <li><p>Let <var title="">origin</var> be the <a href=#ascii-serialization-of-an-origin title="ASCII serialization of an origin">ASCII
+ serialization</a> of the <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a>, <a href=#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>
+ <li><p>Return a new <code><a href=#websocket>WebSocket</a></code> object, and continue these steps in the background
+ (without blocking scripts).</li>
<li>
- <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along
- with the <var title="">protocols</var> list, an empty list for the
- extensions, and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send
- appropriate cookies</a></i> must be a <code title=http-Cookie>Cookie</code> header whose value is the
- <i><a href=#cookie-string>cookie-string</a></i> computed from the user's cookie store and the
- URL <var title="">url</var>; for these purposes this is
+ <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along with
+ the <var title="">protocols</var> list, an empty list for the extensions, and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send appropriate cookies</a></i> must be a <code title=http-Cookie>Cookie</code> header whose value is the <i><a href=#cookie-string>cookie-string</a></i> computed from
+ the user's cookie store and the URL <var title="">url</var>; for these purposes this is
<em>not</em> a "non-HTTP" API. <a href=#refsWSP>[WSP]</a> <a href=#refsCOOKIES>[COOKIES]</a></p>
- <p>When the user agent <i title="validate the server's
- response"><a href="#validate-the-server's-response">validates the server's response</a></i> during the
- "<i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>" algorithm, if the status
- code received from the server is not 101 (e.g. it is a redirect),
- the user agent must <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i>.</p>
+ <p>When the user agent <i title="validate the server's response"><a href="#validate-the-server's-response">validates the server's
+ response</a></i> during the "<i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>" algorithm, if the status code
+ received from the server is not 101 (e.g. it is a redirect), the user agent must <i><a href=#fail-the-websocket-connection>fail the
+ WebSocket connection</a></i>.</p>
- <p class=warning>Following HTTP procedures here could introduce
- serious security problems in a Web browser context. For example,
- consider a host with a WebSocket server at one path and an open
- HTTP redirector at another. Suddenly, any script that can be given
- a particular WebSocket URL can be tricked into communicating to
- (and potentially sharing secrets with) any host on the Internet,
- even if the script checks that the URL has the right hostname.</p>
+ <p class=warning>Following HTTP procedures here could introduce serious security problems in a
+ Web browser context. For example, consider a host with a WebSocket server at one path and an
+ open HTTP redirector at another. Suddenly, any script that can be given a particular WebSocket
+ URL can be tricked into communicating to (and potentially sharing secrets with) any host on the
+ Internet, even if the script checks that the URL has the right hostname.</p>
<!-- http://www.ietf.org/mail-archive/web/hybi/current/msg06951.html -->
- <p class=note>If the <i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>
- algorithm fails, it triggers the <i><a href=#fail-the-websocket-connection>fail the WebSocket
- connection</a></i> algorithm, which then invokes the <i><a href=#close-the-websocket-connection>close the
- WebSocket connection</a></i> algorithm, which then establishes that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>If the <i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i> algorithm fails, it triggers the
+ <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i> algorithm, which then invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
+ connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>,
+ which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as
+ described below</a>.</p>
</li>
- </ol><p>This constructor must be visible when the <a href="#script's-global-object">script's global
- object</a> is either a <code><a href=#window>Window</a></code> object or an object
- implementing the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> interface.</p>
+ </ol><p>This constructor must be visible when the <a href="#script's-global-object">script's global object</a> is either a
+ <code><a href=#window>Window</a></code> object or an object implementing the <code><a href=#workerglobalscope>WorkerGlobalScope</a></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 <a href=#resolve-a-url title="resolve a
- url">resolving</a> the <a href=#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 <a href=#absolute-url>absolute URL</a>.)</p>
+ <hr><p>The <dfn id=dom-websocket-url title=dom-WebSocket-url><code>url</code></dfn> attribute must return the result of
+ <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#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
+ <a href=#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
- following values:</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 following values:</p>
<dl><dt><dfn id=dom-websocket-connecting title=dom-WebSocket-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
@@ -82200,112 +82173,96 @@
<dd>The connection has been closed or could not be opened.</dd>
- </dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
- <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>
+ </dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be
+ set to <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>
- <p>The <dfn id=dom-websocket-extensions title=dom-WebSocket-extensions><code>extensions</code></dfn>
- attribute must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the
- WebSocket connection is established</a></i>, its value might change, as
- defined below.</p>
+ <p>The <dfn id=dom-websocket-extensions title=dom-WebSocket-extensions><code>extensions</code></dfn> attribute must
+ initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, its value
+ might change, as defined below.</p>
- <p class=note>The <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute returns
- the extensions selected by the server, if any. (Currently this will
- only ever be the empty string.)</p>
+ <p class=note>The <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute returns the
+ extensions selected by the server, if any. (Currently this will only ever be the empty
+ string.)</p>
- <p>The <dfn id=dom-websocket-protocol title=dom-WebSocket-protocol><code>protocol</code></dfn> attribute
- must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket
- connection is established</a></i>, its value might change, as defined
- below.</p>
+ <p>The <dfn id=dom-websocket-protocol title=dom-WebSocket-protocol><code>protocol</code></dfn> attribute must initially
+ return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, its value might
+ change, as defined below.</p>
<p class=note>The <code title=dom-WebSocket-protocol><a href=#dom-websocket-protocol>protocol</a></code> attribute returns the
- subprotocol selected by the server, if any. It can be used in
- conjunction with the array form of the constructor's second argument
- to perform subprotocol negotiation.</p>
+ subprotocol selected by the server, if any. It can be used in conjunction with the array form of
+ the constructor's second argument to perform subprotocol negotiation.</p>
- <p>The <dfn id=dom-websocket-close title=dom-WebSocket-close><code>close()</code></dfn>
- method must run the following steps:</p>
+ <p>The <dfn id=dom-websocket-close title=dom-WebSocket-close><code>close()</code></dfn> method must run the following
+ steps:</p>
-<!--CLEANUP-->
- <ol><li><p>If the method's first argument is present but is neither an
- integer equal to 1000 nor an integer in the range 3000 to 4999, throw an
- <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
- steps.</li>
+ <ol><li><p>If the method's first argument is present but is neither an integer equal to 1000 nor an
+ integer in the range 3000 to 4999, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort
+ these steps.</li>
<li>
- <p>If the method's second argument is present, then run these
- substeps:</p>
+ <p>If the method's second argument is present, then run these substeps:</p>
- <ol><li><p>Let <var title="">raw reason</var> be the method's second
- argument.</li>
+ <ol><li><p>Let <var title="">raw reason</var> be the method's second argument.</li>
- <li><p>Let <var title="">Unicode reason</var> be the result of
- <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString to a sequence of Unicode
- characters">converting <var title="">raw reason</var> to a
- sequence of Unicode characters</a>.</li>
+ <li><p>Let <var title="">Unicode reason</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString
+ to a sequence of Unicode characters">converting <var title="">raw reason</var> to a sequence of
+ Unicode characters</a>.</li>
- <li><p>Let <var title="">reason</var> be the result of encoding
- <var title="">Unicode reason</var> as UTF-8.</li>
+ <li><p>Let <var title="">reason</var> be the result of encoding <var title="">Unicode
+ reason</var> as UTF-8.</li>
- <li><p>If <var title="">reason</var> is longer than 123 bytes,
- then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
- steps. <a href=#refsRFC3629>[RFC3629]</a></li>
+ <li><p>If <var title="">reason</var> is longer than 123 bytes, then throw a
+ <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsRFC3629>[RFC3629]</a></li>
</ol></li>
<li><p>Run the first matching steps from the following list:</p>
- <dl class=switch><dt>If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code>
- attribute is in the <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2) or <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code> (3) state</dt>
+ <dl class=switch><dt>If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute is in the <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2) or <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code> (3) state</dt>
<dd>
<p>Do nothing.</p>
- <p class=note>The connection is already closing or is already
- closed. If it has not already, a <code title=event-socket-close>close</code> event will eventually fire <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The connection is already closing or is already closed. If it has not already,
+ a <code title=event-socket-close>close</code> event will eventually fire <a href=#closeWebSocket>as described below</a>.</p>
</dd>
- <dt>If the WebSocket connection is not yet <i title="the
- WebSocket connection is established"><a href=#the-websocket-connection-is-established>established</a></i> <a href=#refsWSP>[WSP]</a></dt>
+ <dt>If the WebSocket connection is not yet <i title="the WebSocket connection is
+ established"><a href=#the-websocket-connection-is-established>established</a></i> <a href=#refsWSP>[WSP]</a></dt>
<dd>
- <p><i><a href=#fail-the-websocket-connection>Fail the WebSocket connection</a></i> and set 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).
- <a href=#refsWSP>[WSP]</a></p>
+ <p><i><a href=#fail-the-websocket-connection>Fail the WebSocket connection</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
- <p class=note>The <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i>
- algorithm invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
- connection</a></i> algorithm, which then establishes that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, which fires the
- <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i> algorithm invokes the <i><a href=#close-the-websocket-connection>close the
+ WebSocket connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is
+ closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
</dd>
- <dt>If the WebSocket closing handshake has not yet been <i title="the WebSocket closing handshake is
- started"><a href=#the-websocket-closing-handshake-is-started>started</a></i> <a href=#refsWSP>[WSP]</a></dt>
+ <dt>If the WebSocket closing handshake has not yet been <i title="the WebSocket closing
+ handshake is started"><a href=#the-websocket-closing-handshake-is-started>started</a></i> <a href=#refsWSP>[WSP]</a></dt>
<dd>
- <p><i><a href=#start-the-websocket-closing-handshake>Start the WebSocket closing handshake</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
+ <p><i><a href=#start-the-websocket-closing-handshake>Start the WebSocket closing handshake</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
- <p>If the first argument is present, then the status
- code<!--CLOSE CODE--> to use in the WebSocket Close message must
- be the integer given by the first argument. <a href=#refsWSP>[WSP]</a></p>
+ <p>If the first argument is present, then the status code<!--CLOSE CODE--> to use in the
+ WebSocket Close message must be the integer given by the first argument. <a href=#refsWSP>[WSP]</a></p>
- <p>If the second argument is also present, then <var title="">reason</var> must be provided in the Close message
- after the status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a> <a href=#refsWSP>[WSP]</a></p>
+ <p>If the second argument is also present, then <var title="">reason</var> must be provided in
+ the Close message after the status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a>
+ <a href=#refsWSP>[WSP]</a></p>
- <p class=note>The <i><a href=#start-the-websocket-closing-handshake>start the WebSocket closing handshake</a></i>
- algorithm eventually invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
- connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the
- WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The <i><a href=#start-the-websocket-closing-handshake>start the WebSocket closing handshake</a></i> algorithm eventually invokes
+ the <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the
+ WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described
+ below</a>.</p>
</dd>
@@ -82314,14 +82271,12 @@
<dd>
- <p>Set 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).</p>
+ <p>Set 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).</p>
- <p class=note><i><a href=#the-websocket-closing-handshake-is-started>The WebSocket closing handshake is
- started</a></i>, and will eventually invoke the <i><a href=#close-the-websocket-connection>close the
- WebSocket connection</a></i> algorithm, which will establish that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, and thus the <code title=event-socket-close>close</code> event will fire, <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note><i><a href=#the-websocket-closing-handshake-is-started>The WebSocket closing handshake is started</a></i>, and will eventually invoke
+ the <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i> algorithm, which will establish that <i><a href=#the-websocket-connection-is-closed>the
+ WebSocket connection is closed</a></i>, and thus the <code title=event-socket-close>close</code>
+ event will fire, <a href=#closeWebSocket>as described below</a>.</p>
</dd>
@@ -82620,85 +82575,70 @@
<h4 id=ping-and-pong-frames><span class=secno>10.3.4 </span>Ping and Pong frames</h4>
- <p>The WebSocket protocol specification defines Ping and Pong frames
- that can be used for keep-alive, heart-beats, network status
- probing, latency instrumentation, and so forth. These are not
- currently exposed in the API.</p>
+ <p>The WebSocket protocol specification defines Ping and Pong frames that can be used for
+ keep-alive, heart-beats, network status probing, latency instrumentation, and so forth. These are
+ not currently exposed in the API.</p>
- <p>User agents may send ping and unsolicited pong frames as desired,
- for example in an attempt to maintain local network NAT mappings, to
- detect failed connections, or to display latency metrics to the
- user. User agents must not use pings or unsolicited pongs to aid the
- server; it is assumed that servers will solicit pongs whenever
- appropriate for the server's needs.</p>
+ <p>User agents may send ping and unsolicited pong frames as desired, for example in an attempt to
+ maintain local network NAT mappings, to detect failed connections, or to display latency metrics
+ to the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed
+ that servers will solicit pongs whenever appropriate for the server's needs.</p>
- <!-- v2: we'll probably add a way to make the client send pings and
- automatically terminate the connection if they don't get a pong
- within an author-provided timeout; see
+ <!-- v2: we'll probably add a way to make the client send pings and automatically terminate the
+ connection if they don't get a pong within an author-provided timeout; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17264 -->
<h4 id=parsing-websocket-urls><span class=secno>10.3.5 </span>Parsing WebSocket URLs</h4>
- <p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from
- a string <var title="">url</var> are as follows. These steps return
- either a <var title="">host</var>, a <var title="">port</var>, a
- <var title="">resource name</var>, and a <var title="">secure</var>
- flag, or they fail.</p>
+ <p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from a string <var title="">url</var> are as follows. These steps return either a <var title="">host</var>, a <var title="">port</var>, a <var title="">resource name</var>, and a <var title="">secure</var> flag,
+ or they fail.</p>
- <ol><li><p>If the <var title="">url</var> string is not an
- <a href=#absolute-url>absolute URL</a>, then fail this algorithm.</li>
+ <ol><li><p>If the <var title="">url</var> string is not an <a href=#absolute-url>absolute URL</a>, then fail this
+ algorithm.</li>
<li>
- <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the URL character encoding set to
- UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL
- character encoding is used to escape the query component -->
+ <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the URL
+ character encoding set to UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL character
+ encoding is used to escape the query component -->
- <p class=note>It doesn't matter what it is resolved relative to,
- since we already know it is an <a href=#absolute-url>absolute URL</a> at this
- point.</p>
+ <p class=note>It doesn't matter what it is resolved relative to, since we already know it is
+ an <a href=#absolute-url>absolute URL</a> at this point.</p>
</li>
- <li><p>If <var title="">url</var> does not have a <a href=#url-scheme title=url-scheme><scheme></a> component whose value,
- when <a href=#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> does not have a <a href=#url-scheme title=url-scheme><scheme></a>
+ component whose value, when <a href=#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 <a href=#url-fragment title=url-fragment><fragment></a> component, then fail
- this algorithm.</li>
+ <li><p>If <var title="">url</var> has a <a href=#url-fragment title=url-fragment><fragment></a>
+ component, then fail this algorithm.</li>
- <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a>
- component of <var title="">url</var> is "<code title="">ws</code>",
- set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> component is "<code title="">wss</code>", set <var title="">secure</var> to
- true.</li>
+ <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a> component of <var title="">url</var>
+ is "<code title="">ws</code>", set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> 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 <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
- lowercase</a>.</li> <!-- at this point this is
- Punycode-encoded already -->
+ <li><p>Let <var title="">host</var> be the value of the <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to
+ ASCII lowercase</a>.</li> <!-- at this point this is Punycode-encoded already -->
- <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> component, then let <var title="">port</var> be that component's value; otherwise, there is
- no explicit <var title="">port</var>.</li>
+ <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> component,
+ then let <var title="">port</var> be that component's value; otherwise, there is no explicit <var title="">port</var>.</li>
- <li><p>If there is no explicit <var title="">port</var>, then: if
- <var title="">secure</var> is false, let <var title="">port</var>
- be 80, otherwise let <var title="">port</var> be 443.</li>
+ <li><p>If there is no explicit <var title="">port</var>, then: if <var title="">secure</var> is
+ false, let <var title="">port</var> be 80, otherwise let <var title="">port</var> be
+ 443.</li>
- <li><p>Let <var title="">resource name</var> be the value of the
- <a href=#url-path title=url-path><path></a> component (which might
- be empty) of <var title="">url</var>.</li> <!-- at this point
- this is UTF-8 encoded and %-escaped -->
+ <li><p>Let <var title="">resource name</var> be the value of the <a href=#url-path title=url-path><path></a> component (which might be empty) of <var title="">url</var>.</li> <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>If <var title="">resource name</var> is the empty string,
- set it to a single character U+002F SOLIDUS (/).</li>
+ <li><p>If <var title="">resource name</var> is the empty string, set it to a single character
+ U+002F SOLIDUS (/).</li>
- <li><p>If <var title="">url</var> has a <a href=#url-query title=url-query><query></a> component, then append a
- single U+003F QUESTION MARK character (?) to <var title="">resource
- name</var>, followed by the value of the <a href=#url-query title=url-query><query></a> component.</li> <!-- at
- this point this is UTF-8 encoded and %-escaped -->
+ <li><p>If <var title="">url</var> has a <a href=#url-query title=url-query><query></a> component,
+ then append a single U+003F QUESTION MARK character (?) to <var title="">resource name</var>,
+ followed by the value of the <a href=#url-query title=url-query><query></a> component.</li>
+ <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>Return <var title="">host</var>, <var title="">port</var>,
- <var title="">resource name</var>, and <var title="">secure</var>.</li>
+ <li><p>Return <var title="">host</var>, <var title="">port</var>, <var title="">resource
+ name</var>, and <var title="">secure</var>.</li>
</ol><h4 id=event-definitions-2><span class=secno>10.3.6 </span>Event definitions</h4>
@@ -82715,22 +82655,17 @@
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>
+ <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>
- <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>
+ <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>
- <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.</p>
+ <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.</p>
Modified: index
===================================================================
--- index 2013-02-07 19:40:04 UTC (rev 7703)
+++ index 2013-02-07 19:54:05 UTC (rev 7704)
@@ -16849,10 +16849,11 @@
<dd><a href=#global-attributes>Global attributes</a></dd>
<dt><a href=#element-dfn-dom title=element-dfn-dom>DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
<dd>Uses <code><a href=#htmlelement>HTMLElement</a></code>.</dd>
- </dl><!--TOPIC:HTML--><!--CLEANUP--><p>The <code><a href=#the-hgroup-element>hgroup</a></code> element <a href=#represents>represents</a> the heading of a section,
- which consists of all the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element children of the <code><a href=#the-hgroup-element>hgroup</a></code> element. The element
- is used to group a set of <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements when the heading has
- multiple levels, such as subheadings, alternative titles, or taglines.</p>
+ </dl><!--TOPIC:HTML--><p>The <code><a href=#the-hgroup-element>hgroup</a></code> element <a href=#represents>represents</a> the heading of a section, which
+ consists of all the <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> element children of the
+ <code><a href=#the-hgroup-element>hgroup</a></code> element. The element is used to group a set of
+ <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>–<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code> elements when the heading has multiple levels, such as
+ subheadings, alternative titles, or taglines.</p>
<p>Other elements of <a href=#heading-content>heading content</a> in the <code><a href=#the-hgroup-element>hgroup</a></code> element indicate
subheadings or subtitles.</p>
@@ -25195,100 +25196,92 @@
interfaces.</p>
</div>
</dd>
- </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an
- integration point for an external (typically non-HTML) application
- or interactive content.</p>
+ </dl><!--TOPIC:HTML--><p>The <code><a href=#the-embed-element>embed</a></code> element <a href=#represents>represents</a> an integration point for an external
+ (typically non-HTML) application or interactive content.</p>
- <p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute
- gives the address of the resource being embedded. The attribute, if
- present, must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL potentially
- surrounded by spaces</a>.</p>
+ <p>The <dfn id=attr-embed-src title=attr-embed-src><code>src</code></dfn> attribute gives the address of the
+ resource being embedded. The attribute, if present, must contain a <a href=#valid-non-empty-url-potentially-surrounded-by-spaces>valid non-empty URL
+ potentially surrounded by spaces</a>.</p>
- <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> is specified
- on an <code><a href=#the-embed-element>embed</a></code> element, then the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute must also be
- specified.</p>
+ <p>If the <code title=attr-itemprop><a href=#names:-the-itemprop-attribute>itemprop</a></code> is specified on an <code><a href=#the-embed-element>embed</a></code>
+ element, then the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute must also be specified.</p>
- <p>The <dfn id=attr-embed-type title=attr-embed-type><code>type</code></dfn>
- attribute, if present, gives the <a href=#mime-type>MIME type</a> by which the
- plugin to instantiate is selected. The value must be a <a href=#valid-mime-type>valid
- MIME type</a>. If both the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute and the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute are present, then the
- <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute must specify the
- same type as the <a href=#content-type title=Content-Type>explicit Content-Type
- metadata</a> of the resource given by the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute.</p>
+ <p>The <dfn id=attr-embed-type title=attr-embed-type><code>type</code></dfn> attribute, if present, gives the
+ <a href=#mime-type>MIME type</a> by which the plugin to instantiate is selected. The value must be a
+ <a href=#valid-mime-type>valid MIME type</a>. If both the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute and
+ the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute are present, then the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute must specify the same type as the <a href=#content-type title=Content-Type>explicit Content-Type metadata</a> of the resource given by the <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute.</p>
<div class=impl>
- <p>When the element is created with neither a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes
- are removed such that neither attribute is present on the element
- anymore, and when the element has a <a href=#media-element>media element</a>
- ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code>
- element that is <em>not</em> showing its <a href=#fallback-content>fallback
- content</a>, any plugins instantiated for the element must be
- removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
+ <p>When the element is created with neither a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute
+ nor a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute, and when attributes are removed such
+ that neither attribute is present on the element anymore, and when the element has a <a href=#media-element>media
+ element</a> ancestor, and when the element has an ancestor <code><a href=#the-object-element>object</a></code> element that is
+ <em>not</em> showing its <a href=#fallback-content>fallback content</a>, any plugins instantiated for the element
+ must be removed, and the <code><a href=#the-embed-element>embed</a></code> element represents nothing.</p>
- <p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially active</dfn> when the
- following conditions are all met simultaneously:</p>
+ <p>An <code><a href=#the-embed-element>embed</a></code> element is said to be <dfn id=concept-embed-active title=concept-embed-active>potentially
+ active</dfn> when the following conditions are all met simultaneously:</p>
- <ul class=brief><li>The element is <a href=#in-a-document title="in a document">in a <code>Document</code></a> or was <a href=#in-a-document title="in a document">in a <code>Document</code></a> the last time the <a href=#event-loop>event loop</a> reached step 1.</li>
+ <ul class=brief><li>The element is <a href=#in-a-document title="in a document">in a <code>Document</code></a> or was <a href=#in-a-document title="in a document">in a <code>Document</code></a> the last time the <a href=#event-loop>event loop</a>
+ reached step 1.</li>
+
<li>The element's <code><a href=#document>Document</a></code> is <a href=#fully-active>fully active</a>.</li>
+
<li>The element has either a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set or a <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set (or both).</li>
- <li>The element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute is either absent or its value is not the empty string.</li>
+
+ <li>The element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute is either absent or its value
+ is not the empty string.</li>
+
<li>The element is not a descendant of a <a href=#media-element>media element</a>.</li>
- <li>The element is not a descendant of an <code><a href=#the-object-element>object</a></code> element that is not showing its <a href=#fallback-content>fallback content</a>.</li>
- <li>The element is <a href=#being-rendered>being rendered</a>, or was <a href=#being-rendered>being rendered</a> the last time the <a href=#event-loop>event loop</a> reached step 1.</li>
- </ul><!--CLEANUP--><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever
- a <a href=#concept-embed-active title=concept-embed-active>potentially active</a>
- <code><a href=#the-embed-element>embed</a></code> element that is remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its
- <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or
- removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute
- set, changed, or removed, the user agent must <a href=#queue-a-task>queue a task</a>
- using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+ <li>The element is not a descendant of an <code><a href=#the-object-element>object</a></code> element that is not showing its
+ <a href=#fallback-content>fallback content</a>.</li>
+
+ <li>The element is <a href=#being-rendered>being rendered</a>, or was <a href=#being-rendered>being rendered</a> the last time
+ the <a href=#event-loop>event loop</a> reached step 1.</li>
+
+ </ul><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was not <a href=#concept-embed-active title=concept-embed-active>potentially active</a> becomes <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, and whenever a <a href=#concept-embed-active title=concept-embed-active>potentially active</a> <code><a href=#the-embed-element>embed</a></code> element that is
+ remaining <a href=#concept-embed-active title=concept-embed-active>potentially active</a> and has its <code title=attr-embed-type><a href=#attr-embed-type>src</a></code> attribute set, changed, or removed or its <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute set, changed, or removed, the user agent must
+ <a href=#queue-a-task>queue a task</a> using the <dfn id=embed-task-source>embed task source</dfn> to run the following steps:</p>
+
<ol><li><p>If another <a href=#concept-task title=concept-task>task</a> has since been queued to run these steps
for this element, then abort these steps.</li>
<li>
- <dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code>
- attribute set</dt>
+ <dl class=switch><dt>If the element has a <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd>
+ <dd>
- <p>The user agent must <a href=#resolve-a-url title="resolve a url">resolve</a>
- the value of the element's <code title=attr-embed-src><a href=#attr-embed-src>src</a></code>
- attribute, relative to the element. If that is successful, the
- user agent should <a href=#fetch>fetch</a><!--FETCH--> the resulting
- <a href=#absolute-url>absolute URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing
- context scope origin</a> if it has one<!-- potentially
- http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that is <a href=#queue-a-task title="queue a
- task">queued</a> by the <a href=#networking-task-source>networking task source</a>
- once the resource has been <a href=#fetch title=fetch>fetched</a> must
- find and instantiate an appropriate <a href=#plugin>plugin</a> based on
- the <a href=#concept-embed-type title=concept-embed-type>content's type</a>, and
- hand that <a href=#plugin>plugin</a> the content of the resource,
- replacing any previously instantiated plugin for the element.</p>
- <!-- Note that this doesn't happen when the base URL changes. -->
+ <p>The user agent must <a href=#resolve-a-url title="resolve a url">resolve</a> the value of the element's
+ <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute, relative to the element. If that is
+ successful, the user agent should <a href=#fetch>fetch</a><!--FETCH--> the resulting <a href=#absolute-url>absolute
+ URL</a>, from the element's <a href=#browsing-context-scope-origin>browsing context scope origin</a> if it has one<!--
+ potentially http-origin privacy sensitive -->. The <a href=#concept-task title=concept-task>task</a> that
+ is <a href=#queue-a-task title="queue a task">queued</a> by the <a href=#networking-task-source>networking task source</a> once
+ the resource has been <a href=#fetch title=fetch>fetched</a> must find and instantiate an
+ appropriate <a href=#plugin>plugin</a> based on the <a href=#concept-embed-type title=concept-embed-type>content's
+ type</a>, and hand that <a href=#plugin>plugin</a> the content of the resource, replacing any
+ previously instantiated plugin for the element.</p>
+ <!-- Note that this doesn't happen when the base URL changes. -->
- <p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of
- the element's document.</p>
- <!-- if we add load/error events, then replace the previous
- paragraph with the text one: -->
- <!-- similar text in various places -->
- <!--<p>Fetching the resource must <span>delay the load
- event</span> of the element's document until the final <span
- title="concept-task">task</span> that is <span title="queue a
- task">queued</span> by the <span>networking task source</span>
- once the resource has been <span title="fetch">fetched</span> has
- been run.</p>-->
+ <p>Fetching the resource must <a href=#delay-the-load-event>delay the load event</a> of the element's document.</p>
+ <!-- if we add load/error events, then replace the previous paragraph with the text one: -->
+ <!-- similar text in various places -->
+ <!--<p>Fetching the resource must <span>delay the load event</span> of the element's document
+ until the final <span title="concept-task">task</span> that is <span title="queue a
+ task">queued</span> by the <span>networking task source</span> once the resource has been
+ <span title="fetch">fetched</span> has been run.</p>-->
- </dd>
+ </dd>
- <dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
+ <dt>If the element has no <code title=attr-embed-src><a href=#attr-embed-src>src</a></code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on the
- value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
+ <dd><p>The user agent should find and instantiate an appropriate <a href=#plugin>plugin</a> based on
+ the value of the <code title=attr-embed-type><a href=#attr-embed-type>type</a></code> attribute.</p>
- </dl></li>
+ </dl></li>
</ol><p>Whenever an <code><a href=#the-embed-element>embed</a></code> element that was <a href=#concept-embed-active title=concept-embed-active>potentially
active</a> stops being <a href=#concept-embed-active title=concept-embed-active>potentially active</a>, any
@@ -25397,8 +25390,8 @@
<p>If the user does not have the plugin (for example if the plugin vendor doesn't support the
user's platform), then the user will be unable to use the resource.</p>
- <p>To pass the plugin a parameter "quality" with the value "high",
- an attribute can be specified:</p>
+ <p>To pass the plugin a parameter "quality" with the value "high", an attribute can be
+ specified:</p>
<pre><embed src="catgame.swf" quality="high"></pre>
@@ -80269,10 +80262,10 @@
shutting down unexpectedly.</p></li>
-->
- <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event <!--CLEANUP-->
- loop</a>'s <a href=#task-queue title="task queue">task queues</a><!-- v2-onclose other than the <code
- title="event-worker-close">close</code> event that this algorithm just added-->, discard them
- without processing them.</li>
+ <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event loop</a>'s <a href=#task-queue title="task queue">task
+ queues</a><!-- v2-onclose other than the <code title="event-worker-close">close</code> event
+ that this algorithm just added-->, discard them without processing them.</li>
<!-- v2-onclose
<li><p>If the <code title="event-worker-close">close</code> event that this algorithm just queued
@@ -80296,9 +80289,9 @@
<ol><li><p>Set the worker's <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#dom-workerglobalscope-closing title=dom-WorkerGlobalScope-closing>closing</a> flag to true.</li>
- <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event <!--CLEANUP-->
- loop</a>'s <a href=#task-queue title="task queue">task queues</a>, discard them without processing
- them.</li>
+ <li><p>If there are any <a href=#concept-task title=concept-task>tasks</a> queued in the
+ <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> object's <a href=#event-loop>event loop</a>'s <a href=#task-queue title="task queue">task
+ queues</a>, discard them without processing them.</li>
<li><p>Abort the script currently running in the worker.</li>
@@ -82071,118 +82064,98 @@
void <a href=#dom-websocket-send title=dom-WebSocket-send>send</a>(<a href=#arraybufferview>ArrayBufferView</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 <a href=#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
- omitted, it is equivalent to the empty array. Each string in the
- array is a subprotocol name. The connection will only be established
- if the server reports that it has selected one of these
- subprotocols. The subprotocol names must all be strings that match
- the requirements for elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification. <a href=#refsWSP>[WSP]</a></p>
+ <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 <a href=#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 omitted, it is
+ equivalent to the empty array. Each string in the array is a subprotocol name. The connection will
+ only be established if the server reports that it has selected one of these subprotocols. The
+ subprotocol names must all be strings that match the requirements for elements that comprise the
+ value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code> header fields as
+ defined by the WebSocket protocol specification. <a href=#refsWSP>[WSP]</a></p>
- <p>When the <code>WebSocket()</code> constructor is invoked, the UA
- must run these steps:</p>
+ <p>When the <code>WebSocket()</code> constructor is invoked, the UA must run these steps:</p>
- <ol><li><p><i><a href="#parse-a-websocket-url's-components">Parse a WebSocket URL's components</a></i> from the <var title="">url</var> argument, to obtain <var title="">host</var>,
- <var title="">port</var>, <var title="">resource name</var>, and
- <var title="">secure</var>. If this fails, throw a
- <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsWSP>[WSP]</a></li>
+ <ol><li><p><i><a href="#parse-a-websocket-url's-components">Parse a WebSocket URL's components</a></i> from the <var title="">url</var> argument, to
+ obtain <var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, and
+ <var title="">secure</var>. If this fails, throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort
+ these steps. <a href=#refsWSP>[WSP]</a></li>
- <li><p>If <var title="">secure</var> is false but the
- <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a> has a scheme
- component that is itself a secure protocol, e.g. HTTPS, then throw
- a <code><a href=#securityerror>SecurityError</a></code> exception.</li>
+ <li><p>If <var title="">secure</var> is false but the <a href=#origin>origin</a> of the <a href=#entry-script>entry
+ script</a> has a scheme component that is itself a secure protocol, e.g. HTTPS, then throw a
+ <code><a href=#securityerror>SecurityError</a></code> exception.</li>
<li>
- <p>If <var title="">port</var> is a port to which the user agent
- is configured to block access, then throw a
- <code><a href=#securityerror>SecurityError</a></code> exception. (User agents typically block
- access to well-known ports like SMTP.)</p>
-
+ <p>If <var title="">port</var> is a port to which the user agent is configured to block access,
+ then throw a <code><a href=#securityerror>SecurityError</a></code> exception. (User agents typically block access to
+ well-known ports like SMTP.)</p>
<!-- e.g. http://www.mozilla.org/projects/netlib/PortBanning.html -->
- <p>Access to ports 80 and 443 should not be blocked, including the
- unlikely cases when <var title="">secure</var> is false but <var title="">port</var> is 443 or <var title="">secure</var> is true
- but <var title="">port</var> is 80.</p>
+ <p>Access to ports 80 and 443 should not be blocked, including the unlikely cases when <var title="">secure</var> is false but <var title="">port</var> is 443 or <var title="">secure</var>
+ is true but <var title="">port</var> is 80.</p>
<!-- paragraph requested by zcorpan -->
</li>
<li>
- <p>If <var title="">protocols</var> is absent, let <var title="">protocols</var> be an empty array.</p>
+ <p>If <var title="">protocols</var> is absent, let <var title="">protocols</var> be an empty
+ array.</p>
- <p>Otherwise, if <var title="">protocols</var> is present and a
- string, let <var title="">protocols</var> instead be an array
- consisting of just that string.</p>
+ <p>Otherwise, if <var title="">protocols</var> is present and a string, let <var title="">protocols</var> instead be an array consisting of just that string.</p>
</li>
- <li><p>If any of the values in <var title="">protocols</var> occur
- more than once or otherwise fail to match the requirements for
- elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification,
- then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
+ <li><p>If any of the values in <var title="">protocols</var> occur more than once or otherwise
+ fail to match the requirements for elements that comprise the value of <code title=http-sec-websocket-protocol>Sec-WebSocket-Protocol</code> header fields as defined by the
+ WebSocket protocol specification, then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
steps. <a href=#refsWSP>[WSP]</a></li>
- <li><p>Let <var title="">origin</var> be the <a href=#ascii-serialization-of-an-origin title="ASCII
- serialization of an origin">ASCII serialization</a> of the
- <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a>,
- <a href=#converted-to-ascii-lowercase>converted to ASCII lowercase</a>.</li>
+ <li><p>Let <var title="">origin</var> be the <a href=#ascii-serialization-of-an-origin title="ASCII serialization of an origin">ASCII
+ serialization</a> of the <a href=#origin>origin</a> of the <a href=#entry-script>entry script</a>, <a href=#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>
+ <li><p>Return a new <code><a href=#websocket>WebSocket</a></code> object, and continue these steps in the background
+ (without blocking scripts).</li>
<li>
- <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along
- with the <var title="">protocols</var> list, an empty list for the
- extensions, and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send
- appropriate cookies</a></i> must be a <code title=http-Cookie>Cookie</code> header whose value is the
- <i><a href=#cookie-string>cookie-string</a></i> computed from the user's cookie store and the
- URL <var title="">url</var>; for these purposes this is
+ <p><i><a href=#establish-a-websocket-connection>Establish a WebSocket connection</a></i> given the set (<var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along with
+ the <var title="">protocols</var> list, an empty list for the extensions, and <var title="">origin</var>. The <i><a href=#headers-to-send-appropriate-cookies>headers to send appropriate cookies</a></i> must be a <code title=http-Cookie>Cookie</code> header whose value is the <i><a href=#cookie-string>cookie-string</a></i> computed from
+ the user's cookie store and the URL <var title="">url</var>; for these purposes this is
<em>not</em> a "non-HTTP" API. <a href=#refsWSP>[WSP]</a> <a href=#refsCOOKIES>[COOKIES]</a></p>
- <p>When the user agent <i title="validate the server's
- response"><a href="#validate-the-server's-response">validates the server's response</a></i> during the
- "<i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>" algorithm, if the status
- code received from the server is not 101 (e.g. it is a redirect),
- the user agent must <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i>.</p>
+ <p>When the user agent <i title="validate the server's response"><a href="#validate-the-server's-response">validates the server's
+ response</a></i> during the "<i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>" algorithm, if the status code
+ received from the server is not 101 (e.g. it is a redirect), the user agent must <i><a href=#fail-the-websocket-connection>fail the
+ WebSocket connection</a></i>.</p>
- <p class=warning>Following HTTP procedures here could introduce
- serious security problems in a Web browser context. For example,
- consider a host with a WebSocket server at one path and an open
- HTTP redirector at another. Suddenly, any script that can be given
- a particular WebSocket URL can be tricked into communicating to
- (and potentially sharing secrets with) any host on the Internet,
- even if the script checks that the URL has the right hostname.</p>
+ <p class=warning>Following HTTP procedures here could introduce serious security problems in a
+ Web browser context. For example, consider a host with a WebSocket server at one path and an
+ open HTTP redirector at another. Suddenly, any script that can be given a particular WebSocket
+ URL can be tricked into communicating to (and potentially sharing secrets with) any host on the
+ Internet, even if the script checks that the URL has the right hostname.</p>
<!-- http://www.ietf.org/mail-archive/web/hybi/current/msg06951.html -->
- <p class=note>If the <i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i>
- algorithm fails, it triggers the <i><a href=#fail-the-websocket-connection>fail the WebSocket
- connection</a></i> algorithm, which then invokes the <i><a href=#close-the-websocket-connection>close the
- WebSocket connection</a></i> algorithm, which then establishes that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>If the <i><a href=#establish-a-websocket-connection>establish a WebSocket connection</a></i> algorithm fails, it triggers the
+ <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i> algorithm, which then invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
+ connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>,
+ which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as
+ described below</a>.</p>
</li>
- </ol><p>This constructor must be visible when the <a href="#script's-global-object">script's global
- object</a> is either a <code><a href=#window>Window</a></code> object or an object
- implementing the <code><a href=#workerglobalscope>WorkerGlobalScope</a></code> interface.</p>
+ </ol><p>This constructor must be visible when the <a href="#script's-global-object">script's global object</a> is either a
+ <code><a href=#window>Window</a></code> object or an object implementing the <code><a href=#workerglobalscope>WorkerGlobalScope</a></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 <a href=#resolve-a-url title="resolve a
- url">resolving</a> the <a href=#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 <a href=#absolute-url>absolute URL</a>.)</p>
+ <hr><p>The <dfn id=dom-websocket-url title=dom-WebSocket-url><code>url</code></dfn> attribute must return the result of
+ <a href=#resolve-a-url title="resolve a url">resolving</a> the <a href=#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
+ <a href=#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
- following values:</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 following values:</p>
<dl><dt><dfn id=dom-websocket-connecting title=dom-WebSocket-CONNECTING><code>CONNECTING</code></dfn> (numeric value 0)</dt>
@@ -82200,112 +82173,96 @@
<dd>The connection has been closed or could not be opened.</dd>
- </dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
- <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>
+ </dl><p>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be
+ set to <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</p>
- <p>The <dfn id=dom-websocket-extensions title=dom-WebSocket-extensions><code>extensions</code></dfn>
- attribute must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the
- WebSocket connection is established</a></i>, its value might change, as
- defined below.</p>
+ <p>The <dfn id=dom-websocket-extensions title=dom-WebSocket-extensions><code>extensions</code></dfn> attribute must
+ initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, its value
+ might change, as defined below.</p>
- <p class=note>The <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute returns
- the extensions selected by the server, if any. (Currently this will
- only ever be the empty string.)</p>
+ <p class=note>The <code title=dom-WebSocket-extensions><a href=#dom-websocket-extensions>extensions</a></code> attribute returns the
+ extensions selected by the server, if any. (Currently this will only ever be the empty
+ string.)</p>
- <p>The <dfn id=dom-websocket-protocol title=dom-WebSocket-protocol><code>protocol</code></dfn> attribute
- must initially return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket
- connection is established</a></i>, its value might change, as defined
- below.</p>
+ <p>The <dfn id=dom-websocket-protocol title=dom-WebSocket-protocol><code>protocol</code></dfn> attribute must initially
+ return the empty string. After <i><a href=#the-websocket-connection-is-established>the WebSocket connection is established</a></i>, its value might
+ change, as defined below.</p>
<p class=note>The <code title=dom-WebSocket-protocol><a href=#dom-websocket-protocol>protocol</a></code> attribute returns the
- subprotocol selected by the server, if any. It can be used in
- conjunction with the array form of the constructor's second argument
- to perform subprotocol negotiation.</p>
+ subprotocol selected by the server, if any. It can be used in conjunction with the array form of
+ the constructor's second argument to perform subprotocol negotiation.</p>
- <p>The <dfn id=dom-websocket-close title=dom-WebSocket-close><code>close()</code></dfn>
- method must run the following steps:</p>
+ <p>The <dfn id=dom-websocket-close title=dom-WebSocket-close><code>close()</code></dfn> method must run the following
+ steps:</p>
-<!--CLEANUP-->
- <ol><li><p>If the method's first argument is present but is neither an
- integer equal to 1000 nor an integer in the range 3000 to 4999, throw an
- <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
- steps.</li>
+ <ol><li><p>If the method's first argument is present but is neither an integer equal to 1000 nor an
+ integer in the range 3000 to 4999, throw an <code><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort
+ these steps.</li>
<li>
- <p>If the method's second argument is present, then run these
- substeps:</p>
+ <p>If the method's second argument is present, then run these substeps:</p>
- <ol><li><p>Let <var title="">raw reason</var> be the method's second
- argument.</li>
+ <ol><li><p>Let <var title="">raw reason</var> be the method's second argument.</li>
- <li><p>Let <var title="">Unicode reason</var> be the result of
- <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString to a sequence of Unicode
- characters">converting <var title="">raw reason</var> to a
- sequence of Unicode characters</a>.</li>
+ <li><p>Let <var title="">Unicode reason</var> be the result of <a href=#convert-a-domstring-to-a-sequence-of-unicode-characters title="convert a DOMString
+ to a sequence of Unicode characters">converting <var title="">raw reason</var> to a sequence of
+ Unicode characters</a>.</li>
- <li><p>Let <var title="">reason</var> be the result of encoding
- <var title="">Unicode reason</var> as UTF-8.</li>
+ <li><p>Let <var title="">reason</var> be the result of encoding <var title="">Unicode
+ reason</var> as UTF-8.</li>
- <li><p>If <var title="">reason</var> is longer than 123 bytes,
- then throw a <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these
- steps. <a href=#refsRFC3629>[RFC3629]</a></li>
+ <li><p>If <var title="">reason</var> is longer than 123 bytes, then throw a
+ <code><a href=#syntaxerror>SyntaxError</a></code> exception and abort these steps. <a href=#refsRFC3629>[RFC3629]</a></li>
</ol></li>
<li><p>Run the first matching steps from the following list:</p>
- <dl class=switch><dt>If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code>
- attribute is in the <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2) or <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code> (3) state</dt>
+ <dl class=switch><dt>If the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute is in the <code title=dom-WebSocket-CLOSING><a href=#dom-websocket-closing>CLOSING</a></code> (2) or <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code> (3) state</dt>
<dd>
<p>Do nothing.</p>
- <p class=note>The connection is already closing or is already
- closed. If it has not already, a <code title=event-socket-close>close</code> event will eventually fire <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The connection is already closing or is already closed. If it has not already,
+ a <code title=event-socket-close>close</code> event will eventually fire <a href=#closeWebSocket>as described below</a>.</p>
</dd>
- <dt>If the WebSocket connection is not yet <i title="the
- WebSocket connection is established"><a href=#the-websocket-connection-is-established>established</a></i> <a href=#refsWSP>[WSP]</a></dt>
+ <dt>If the WebSocket connection is not yet <i title="the WebSocket connection is
+ established"><a href=#the-websocket-connection-is-established>established</a></i> <a href=#refsWSP>[WSP]</a></dt>
<dd>
- <p><i><a href=#fail-the-websocket-connection>Fail the WebSocket connection</a></i> and set 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).
- <a href=#refsWSP>[WSP]</a></p>
+ <p><i><a href=#fail-the-websocket-connection>Fail the WebSocket connection</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
- <p class=note>The <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i>
- algorithm invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
- connection</a></i> algorithm, which then establishes that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, which fires the
- <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The <i><a href=#fail-the-websocket-connection>fail the WebSocket connection</a></i> algorithm invokes the <i><a href=#close-the-websocket-connection>close the
+ WebSocket connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is
+ closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
</dd>
- <dt>If the WebSocket closing handshake has not yet been <i title="the WebSocket closing handshake is
- started"><a href=#the-websocket-closing-handshake-is-started>started</a></i> <a href=#refsWSP>[WSP]</a></dt>
+ <dt>If the WebSocket closing handshake has not yet been <i title="the WebSocket closing
+ handshake is started"><a href=#the-websocket-closing-handshake-is-started>started</a></i> <a href=#refsWSP>[WSP]</a></dt>
<dd>
- <p><i><a href=#start-the-websocket-closing-handshake>Start the WebSocket closing handshake</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
+ <p><i><a href=#start-the-websocket-closing-handshake>Start the WebSocket closing handshake</a></i> and set 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). <a href=#refsWSP>[WSP]</a></p>
- <p>If the first argument is present, then the status
- code<!--CLOSE CODE--> to use in the WebSocket Close message must
- be the integer given by the first argument. <a href=#refsWSP>[WSP]</a></p>
+ <p>If the first argument is present, then the status code<!--CLOSE CODE--> to use in the
+ WebSocket Close message must be the integer given by the first argument. <a href=#refsWSP>[WSP]</a></p>
- <p>If the second argument is also present, then <var title="">reason</var> must be provided in the Close message
- after the status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a> <a href=#refsWSP>[WSP]</a></p>
+ <p>If the second argument is also present, then <var title="">reason</var> must be provided in
+ the Close message after the status code<!--CLOSE CODE-->. <a href=#refsRFC3629>[RFC3629]</a>
+ <a href=#refsWSP>[WSP]</a></p>
- <p class=note>The <i><a href=#start-the-websocket-closing-handshake>start the WebSocket closing handshake</a></i>
- algorithm eventually invokes the <i><a href=#close-the-websocket-connection>close the WebSocket
- connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the
- WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note>The <i><a href=#start-the-websocket-closing-handshake>start the WebSocket closing handshake</a></i> algorithm eventually invokes
+ the <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i> algorithm, which then establishes that <i><a href=#the-websocket-connection-is-closed>the
+ WebSocket connection is closed</a></i>, which fires the <code title=event-socket-close>close</code> event <a href=#closeWebSocket>as described
+ below</a>.</p>
</dd>
@@ -82314,14 +82271,12 @@
<dd>
- <p>Set 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).</p>
+ <p>Set 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).</p>
- <p class=note><i><a href=#the-websocket-closing-handshake-is-started>The WebSocket closing handshake is
- started</a></i>, and will eventually invoke the <i><a href=#close-the-websocket-connection>close the
- WebSocket connection</a></i> algorithm, which will establish that
- <i><a href=#the-websocket-connection-is-closed>the WebSocket connection is closed</a></i>, and thus the <code title=event-socket-close>close</code> event will fire, <a href=#closeWebSocket>as described below</a>.</p>
+ <p class=note><i><a href=#the-websocket-closing-handshake-is-started>The WebSocket closing handshake is started</a></i>, and will eventually invoke
+ the <i><a href=#close-the-websocket-connection>close the WebSocket connection</a></i> algorithm, which will establish that <i><a href=#the-websocket-connection-is-closed>the
+ WebSocket connection is closed</a></i>, and thus the <code title=event-socket-close>close</code>
+ event will fire, <a href=#closeWebSocket>as described below</a>.</p>
</dd>
@@ -82620,85 +82575,70 @@
<h4 id=ping-and-pong-frames><span class=secno>10.3.4 </span>Ping and Pong frames</h4>
- <p>The WebSocket protocol specification defines Ping and Pong frames
- that can be used for keep-alive, heart-beats, network status
- probing, latency instrumentation, and so forth. These are not
- currently exposed in the API.</p>
+ <p>The WebSocket protocol specification defines Ping and Pong frames that can be used for
+ keep-alive, heart-beats, network status probing, latency instrumentation, and so forth. These are
+ not currently exposed in the API.</p>
- <p>User agents may send ping and unsolicited pong frames as desired,
- for example in an attempt to maintain local network NAT mappings, to
- detect failed connections, or to display latency metrics to the
- user. User agents must not use pings or unsolicited pongs to aid the
- server; it is assumed that servers will solicit pongs whenever
- appropriate for the server's needs.</p>
+ <p>User agents may send ping and unsolicited pong frames as desired, for example in an attempt to
+ maintain local network NAT mappings, to detect failed connections, or to display latency metrics
+ to the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed
+ that servers will solicit pongs whenever appropriate for the server's needs.</p>
- <!-- v2: we'll probably add a way to make the client send pings and
- automatically terminate the connection if they don't get a pong
- within an author-provided timeout; see
+ <!-- v2: we'll probably add a way to make the client send pings and automatically terminate the
+ connection if they don't get a pong within an author-provided timeout; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17264 -->
<h4 id=parsing-websocket-urls><span class=secno>10.3.5 </span>Parsing WebSocket URLs</h4>
- <p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from
- a string <var title="">url</var> are as follows. These steps return
- either a <var title="">host</var>, a <var title="">port</var>, a
- <var title="">resource name</var>, and a <var title="">secure</var>
- flag, or they fail.</p>
+ <p>The steps to <dfn id="parse-a-websocket-url's-components">parse a WebSocket URL's components</dfn> from a string <var title="">url</var> are as follows. These steps return either a <var title="">host</var>, a <var title="">port</var>, a <var title="">resource name</var>, and a <var title="">secure</var> flag,
+ or they fail.</p>
- <ol><li><p>If the <var title="">url</var> string is not an
- <a href=#absolute-url>absolute URL</a>, then fail this algorithm.</li>
+ <ol><li><p>If the <var title="">url</var> string is not an <a href=#absolute-url>absolute URL</a>, then fail this
+ algorithm.</li>
<li>
- <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the URL character encoding set to
- UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL
- character encoding is used to escape the query component -->
+ <p><a href=#resolve-a-url title="resolve a url">Resolve</a> the <var title="">url</var> string, with the URL
+ character encoding set to UTF-8. <a href=#refsRFC3629>[RFC3629]</a></p> <!-- the URL character
+ encoding is used to escape the query component -->
- <p class=note>It doesn't matter what it is resolved relative to,
- since we already know it is an <a href=#absolute-url>absolute URL</a> at this
- point.</p>
+ <p class=note>It doesn't matter what it is resolved relative to, since we already know it is
+ an <a href=#absolute-url>absolute URL</a> at this point.</p>
</li>
- <li><p>If <var title="">url</var> does not have a <a href=#url-scheme title=url-scheme><scheme></a> component whose value,
- when <a href=#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> does not have a <a href=#url-scheme title=url-scheme><scheme></a>
+ component whose value, when <a href=#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 <a href=#url-fragment title=url-fragment><fragment></a> component, then fail
- this algorithm.</li>
+ <li><p>If <var title="">url</var> has a <a href=#url-fragment title=url-fragment><fragment></a>
+ component, then fail this algorithm.</li>
- <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a>
- component of <var title="">url</var> is "<code title="">ws</code>",
- set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> component is "<code title="">wss</code>", set <var title="">secure</var> to
- true.</li>
+ <li><p>If the <a href=#url-scheme title=url-scheme><scheme></a> component of <var title="">url</var>
+ is "<code title="">ws</code>", set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme><scheme></a> 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 <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to ASCII
- lowercase</a>.</li> <!-- at this point this is
- Punycode-encoded already -->
+ <li><p>Let <var title="">host</var> be the value of the <a href=#url-host title=url-host><host></a> component of <var title="">url</var>, <a href=#converted-to-ascii-lowercase>converted to
+ ASCII lowercase</a>.</li> <!-- at this point this is Punycode-encoded already -->
- <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> component, then let <var title="">port</var> be that component's value; otherwise, there is
- no explicit <var title="">port</var>.</li>
+ <li><p>If <var title="">url</var> has a <a href=#url-port title=url-port><port></a> component,
+ then let <var title="">port</var> be that component's value; otherwise, there is no explicit <var title="">port</var>.</li>
- <li><p>If there is no explicit <var title="">port</var>, then: if
- <var title="">secure</var> is false, let <var title="">port</var>
- be 80, otherwise let <var title="">port</var> be 443.</li>
+ <li><p>If there is no explicit <var title="">port</var>, then: if <var title="">secure</var> is
+ false, let <var title="">port</var> be 80, otherwise let <var title="">port</var> be
+ 443.</li>
- <li><p>Let <var title="">resource name</var> be the value of the
- <a href=#url-path title=url-path><path></a> component (which might
- be empty) of <var title="">url</var>.</li> <!-- at this point
- this is UTF-8 encoded and %-escaped -->
+ <li><p>Let <var title="">resource name</var> be the value of the <a href=#url-path title=url-path><path></a> component (which might be empty) of <var title="">url</var>.</li> <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>If <var title="">resource name</var> is the empty string,
- set it to a single character U+002F SOLIDUS (/).</li>
+ <li><p>If <var title="">resource name</var> is the empty string, set it to a single character
+ U+002F SOLIDUS (/).</li>
- <li><p>If <var title="">url</var> has a <a href=#url-query title=url-query><query></a> component, then append a
- single U+003F QUESTION MARK character (?) to <var title="">resource
- name</var>, followed by the value of the <a href=#url-query title=url-query><query></a> component.</li> <!-- at
- this point this is UTF-8 encoded and %-escaped -->
+ <li><p>If <var title="">url</var> has a <a href=#url-query title=url-query><query></a> component,
+ then append a single U+003F QUESTION MARK character (?) to <var title="">resource name</var>,
+ followed by the value of the <a href=#url-query title=url-query><query></a> component.</li>
+ <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>Return <var title="">host</var>, <var title="">port</var>,
- <var title="">resource name</var>, and <var title="">secure</var>.</li>
+ <li><p>Return <var title="">host</var>, <var title="">port</var>, <var title="">resource
+ name</var>, and <var title="">secure</var>.</li>
</ol><h4 id=event-definitions-2><span class=secno>10.3.6 </span>Event definitions</h4>
@@ -82715,22 +82655,17 @@
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>
+ <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>
- <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>
+ <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>
- <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.</p>
+ <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.</p>
Modified: source
===================================================================
--- source 2013-02-07 19:40:04 UTC (rev 7703)
+++ source 2013-02-07 19:54:05 UTC (rev 7704)
@@ -17679,12 +17679,12 @@
<dt><span title="element-dfn-dom">DOM interface</span>:</dt><!--TOPIC:DOM APIs-->
<dd>Uses <code>HTMLElement</code>.</dd>
</dl><!--TOPIC:HTML-->
-<!--CLEANUP-->
- <p>The <code>hgroup</code> element <span>represents</span> the heading of a section,
- which consists of all the <code>h1</code>–<code>h6</code> element children of the <code>hgroup</code> element. The element
- is used to group a set of <code>h1</code>–<code>h6</code> elements when the heading has
- multiple levels, such as subheadings, alternative titles, or taglines.</p>
+ <p>The <code>hgroup</code> element <span>represents</span> the heading of a section, which
+ consists of all the <code>h1</code>–<code>h6</code> element children of the
+ <code>hgroup</code> element. The element is used to group a set of
+ <code>h1</code>–<code>h6</code> elements when the heading has multiple levels, such as
+ subheadings, alternative titles, or taglines.</p>
<p>Other elements of <span>heading content</span> in the <code>hgroup</code> element indicate
subheadings or subtitles.</p>
@@ -26800,68 +26800,68 @@
</dd>
</dl><!--TOPIC:HTML-->
- <p>The <code>embed</code> element <span>represents</span> an
- integration point for an external (typically non-HTML) application
- or interactive content.</p>
+ <p>The <code>embed</code> element <span>represents</span> an integration point for an external
+ (typically non-HTML) application or interactive content.</p>
- <p>The <dfn title="attr-embed-src"><code>src</code></dfn> attribute
- gives the address of the resource being embedded. The attribute, if
- present, must contain a <span>valid non-empty URL potentially
- surrounded by spaces</span>.</p>
+ <p>The <dfn title="attr-embed-src"><code>src</code></dfn> attribute gives the address of the
+ resource being embedded. The attribute, if present, must contain a <span>valid non-empty URL
+ potentially surrounded by spaces</span>.</p>
- <p>If the <code title="attr-itemprop">itemprop</code> is specified
- on an <code>embed</code> element, then the <code
- title="attr-embed-src">src</code> attribute must also be
- specified.</p>
+ <p>If the <code title="attr-itemprop">itemprop</code> is specified on an <code>embed</code>
+ element, then the <code title="attr-embed-src">src</code> attribute must also be specified.</p>
- <p>The <dfn title="attr-embed-type"><code>type</code></dfn>
- attribute, if present, gives the <span>MIME type</span> by which the
- plugin to instantiate is selected. The value must be a <span>valid
- MIME type</span>. If both the <code
- title="attr-embed-type">type</code> attribute and the <code
- title="attr-embed-src">src</code> attribute are present, then the
- <code title="attr-embed-type">type</code> attribute must specify the
- same type as the <span title="Content-Type">explicit Content-Type
- metadata</span> of the resource given by the <code
+ <p>The <dfn title="attr-embed-type"><code>type</code></dfn> attribute, if present, gives the
+ <span>MIME type</span> by which the plugin to instantiate is selected. The value must be a
+ <span>valid MIME type</span>. If both the <code title="attr-embed-type">type</code> attribute and
+ the <code title="attr-embed-src">src</code> attribute are present, then the <code
+ title="attr-embed-type">type</code> attribute must specify the same type as the <span
+ title="Content-Type">explicit Content-Type metadata</span> of the resource given by the <code
title="attr-embed-src">src</code> attribute.</p>
<div class="impl">
- <p>When the element is created with neither a <code
- title="attr-embed-src">src</code> attribute nor a <code
- title="attr-embed-type">type</code> attribute, and when attributes
- are removed such that neither attribute is present on the element
- anymore, and when the element has a <span>media element</span>
- ancestor, and when the element has an ancestor <code>object</code>
- element that is <em>not</em> showing its <span>fallback
- content</span>, any plugins instantiated for the element must be
- removed, and the <code>embed</code> element represents nothing.</p>
+ <p>When the element is created with neither a <code title="attr-embed-src">src</code> attribute
+ nor a <code title="attr-embed-type">type</code> attribute, and when attributes are removed such
+ that neither attribute is present on the element anymore, and when the element has a <span>media
+ element</span> ancestor, and when the element has an ancestor <code>object</code> element that is
+ <em>not</em> showing its <span>fallback content</span>, any plugins instantiated for the element
+ must be removed, and the <code>embed</code> element represents nothing.</p>
- <p>An <code>embed</code> element is said to be <dfn
- title="concept-embed-active">potentially active</dfn> when the
- following conditions are all met simultaneously:</p>
+ <p>An <code>embed</code> element is said to be <dfn title="concept-embed-active">potentially
+ active</dfn> when the following conditions are all met simultaneously:</p>
<ul class="brief">
- <li>The element is <span title="in a document">in a <code>Document</code></span> or was <span title="in a document">in a <code>Document</code></span> the last time the <span>event loop</span> reached step 1.</li>
+
+ <li>The element is <span title="in a document">in a <code>Document</code></span> or was <span
+ title="in a document">in a <code>Document</code></span> the last time the <span>event loop</span>
+ reached step 1.</li>
+
<li>The element's <code>Document</code> is <span>fully active</span>.</li>
- <li>The element has either a <code title="attr-embed-src">src</code> attribute set or a <code title="attr-embed-type">type</code> attribute set (or both).</li>
- <li>The element's <code title="attr-embed-src">src</code> attribute is either absent or its value is not the empty string.</li>
+
+ <li>The element has either a <code title="attr-embed-src">src</code> attribute set or a <code
+ title="attr-embed-type">type</code> attribute set (or both).</li>
+
+ <li>The element's <code title="attr-embed-src">src</code> attribute is either absent or its value
+ is not the empty string.</li>
+
<li>The element is not a descendant of a <span>media element</span>.</li>
- <li>The element is not a descendant of an <code>object</code> element that is not showing its <span>fallback content</span>.</li>
- <li>The element is <span>being rendered</span>, or was <span>being rendered</span> the last time the <span>event loop</span> reached step 1.</li>
+
+ <li>The element is not a descendant of an <code>object</code> element that is not showing its
+ <span>fallback content</span>.</li>
+
+ <li>The element is <span>being rendered</span>, or was <span>being rendered</span> the last time
+ the <span>event loop</span> reached step 1.</li>
+
</ul>
-<!--CLEANUP-->
<p>Whenever an <code>embed</code> element that was not <span
title="concept-embed-active">potentially active</span> becomes <span
- title="concept-embed-active">potentially active</span>, and whenever
- a <span title="concept-embed-active">potentially active</span>
- <code>embed</code> element that is remaining <span
- title="concept-embed-active">potentially active</span> and has its
- <code title="attr-embed-type">src</code> attribute set, changed, or
- removed or its <code title="attr-embed-type">type</code> attribute
- set, changed, or removed, the user agent must <span>queue a task</span>
- using the <dfn>embed task source</dfn> to run the following steps:</p>
+ title="concept-embed-active">potentially active</span>, and whenever a <span
+ title="concept-embed-active">potentially active</span> <code>embed</code> element that is
+ remaining <span title="concept-embed-active">potentially active</span> and has its <code
+ title="attr-embed-type">src</code> attribute set, changed, or removed or its <code
+ title="attr-embed-type">type</code> attribute set, changed, or removed, the user agent must
+ <span>queue a task</span> using the <dfn>embed task source</dfn> to run the following steps:</p>
<ol>
@@ -26870,51 +26870,42 @@
<li>
- <dl class="switch">
+ <dl class="switch">
- <dt>If the element has a <code title="attr-embed-src">src</code>
- attribute set</dt>
+ <dt>If the element has a <code title="attr-embed-src">src</code> attribute set</dt>
- <dd>
+ <dd>
- <p>The user agent must <span title="resolve a url">resolve</span>
- the value of the element's <code title="attr-embed-src">src</code>
- attribute, relative to the element. If that is successful, the
- user agent should <span>fetch</span><!--FETCH--> the resulting
- <span>absolute URL</span>, from the element's <span>browsing
- context scope origin</span> if it has one<!-- potentially
- http-origin privacy sensitive -->. The <span
- title="concept-task">task</span> that is <span title="queue a
- task">queued</span> by the <span>networking task source</span>
- once the resource has been <span title="fetch">fetched</span> must
- find and instantiate an appropriate <span>plugin</span> based on
- the <span title="concept-embed-type">content's type</span>, and
- hand that <span>plugin</span> the content of the resource,
- replacing any previously instantiated plugin for the element.</p>
- <!-- Note that this doesn't happen when the base URL changes. -->
+ <p>The user agent must <span title="resolve a url">resolve</span> the value of the element's
+ <code title="attr-embed-src">src</code> attribute, relative to the element. If that is
+ successful, the user agent should <span>fetch</span><!--FETCH--> the resulting <span>absolute
+ URL</span>, from the element's <span>browsing context scope origin</span> if it has one<!--
+ potentially http-origin privacy sensitive -->. The <span title="concept-task">task</span> that
+ is <span title="queue a task">queued</span> by the <span>networking task source</span> once
+ the resource has been <span title="fetch">fetched</span> must find and instantiate an
+ appropriate <span>plugin</span> based on the <span title="concept-embed-type">content's
+ type</span>, and hand that <span>plugin</span> the content of the resource, replacing any
+ previously instantiated plugin for the element.</p>
+ <!-- Note that this doesn't happen when the base URL changes. -->
- <p>Fetching the resource must <span>delay the load event</span> of
- the element's document.</p>
- <!-- if we add load/error events, then replace the previous
- paragraph with the text one: -->
- <!-- similar text in various places -->
- <!--<p>Fetching the resource must <span>delay the load
- event</span> of the element's document until the final <span
- title="concept-task">task</span> that is <span title="queue a
- task">queued</span> by the <span>networking task source</span>
- once the resource has been <span title="fetch">fetched</span> has
- been run.</p>-->
+ <p>Fetching the resource must <span>delay the load event</span> of the element's document.</p>
+ <!-- if we add load/error events, then replace the previous paragraph with the text one: -->
+ <!-- similar text in various places -->
+ <!--<p>Fetching the resource must <span>delay the load event</span> of the element's document
+ until the final <span title="concept-task">task</span> that is <span title="queue a
+ task">queued</span> by the <span>networking task source</span> once the resource has been
+ <span title="fetch">fetched</span> has been run.</p>-->
- </dd>
+ </dd>
- <dt>If the element has no <code title="attr-embed-src">src</code> attribute set</dt>
+ <dt>If the element has no <code title="attr-embed-src">src</code> attribute set</dt>
- <dd><p>The user agent should find and instantiate an appropriate <span>plugin</span> based on the
- value of the <code title="attr-embed-type">type</code> attribute.</p>
+ <dd><p>The user agent should find and instantiate an appropriate <span>plugin</span> based on
+ the value of the <code title="attr-embed-type">type</code> attribute.</p>
- </dl>
+ </dl>
- </li>
+ </li>
</ol>
@@ -27036,8 +27027,8 @@
<p>If the user does not have the plugin (for example if the plugin vendor doesn't support the
user's platform), then the user will be unable to use the resource.</p>
- <p>To pass the plugin a parameter "quality" with the value "high",
- an attribute can be specified:</p>
+ <p>To pass the plugin a parameter "quality" with the value "high", an attribute can be
+ specified:</p>
<pre><embed src="catgame.swf" quality="high"></pre>
@@ -93083,10 +93074,10 @@
shutting down unexpectedly.</p></li>
-->
- <li><p>If there are any <span title="concept-task">tasks</span> queued in the <code>WorkerGlobalScope</code> object's <span>event <!--CLEANUP-->
- loop</span>'s <span title="task queue">task queues</span><!-- v2-onclose other than the <code
- title="event-worker-close">close</code> event that this algorithm just added-->, discard them
- without processing them.</p></li>
+ <li><p>If there are any <span title="concept-task">tasks</span> queued in the
+ <code>WorkerGlobalScope</code> object's <span>event loop</span>'s <span title="task queue">task
+ queues</span><!-- v2-onclose other than the <code title="event-worker-close">close</code> event
+ that this algorithm just added-->, discard them without processing them.</p></li>
<!-- v2-onclose
<li><p>If the <code title="event-worker-close">close</code> event that this algorithm just queued
@@ -93117,9 +93108,9 @@
<li><p>Set the worker's <code>WorkerGlobalScope</code> object's <span
title="dom-WorkerGlobalScope-closing">closing</span> flag to true.</p></li>
- <li><p>If there are any <span title="concept-task">tasks</span> queued in the <code>WorkerGlobalScope</code> object's <span>event <!--CLEANUP-->
- loop</span>'s <span title="task queue">task queues</span>, discard them without processing
- them.</p></li>
+ <li><p>If there are any <span title="concept-task">tasks</span> queued in the
+ <code>WorkerGlobalScope</code> object's <span>event loop</span>'s <span title="task queue">task
+ queues</span>, discard them without processing them.</p></li>
<li><p>Abort the script currently running in the worker.</p></li>
@@ -95199,140 +95190,113 @@
void <span title="dom-WebSocket-send">send</span>(<span>ArrayBufferView</span> data);
};</pre>
- <p>The <dfn 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
- 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
- omitted, it is equivalent to the empty array. Each string in the
- array is a subprotocol name. The connection will only be established
- if the server reports that it has selected one of these
- subprotocols. The subprotocol names must all be strings that match
- the requirements for elements that comprise the value of <code
- title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification. <a
- href="#refsWSP">[WSP]</a></p>
+ <p>The <dfn 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 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 omitted, it is
+ equivalent to the empty array. Each string in the array is a subprotocol name. The connection will
+ only be established if the server reports that it has selected one of these subprotocols. The
+ subprotocol names must all be strings that match the requirements for elements that comprise the
+ value of <code title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code> header fields as
+ defined by the WebSocket protocol specification. <a href="#refsWSP">[WSP]</a></p>
- <p>When the <code>WebSocket()</code> constructor is invoked, the UA
- must run these steps:</p>
+ <p>When the <code>WebSocket()</code> constructor is invoked, the UA must run these steps:</p>
<ol>
- <li><p><i>Parse a WebSocket URL's components</i> from the <var
- title="">url</var> argument, to obtain <var title="">host</var>,
- <var title="">port</var>, <var title="">resource name</var>, and
- <var title="">secure</var>. If this fails, throw a
- <code>SyntaxError</code> exception and abort these steps. <a
- href="#refsWSP">[WSP]</a></p></li>
+ <li><p><i>Parse a WebSocket URL's components</i> from the <var title="">url</var> argument, to
+ obtain <var title="">host</var>, <var title="">port</var>, <var title="">resource name</var>, and
+ <var title="">secure</var>. If this fails, throw a <code>SyntaxError</code> exception and abort
+ these steps. <a href="#refsWSP">[WSP]</a></p></li>
- <li><p>If <var title="">secure</var> is false but the
- <span>origin</span> of the <span>entry script</span> has a scheme
- component that is itself a secure protocol, e.g. HTTPS, then throw
- a <code>SecurityError</code> exception.</p></li>
+ <li><p>If <var title="">secure</var> is false but the <span>origin</span> of the <span>entry
+ script</span> has a scheme component that is itself a secure protocol, e.g. HTTPS, then throw a
+ <code>SecurityError</code> exception.</p></li>
<li>
- <p>If <var title="">port</var> is a port to which the user agent
- is configured to block access, then throw a
- <code>SecurityError</code> exception. (User agents typically block
- access to well-known ports like SMTP.)</p>
-
+ <p>If <var title="">port</var> is a port to which the user agent is configured to block access,
+ then throw a <code>SecurityError</code> exception. (User agents typically block access to
+ well-known ports like SMTP.)</p>
<!-- e.g. http://www.mozilla.org/projects/netlib/PortBanning.html -->
- <p>Access to ports 80 and 443 should not be blocked, including the
- unlikely cases when <var title="">secure</var> is false but <var
- title="">port</var> is 443 or <var title="">secure</var> is true
- but <var title="">port</var> is 80.</p>
+ <p>Access to ports 80 and 443 should not be blocked, including the unlikely cases when <var
+ title="">secure</var> is false but <var title="">port</var> is 443 or <var title="">secure</var>
+ is true but <var title="">port</var> is 80.</p>
<!-- paragraph requested by zcorpan -->
</li>
<li>
- <p>If <var title="">protocols</var> is absent, let <var
- title="">protocols</var> be an empty array.</p>
+ <p>If <var title="">protocols</var> is absent, let <var title="">protocols</var> be an empty
+ array.</p>
- <p>Otherwise, if <var title="">protocols</var> is present and a
- string, let <var title="">protocols</var> instead be an array
- consisting of just that string.</p>
+ <p>Otherwise, if <var title="">protocols</var> is present and a string, let <var
+ title="">protocols</var> instead be an array consisting of just that string.</p>
</li>
- <li><p>If any of the values in <var title="">protocols</var> occur
- more than once or otherwise fail to match the requirements for
- elements that comprise the value of <code
- title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code>
- header fields as defined by the WebSocket protocol specification,
- then throw a <code>SyntaxError</code> exception and abort these
+ <li><p>If any of the values in <var title="">protocols</var> occur more than once or otherwise
+ fail to match the requirements for elements that comprise the value of <code
+ title="http-sec-websocket-protocol">Sec-WebSocket-Protocol</code> header fields as defined by the
+ WebSocket protocol specification, then throw a <code>SyntaxError</code> exception and abort these
steps. <a href="#refsWSP">[WSP]</a></p></li>
- <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>.</p></li>
+ <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>.</p></li>
- <li><p>Return a new <code>WebSocket</code> object, and continue
- these steps in the background (without blocking scripts).</p></li>
+ <li><p>Return a new <code>WebSocket</code> object, and continue these steps in the background
+ (without blocking scripts).</p></li>
<li>
- <p><i>Establish a WebSocket connection</i> given the set (<var
- title="">host</var>, <var title="">port</var>, <var
- title="">resource name</var>, <var title="">secure</var>), along
- with the <var title="">protocols</var> list, an empty list for the
- extensions, and <var title="">origin</var>. The <i>headers to send
- appropriate cookies</i> must be a <code
- title="http-Cookie">Cookie</code> header whose value is the
- <i>cookie-string</i> computed from the user's cookie store and the
- URL <var title="">url</var>; for these purposes this is
+ <p><i>Establish a WebSocket connection</i> given the set (<var title="">host</var>, <var
+ title="">port</var>, <var title="">resource name</var>, <var title="">secure</var>), along with
+ the <var title="">protocols</var> list, an empty list for the extensions, and <var
+ title="">origin</var>. The <i>headers to send appropriate cookies</i> must be a <code
+ title="http-Cookie">Cookie</code> header whose value is the <i>cookie-string</i> computed from
+ the user's cookie store and the URL <var title="">url</var>; for these purposes this is
<em>not</em> a "non-HTTP" API. <a href="#refsWSP">[WSP]</a> <a
href="#refsCOOKIES">[COOKIES]</a></p>
- <p>When the user agent <i title="validate the server's
- response">validates the server's response</i> during the
- "<i>establish a WebSocket connection</i>" algorithm, if the status
- code received from the server is not 101 (e.g. it is a redirect),
- the user agent must <i>fail the WebSocket connection</i>.</p>
+ <p>When the user agent <i title="validate the server's response">validates the server's
+ response</i> during the "<i>establish a WebSocket connection</i>" algorithm, if the status code
+ received from the server is not 101 (e.g. it is a redirect), the user agent must <i>fail the
+ WebSocket connection</i>.</p>
- <p class="warning">Following HTTP procedures here could introduce
- serious security problems in a Web browser context. For example,
- consider a host with a WebSocket server at one path and an open
- HTTP redirector at another. Suddenly, any script that can be given
- a particular WebSocket URL can be tricked into communicating to
- (and potentially sharing secrets with) any host on the Internet,
- even if the script checks that the URL has the right hostname.</p>
+ <p class="warning">Following HTTP procedures here could introduce serious security problems in a
+ Web browser context. For example, consider a host with a WebSocket server at one path and an
+ open HTTP redirector at another. Suddenly, any script that can be given a particular WebSocket
+ URL can be tricked into communicating to (and potentially sharing secrets with) any host on the
+ Internet, even if the script checks that the URL has the right hostname.</p>
<!-- http://www.ietf.org/mail-archive/web/hybi/current/msg06951.html -->
- <p class="note">If the <i>establish a WebSocket connection</i>
- algorithm fails, it triggers the <i>fail the WebSocket
- connection</i> algorithm, which then invokes the <i>close the
- WebSocket connection</i> algorithm, which then establishes that
- <i>the WebSocket connection is closed</i>, which fires the <code
- title="event-socket-close">close</code> event <a
- href="#closeWebSocket">as described below</a>.</p>
+ <p class="note">If the <i>establish a WebSocket connection</i> algorithm fails, it triggers the
+ <i>fail the WebSocket connection</i> algorithm, which then invokes the <i>close the WebSocket
+ connection</i> algorithm, which then establishes that <i>the WebSocket connection is closed</i>,
+ which fires the <code title="event-socket-close">close</code> event <a href="#closeWebSocket">as
+ described below</a>.</p>
</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
- implementing the <code>WorkerGlobalScope</code> interface.</p>
+ <p>This constructor must be visible when the <span>script's global object</span> is either a
+ <code>Window</code> object or an object implementing the <code>WorkerGlobalScope</code>
+ interface.</p>
<hr>
- <p>The <dfn 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
- constructor. (It doesn't matter what it is resolved relative to,
- since we already know it is an <span>absolute URL</span>.)</p>
+ <p>The <dfn 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
+ constructor. (It doesn't matter what it is resolved relative to, since we already know it is an
+ <span>absolute URL</span>.)</p>
- <p>The <dfn
- title="dom-WebSocket-readyState"><code>readyState</code></dfn>
- attribute represents the state of the connection. It can have the
- following values:</p>
+ <p>The <dfn title="dom-WebSocket-readyState"><code>readyState</code></dfn> attribute represents
+ the state of the connection. It can have the following values:</p>
<dl>
@@ -95346,7 +95310,8 @@
<dt><dfn title="dom-WebSocket-CLOSING"><code>CLOSING</code></dfn> (numeric value 2)</dt>
- <dd>The connection is going through the closing handshake, or the <code title="dom-WebSocket-close">close()</code> method has been invoked.</dd>
+ <dd>The connection is going through the closing handshake, or the <code
+ title="dom-WebSocket-close">close()</code> method has been invoked.</dd>
<dt><dfn title="dom-WebSocket-CLOSED"><code>CLOSED</code></dfn> (numeric value 3)</dt>
@@ -95354,65 +95319,52 @@
</dl>
- <p>When the object is created its <code
- title="dom-WebSocket-readyState">readyState</code> must be set to
- <code title="dom-WebSocket-CONNECTING">CONNECTING</code> (0).</p>
+ <p>When the object is created its <code title="dom-WebSocket-readyState">readyState</code> must be
+ set to <code title="dom-WebSocket-CONNECTING">CONNECTING</code> (0).</p>
- <p>The <dfn
- title="dom-WebSocket-extensions"><code>extensions</code></dfn>
- attribute must initially return the empty string. After <i>the
- WebSocket connection is established</i>, its value might change, as
- defined below.</p>
+ <p>The <dfn title="dom-WebSocket-extensions"><code>extensions</code></dfn> attribute must
+ initially return the empty string. After <i>the WebSocket connection is established</i>, its value
+ might change, as defined below.</p>
- <p class="note">The <code
- title="dom-WebSocket-extensions">extensions</code> attribute returns
- the extensions selected by the server, if any. (Currently this will
- only ever be the empty string.)</p>
+ <p class="note">The <code title="dom-WebSocket-extensions">extensions</code> attribute returns the
+ extensions selected by the server, if any. (Currently this will only ever be the empty
+ string.)</p>
- <p>The <dfn
- title="dom-WebSocket-protocol"><code>protocol</code></dfn> attribute
- must initially return the empty string. After <i>the WebSocket
- connection is established</i>, its value might change, as defined
- below.</p>
+ <p>The <dfn title="dom-WebSocket-protocol"><code>protocol</code></dfn> attribute must initially
+ return the empty string. After <i>the WebSocket connection is established</i>, its value might
+ change, as defined below.</p>
- <p class="note">The <code
- title="dom-WebSocket-protocol">protocol</code> attribute returns the
- subprotocol selected by the server, if any. It can be used in
- conjunction with the array form of the constructor's second argument
- to perform subprotocol negotiation.</p>
+ <p class="note">The <code title="dom-WebSocket-protocol">protocol</code> attribute returns the
+ subprotocol selected by the server, if any. It can be used in conjunction with the array form of
+ the constructor's second argument to perform subprotocol negotiation.</p>
- <p>The <dfn title="dom-WebSocket-close"><code>close()</code></dfn>
- method must run the following steps:</p>
+ <p>The <dfn title="dom-WebSocket-close"><code>close()</code></dfn> method must run the following
+ steps:</p>
-<!--CLEANUP-->
<ol>
- <li><p>If the method's first argument is present but is neither an
- integer equal to 1000 nor an integer in the range 3000 to 4999, throw an
- <code>InvalidAccessError</code> exception and abort these
- steps.</p></li>
+ <li><p>If the method's first argument is present but is neither an integer equal to 1000 nor an
+ integer in the range 3000 to 4999, throw an <code>InvalidAccessError</code> exception and abort
+ these steps.</p></li>
<li>
- <p>If the method's second argument is present, then run these
- substeps:</p>
+ <p>If the method's second argument is present, then run these substeps:</p>
<ol>
- <li><p>Let <var title="">raw reason</var> be the method's second
- argument.</p></li>
+ <li><p>Let <var title="">raw reason</var> be the method's second argument.</p></li>
- <li><p>Let <var title="">Unicode reason</var> be the result of
- <span title="convert a DOMString to a sequence of Unicode
- characters">converting <var title="">raw reason</var> to a
- sequence of Unicode characters</span>.</p></li>
+ <li><p>Let <var title="">Unicode reason</var> be the result of <span title="convert a DOMString
+ to a sequence of Unicode characters">converting <var title="">raw reason</var> to a sequence of
+ Unicode characters</span>.</p></li>
- <li><p>Let <var title="">reason</var> be the result of encoding
- <var title="">Unicode reason</var> as UTF-8.</p></li>
+ <li><p>Let <var title="">reason</var> be the result of encoding <var title="">Unicode
+ reason</var> as UTF-8.</p></li>
- <li><p>If <var title="">reason</var> is longer than 123 bytes,
- then throw a <code>SyntaxError</code> exception and abort these
- steps. <a href="#refsRFC3629">[RFC3629]</a></p></li>
+ <li><p>If <var title="">reason</var> is longer than 123 bytes, then throw a
+ <code>SyntaxError</code> exception and abort these steps. <a
+ href="#refsRFC3629">[RFC3629]</a></p></li>
</ol>
@@ -95422,8 +95374,7 @@
<dl class="switch">
- <dt>If the <code title="dom-WebSocket-readyState">readyState</code>
- attribute is in the <code
+ <dt>If the <code title="dom-WebSocket-readyState">readyState</code> attribute is in the <code
title="dom-WebSocket-CLOSING">CLOSING</code> (2) or <code
title="dom-WebSocket-CLOSED">CLOSED</code> (3) state</dt>
@@ -95431,64 +95382,52 @@
<p>Do nothing.</p>
- <p class="note">The connection is already closing or is already
- closed. If it has not already, a <code
- title="event-socket-close">close</code> event will eventually fire <a
+ <p class="note">The connection is already closing or is already closed. If it has not already,
+ a <code title="event-socket-close">close</code> event will eventually fire <a
href="#closeWebSocket">as described below</a>.</p>
</dd>
- <dt>If the WebSocket connection is not yet <i title="the
- WebSocket connection is established">established</i> <a
- href="#refsWSP">[WSP]</a></dt>
+ <dt>If the WebSocket connection is not yet <i title="the WebSocket connection is
+ established">established</i> <a href="#refsWSP">[WSP]</a></dt>
<dd>
<p><i>Fail the WebSocket connection</i> and set the <code
- title="dom-WebSocket-readyState">readyState</code> attribute's
- value to <code title="dom-WebSocket-CLOSING">CLOSING</code> (2).
- <a href="#refsWSP">[WSP]</a></p>
+ title="dom-WebSocket-readyState">readyState</code> attribute's value to <code
+ title="dom-WebSocket-CLOSING">CLOSING</code> (2). <a href="#refsWSP">[WSP]</a></p>
- <p class="note">The <i>fail the WebSocket connection</i>
- algorithm invokes the <i>close the WebSocket
- connection</i> algorithm, which then establishes that
- <i>the WebSocket connection is closed</i>, which fires the
- <code title="event-socket-close">close</code> event <a
+ <p class="note">The <i>fail the WebSocket connection</i> algorithm invokes the <i>close the
+ WebSocket connection</i> algorithm, which then establishes that <i>the WebSocket connection is
+ closed</i>, which fires the <code title="event-socket-close">close</code> event <a
href="#closeWebSocket">as described below</a>.</p>
</dd>
- <dt>If the WebSocket closing handshake has not yet been <i
- title="the WebSocket closing handshake is
- started">started</i> <a href="#refsWSP">[WSP]</a></dt>
+ <dt>If the WebSocket closing handshake has not yet been <i title="the WebSocket closing
+ handshake is started">started</i> <a href="#refsWSP">[WSP]</a></dt>
<dd>
- <p><i>Start the WebSocket closing handshake</i> and set the
- <code title="dom-WebSocket-readyState">readyState</code>
- attribute's value to <code
- title="dom-WebSocket-CLOSING">CLOSING</code> (2). <a
- href="#refsWSP">[WSP]</a></p>
+ <p><i>Start the WebSocket closing handshake</i> and set the <code
+ title="dom-WebSocket-readyState">readyState</code> attribute's value to <code
+ title="dom-WebSocket-CLOSING">CLOSING</code> (2). <a href="#refsWSP">[WSP]</a></p>
- <p>If the first argument is present, then the status
- code<!--CLOSE CODE--> to use in the WebSocket Close message must
- be the integer given by the first argument. <a
+ <p>If the first argument is present, then the status code<!--CLOSE CODE--> to use in the
+ WebSocket Close message must be the integer given by the first argument. <a
href="#refsWSP">[WSP]</a></p>
- <p>If the second argument is also present, then <var
- title="">reason</var> must be provided in the Close message
- after the status code<!--CLOSE CODE-->. <a
- href="#refsRFC3629">[RFC3629]</a> <a
- href="#refsWSP">[WSP]</a></p>
+ <p>If the second argument is also present, then <var title="">reason</var> must be provided in
+ the Close message after the status code<!--CLOSE CODE-->. <a href="#refsRFC3629">[RFC3629]</a>
+ <a href="#refsWSP">[WSP]</a></p>
- <p class="note">The <i>start the WebSocket closing handshake</i>
- algorithm eventually invokes the <i>close the WebSocket
- connection</i> algorithm, which then establishes that <i>the
+ <p class="note">The <i>start the WebSocket closing handshake</i> algorithm eventually invokes
+ the <i>close the WebSocket connection</i> algorithm, which then establishes that <i>the
WebSocket connection is closed</i>, which fires the <code
- title="event-socket-close">close</code> event <a
- href="#closeWebSocket">as described below</a>.</p>
+ title="event-socket-close">close</code> event <a href="#closeWebSocket">as described
+ below</a>.</p>
</dd>
@@ -95497,17 +95436,13 @@
<dd>
- <p>Set the <code
- title="dom-WebSocket-readyState">readyState</code> attribute's
- value to <code title="dom-WebSocket-CLOSING">CLOSING</code>
- (2).</p>
+ <p>Set the <code title="dom-WebSocket-readyState">readyState</code> attribute's value to <code
+ title="dom-WebSocket-CLOSING">CLOSING</code> (2).</p>
- <p class="note"><i>The WebSocket closing handshake is
- started</i>, and will eventually invoke the <i>close the
- WebSocket connection</i> algorithm, which will establish that
- <i>the WebSocket connection is closed</i>, and thus the <code
- title="event-socket-close">close</code> event will fire, <a
- href="#closeWebSocket">as described below</a>.</p>
+ <p class="note"><i>The WebSocket closing handshake is started</i>, and will eventually invoke
+ the <i>close the WebSocket connection</i> algorithm, which will establish that <i>the
+ WebSocket connection is closed</i>, and thus the <code title="event-socket-close">close</code>
+ event will fire, <a href="#closeWebSocket">as described below</a>.</p>
</dd>
@@ -95889,100 +95824,81 @@
<h4>Ping and Pong frames</h4>
- <p>The WebSocket protocol specification defines Ping and Pong frames
- that can be used for keep-alive, heart-beats, network status
- probing, latency instrumentation, and so forth. These are not
- currently exposed in the API.</p>
+ <p>The WebSocket protocol specification defines Ping and Pong frames that can be used for
+ keep-alive, heart-beats, network status probing, latency instrumentation, and so forth. These are
+ not currently exposed in the API.</p>
- <p>User agents may send ping and unsolicited pong frames as desired,
- for example in an attempt to maintain local network NAT mappings, to
- detect failed connections, or to display latency metrics to the
- user. User agents must not use pings or unsolicited pongs to aid the
- server; it is assumed that servers will solicit pongs whenever
- appropriate for the server's needs.</p>
+ <p>User agents may send ping and unsolicited pong frames as desired, for example in an attempt to
+ maintain local network NAT mappings, to detect failed connections, or to display latency metrics
+ to the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed
+ that servers will solicit pongs whenever appropriate for the server's needs.</p>
- <!-- v2: we'll probably add a way to make the client send pings and
- automatically terminate the connection if they don't get a pong
- within an author-provided timeout; see
+ <!-- v2: we'll probably add a way to make the client send pings and automatically terminate the
+ connection if they don't get a pong within an author-provided timeout; see
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17264 -->
<h4>Parsing WebSocket URLs</h4>
- <p>The steps to <dfn>parse a WebSocket URL's components</dfn> from
- a string <var title="">url</var> are as follows. These steps return
- either a <var title="">host</var>, a <var title="">port</var>, a
- <var title="">resource name</var>, and a <var title="">secure</var>
- flag, or they fail.</p>
+ <p>The steps to <dfn>parse a WebSocket URL's components</dfn> from a string <var
+ title="">url</var> are as follows. These steps return either a <var title="">host</var>, a <var
+ title="">port</var>, a <var title="">resource name</var>, and a <var title="">secure</var> 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.</p></li>
+ <li><p>If the <var title="">url</var> string is not an <span>absolute URL</span>, then fail this
+ algorithm.</p></li>
<li>
- <p><span title="resolve a url">Resolve</span> the <var
- title="">url</var> string, with the URL character encoding set to
- UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p> <!-- the URL
- character encoding is used to escape the query component -->
+ <p><span title="resolve a url">Resolve</span> the <var title="">url</var> string, with the URL
+ character encoding set to UTF-8. <a href="#refsRFC3629">[RFC3629]</a></p> <!-- the URL character
+ encoding is used to escape the query component -->
- <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
- point.</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 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
- algorithm.</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 algorithm.</p></li>
- <li><p>If <var title="">url</var> has a <span
- title="url-fragment"><fragment></span> component, then fail
- this algorithm.</p></li>
+ <li><p>If <var title="">url</var> has a <span title="url-fragment"><fragment></span>
+ component, then fail this algorithm.</p></li>
- <li><p>If the <span title="url-scheme"><scheme></span>
- component of <var title="">url</var> is "<code title="">ws</code>",
- 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.</p></li>
+ <li><p>If the <span title="url-scheme"><scheme></span> component of <var title="">url</var>
+ is "<code title="">ws</code>", 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.</p></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>.</p></li> <!-- at this point this is
- Punycode-encoded already -->
+ title="url-host"><host></span> component of <var title="">url</var>, <span>converted to
+ ASCII lowercase</span>.</p></li> <!-- at this point this is Punycode-encoded already -->
- <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>.</p></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>.</p></li>
- <li><p>If there is no explicit <var title="">port</var>, then: if
- <var title="">secure</var> is false, let <var title="">port</var>
- be 80, otherwise let <var title="">port</var> be 443.</p></li>
+ <li><p>If there is no explicit <var title="">port</var>, then: if <var title="">secure</var> is
+ false, let <var title="">port</var> be 80, otherwise let <var title="">port</var> be
+ 443.</p></li>
- <li><p>Let <var title="">resource name</var> be the value of the
- <span title="url-path"><path></span> component (which might
- be empty) of <var title="">url</var>.</p></li> <!-- at this point
- this is UTF-8 encoded and %-escaped -->
+ <li><p>Let <var title="">resource name</var> be the value of the <span
+ title="url-path"><path></span> component (which might be empty) of <var
+ title="">url</var>.</p></li> <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>If <var title="">resource name</var> is the empty string,
- set it to a single character U+002F SOLIDUS (/).</p></li>
+ <li><p>If <var title="">resource name</var> is the empty string, set it to a single character
+ U+002F SOLIDUS (/).</p></li>
- <li><p>If <var title="">url</var> has a <span
- title="url-query"><query></span> component, then append a
- single U+003F QUESTION MARK character (?) to <var title="">resource
- name</var>, followed by the value of the <span
- title="url-query"><query></span> component.</p></li> <!-- at
- this point this is UTF-8 encoded and %-escaped -->
+ <li><p>If <var title="">url</var> has a <span title="url-query"><query></span> component,
+ then append a single U+003F QUESTION MARK character (?) to <var title="">resource name</var>,
+ followed by the value of the <span title="url-query"><query></span> component.</p></li>
+ <!-- at this point this is UTF-8 encoded and %-escaped -->
- <li><p>Return <var title="">host</var>, <var title="">port</var>,
- <var title="">resource name</var>, and <var
- title="">secure</var>.</p></li>
+ <li><p>Return <var title="">host</var>, <var title="">port</var>, <var title="">resource
+ name</var>, and <var title="">secure</var>.</p></li>
</ol>
@@ -96002,23 +95918,17 @@
DOMString reason;
};</pre>
- <p>The <dfn
- 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>
+ <p>The <dfn 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>
- <p>The <dfn 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>
+ <p>The <dfn 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>
- <p>The <dfn 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.</p>
+ <p>The <dfn 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.</p>
More information about the Commit-Watchers
mailing list