/[suikacvs]/markup/html/html5/spec-ja/non-normative.ja.html.u8
Suika

Diff of /markup/html/html5/spec-ja/non-normative.ja.html.u8

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.232 by wakaba, Wed Jan 7 06:17:49 2009 UTC revision 1.233 by wakaba, Fri Jan 9 06:18:24 2009 UTC
# Line 26  Line 26 
26     <p class="has-ja-translation" data-ja-hash="7c0cfd95ed2e5f66067c25a5e7fec67c"><span class=en-original lang=en><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></span><span class=ja-translation lang=ja><a class=logo href=http://www.whatwg.org/ rel=home><img lang=en alt=WHATWG     <p class="has-ja-translation" data-ja-hash="7c0cfd95ed2e5f66067c25a5e7fec67c"><span class=en-original lang=en><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></span><span class=ja-translation lang=ja><a class=logo href=http://www.whatwg.org/ rel=home><img lang=en alt=WHATWG
27      src=http://www.whatwg.org/images/logo></a></span></p>      src=http://www.whatwg.org/images/logo></a></span></p>
28     <h1 class="no-ja-translation" data-ja-hash="ae73ff2caf8dff06b50e38ff38ef8a49"><span class=en-original lang=en>HTML 5</span></h1>     <h1 class="no-ja-translation" data-ja-hash="ae73ff2caf8dff06b50e38ff38ef8a49"><span class=en-original lang=en>HTML 5</span></h1>
29     <h2 class="no-num no-toc has-ja-translation" data-ja-hash="8a7847394b9b718bd84c2d29d478640c" data-ja-real-hash="b2b8cbea7394a99a33a2c4cc5b8955a0" id=draft-recommendation-&mdash;-date:-01-jan-1901><span class=en-original lang=en>Draft Recommendation &mdash; 6 January 2009</span><span class=ja-translation lang=ja>勧告案<ins class=ja-note>の非公式和訳</ins> &mdash;     <h2 class="no-num no-toc has-ja-translation" data-ja-hash="8a7847394b9b718bd84c2d29d478640c" data-ja-real-hash="4c1545b16078a9ebd14acbf03ad390a8" id=draft-recommendation-&mdash;-date:-01-jan-1901><span class=en-original lang=en>Draft Recommendation &mdash; 9 January 2009</span><span class=ja-translation lang=ja>勧告案<ins class=ja-note>の非公式和訳</ins> &mdash;
30  <ins class=ja-note>(原文出版日)</ins> 6 January 2009</span></h2>  <ins class=ja-note>(原文出版日)</ins> 9 January 2009</span></h2>
31     <p class="has-ja-translation" data-ja-hash="5211c3fce4ddd8160d21446a73a092c1"><span class=en-original lang=en>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></span><span class=ja-translation lang=ja>みなさんにも作業にご参加いただけます。 <a     <p class="has-ja-translation" data-ja-hash="5211c3fce4ddd8160d21446a73a092c1"><span class=en-original lang=en>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></span><span class=ja-translation lang=ja>みなさんにも作業にご参加いただけます。 <a
32      href=http://www.whatwg.org/mailing-list>作業部会の議論用メイリング・リストに参加してください。</a></span></p>      href=http://www.whatwg.org/mailing-list>作業部会の議論用メイリング・リストに参加してください。</a></span></p>
33     <p class="has-ja-translation" data-ja-hash="f8e7b0fcec0268c81579638290279e82"><span class=en-original lang=en><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</span><span class=ja-translation lang=ja><strong>Web デザイナーのみなさん!</strong> みなさんのための <a     <p class="has-ja-translation" data-ja-hash="f8e7b0fcec0268c81579638290279e82"><span class=en-original lang=en><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</span><span class=ja-translation lang=ja><strong>Web デザイナーのみなさん!</strong> みなさんのための <a
# Line 917  HTML やそれに関係する API を拡 Line 917  HTML やそれに関係する API を拡
917     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="af8430e446e56b3852685783ce5684a0"><span class=en-original lang=en><a href=#network><span class=secno>7.3 </span>Web sockets</a>     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="af8430e446e56b3852685783ce5684a0"><span class=en-original lang=en><a href=#network><span class=secno>7.3 </span>Web sockets</a>
918      </span><ol>      </span><ol>
919       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="c1b0d37e40c34e5ac144a7dbee900f5f"><span class=en-original lang=en><a href=#network-intro><span class=secno>7.3.1 </span>Introduction</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="c1b0d37e40c34e5ac144a7dbee900f5f"><span class=en-original lang=en><a href=#network-intro><span class=secno>7.3.1 </span>Introduction</a></span></li>
920       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="a76728e00ce09e7380ae1385e2f1d123"><span class=en-original lang=en><a href=#the-websocket-interface><span class=secno>7.3.2 </span>The <code>WebSocket</code> interface</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="6861f26273e4580a48126d4de7399440"><span class=en-original lang=en><a href=#network-idl><span class=secno>7.3.2 </span>The <code>WebSocket</code> interface</a></span></li>
921       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="37b13367910153b52b3c344cbcb903c5"><span class=en-original lang=en><a href=#websocket-events><span class=secno>7.3.3 </span>WebSocket Events</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="37b13367910153b52b3c344cbcb903c5"><span class=en-original lang=en><a href=#websocket-events><span class=secno>7.3.3 </span>WebSocket Events</a></span></li>
922       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="4fdcf45414194b8fe5422db30851c7c9"><span class=en-original lang=en><a href=#the-web-socket-protocol><span class=secno>7.3.4 </span>The Web Socket protocol</a>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="bf1e54f27c9ce99e9657971b104a2589"><span class=en-original lang=en><a href=#feedback-from-the-protocol><span class=secno>7.3.4 </span>Feedback from the protocol</a></span></li>
923         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="4fc621bfe8f1468f6980a0d6cfc337fc"><span class=en-original lang=en><a href=#websocket-protocol title="This protocol enables two-way
924      communication between a user agent running untrusted code running in
925      a controlled environment to a remote host that understands the
926      protocol. It is intended to fail to communicate with servers of
927      pre-existing protocols like SMTP or HTTP, while allowing HTTP
928      servers to opt-in to supporting this protocol if desired. It is
929      designed to be easy to implement on the server side."><span class=secno>7.3.5 </span>The Web Socket
930      protocol</a>
931        </span><ol>        </span><ol>
932         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="ff3d2fe483e71e1fc463d274d9ef5961"><span class=en-original lang=en><a href=#client-side-requirements><span class=secno>7.3.4.1 </span>Client-side requirements</a>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="af37f88121badb8b287e5a577b82c0e9"><span class=en-original lang=en><a href=#introduction-5><span class=secno>7.3.5.1 </span>Introduction</a></span></li>
933           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="2c044f19b496cd1465b2526068a570e5"><span class=en-original lang=en><a href=#client-side-requirements><span class=secno>7.3.5.2 </span>Client-side requirements</a>
934          </span><ol>          </span><ol>
935           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="522e771a7b5780a7e554b266f8c7ea5b"><span class=en-original lang=en><a href=#handshake><span class=secno>7.3.4.1.1 </span>Handshake</a></span></li>           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="de255d4400d8e434d7dd45a95558a341"><span class=en-original lang=en><a href=#handshake><span class=secno>7.3.5.2.1 </span>Handshake</a></span></li>
936           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="f27354e3aca192bf5e043f0e4cd99e08"><span class=en-original lang=en><a href=#data-framing><span class=secno>7.3.4.1.2 </span>Data framing</a></span></ol></li>           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="aa854e899976eea4d583e599d1955c8b"><span class=en-original lang=en><a href=#data-framing><span class=secno>7.3.5.2.2 </span>Data framing</a></span></ol></li>
937         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="2826bf708b1c9466ba2558ff11f5d2c6"><span class=en-original lang=en><a href=#server-side-requirements><span class=secno>7.3.4.2 </span>Server-side requirements</a>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="9f2d09a91c2d36ed9203a9cdbddc6aec"><span class=en-original lang=en><a href=#server-side-requirements><span class=secno>7.3.5.3 </span>Server-side requirements</a>
938          </span><ol>          </span><ol>
939           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="bd9b5347420ec133ec0bd05b68d6e04c"><span class=en-original lang=en><a href=#minimal-handshake><span class=secno>7.3.4.2.1 </span>Minimal handshake</a></span></li>           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="6be5828f79220ea4845c7b8bfd525363"><span class=en-original lang=en><a href=#minimal-handshake><span class=secno>7.3.5.3.1 </span>Minimal handshake</a></span></li>
940           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="8658bc5677d1d466e61d1391f5de128a"><span class=en-original lang=en><a href=#handshake-details><span class=secno>7.3.4.2.2 </span>Handshake details</a></span></li>           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="bf290edcc098d6975f23dc25775007fd"><span class=en-original lang=en><a href=#handshake-details><span class=secno>7.3.5.3.2 </span>Handshake details</a></span></li>
941           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="5b7a17f095999e1624829f38c6159fc6"><span class=en-original lang=en><a href=#ws-sd-framing><span class=secno>7.3.4.2.3 </span>Data framing</a></span></ol></li>           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="4f77797453e3541d5a43a2d401f6fd10"><span class=en-original lang=en><a href=#ws-sd-framing><span class=secno>7.3.5.3.3 </span>Data framing</a></span></ol></li>
942         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="ef1ae22635478a100704cd88437851d3"><span class=en-original lang=en><a href=#closing-the-connection><span class=secno>7.3.4.3 </span>Closing the connection</a></span></ol></ol></li>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="547e983d3d37935a8b5d9e18d5c84e9d"><span class=en-original lang=en><a href=#closing-the-connection><span class=secno>7.3.5.4 </span>Closing the connection</a></span></li>
943           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="345b5958c0122497f382e6262750d7f6"><span class=en-original lang=en><a href=#security-considerations><span class=secno>7.3.5.5 </span>Security considerations</a></span></ol></ol></li>
944     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="9309322efb5f2e4ce1816ca79ba205b3"><span class=en-original lang=en><a href=#crossDocumentMessages><span class=secno>7.4 </span>Cross-document messaging</a>     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="9309322efb5f2e4ce1816ca79ba205b3"><span class=en-original lang=en><a href=#crossDocumentMessages><span class=secno>7.4 </span>Cross-document messaging</a>
945      </span><ol>      </span><ol>
946       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="2b15a8c608d999fb9c2521adb4caf707"><span class=en-original lang=en><a href=#introduction-5><span class=secno>7.4.1 </span>Introduction</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="8ffe592614cfd528dd981fb445640767"><span class=en-original lang=en><a href=#introduction-6><span class=secno>7.4.1 </span>Introduction</a></span></li>
947       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="4a2daaf0e4c589be3dfc3605477b5c6e"><span class=en-original lang=en><a href=#security-5><span class=secno>7.4.2 </span>Security</a>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="4a2daaf0e4c589be3dfc3605477b5c6e"><span class=en-original lang=en><a href=#security-5><span class=secno>7.4.2 </span>Security</a>
948        </span><ol>        </span><ol>
949         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="d4ef9e89f0bca84798996330054a78f6"><span class=en-original lang=en><a href=#authors><span class=secno>7.4.2.1 </span>Authors</a></span></li>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="d4ef9e89f0bca84798996330054a78f6"><span class=en-original lang=en><a href=#authors><span class=secno>7.4.2.1 </span>Authors</a></span></li>
# Line 942  HTML やそれに関係する API を拡 Line 952  HTML やそれに関係する API を拡
952       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="beed3cd27bf5e249ba152fb2ba377b77"><span class=en-original lang=en><a href=#posting-messages-with-message-ports><span class=secno>7.4.4 </span>Posting messages with message ports</a></span></ol></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="beed3cd27bf5e249ba152fb2ba377b77"><span class=en-original lang=en><a href=#posting-messages-with-message-ports><span class=secno>7.4.4 </span>Posting messages with message ports</a></span></ol></li>
953     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="164ee0b78784d452b1ca3f2b89b6269f"><span class=en-original lang=en><a href=#channel-messaging><span class=secno>7.5 </span>Channel messaging</a>     <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="164ee0b78784d452b1ca3f2b89b6269f"><span class=en-original lang=en><a href=#channel-messaging><span class=secno>7.5 </span>Channel messaging</a>
954      </span><ol>      </span><ol>
955       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="88e46370c3c6cb1a1651f129e85e95ac"><span class=en-original lang=en><a href=#introduction-6><span class=secno>7.5.1 </span>Introduction</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="c91a0df7450a72ffd51881a3285bf5c9"><span class=en-original lang=en><a href=#introduction-7><span class=secno>7.5.1 </span>Introduction</a></span></li>
956       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="966af7e5a8b74b05d18f6658f557fb89"><span class=en-original lang=en><a href=#message-channels><span class=secno>7.5.2 </span>Message channels</a></span></li>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="966af7e5a8b74b05d18f6658f557fb89"><span class=en-original lang=en><a href=#message-channels><span class=secno>7.5.2 </span>Message channels</a></span></li>
957       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="83583a93ef60b314d4b003f39b6b68c6"><span class=en-original lang=en><a href=#message-ports><span class=secno>7.5.3 </span>Message ports</a>       <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="83583a93ef60b314d4b003f39b6b68c6"><span class=en-original lang=en><a href=#message-ports><span class=secno>7.5.3 </span>Message ports</a>
958        </span><ol>        </span><ol>
# Line 46328  data:&nbsp;test</span></pre> Line 46338  data:&nbsp;test</span></pre>
46338    
46339    <h3 id=network class="has-ja-translation" data-ja-hash="d2a85c74080866d84747945d5a70be03"><span class=en-original lang=en><span class=secno>7.3 </span><dfn>Web sockets</dfn></span><span class=ja-translation lang=ja><span class=secno>7.3 </span><dfn>Web ソケット</dfn></span></h3>    <h3 id=network class="has-ja-translation" data-ja-hash="d2a85c74080866d84747945d5a70be03"><span class=en-original lang=en><span class=secno>7.3 </span><dfn>Web sockets</dfn></span><span class=ja-translation lang=ja><span class=secno>7.3 </span><dfn>Web ソケット</dfn></span></h3>
46340    
46341      <h4 id=network-intro class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.3.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.3.1 </span>はじめに</span></h4>
46342    
46343      <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>
46344    
46345    <p class="no-ja-translation" data-ja-hash="442f32b678c017acacb38806fe3d454e"><span class=en-original lang=en>To enable Web applications to maintain bidirectional    <p class="no-ja-translation" data-ja-hash="442f32b678c017acacb38806fe3d454e"><span class=en-original lang=en>To enable Web applications to maintain bidirectional
46346    communications with server-side processes, this specification    communications with server-side processes, this specification
46347    introduces the <code><a href=#websocket>WebSocket</a></code> interface.</span></p>    introduces the <code><a href=#websocket>WebSocket</a></code> interface.</span></p>
# Line 46337  data:&nbsp;test</span></pre> Line 46351  data:&nbsp;test</span></pre>
46351    implement an IRC client without proxying messages through a custom    implement an IRC client without proxying messages through a custom
46352    server.</span></p>    server.</span></p>
46353    
   
   <h4 id=network-intro class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.3.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.3.1 </span>はじめに</span></h4>  
   
   <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>  
   
46354    <p class="XXX no-ja-translation" data-ja-hash="cff2f6addf910aa84ace866aa6721f7e"><span class=en-original lang=en>An introduction to the client-side and    <p class="XXX no-ja-translation" data-ja-hash="cff2f6addf910aa84ace866aa6721f7e"><span class=en-original lang=en>An introduction to the client-side and
46355    server-side of using the direct connection APIs.</span></p>    server-side of using the direct connection APIs.</span></p>
46356    
46357      <!--BOILERPLATE-->
46358    
46359    <h4 id=the-websocket-interface class="has-ja-translation" data-ja-hash="db9aeb5141570ad653d71b5d9ca2307e" data-ja-real-hash="c3841ea4e05c700abf104d600f1a7ee6"><span class=en-original lang=en><span class=secno>7.3.2 </span>The <code><a href=#websocket>WebSocket</a></code> interface</span><span class=ja-translation lang=ja><span class=secno>7.3.2 </span><code><a href=#websocket>WebSocket</a></code> 界面</span></h4>    <h4 id=network-idl class="has-ja-translation" data-ja-hash="db9aeb5141570ad653d71b5d9ca2307e" data-ja-real-hash="c3841ea4e05c700abf104d600f1a7ee6"><span class=en-original lang=en><span class=secno>7.3.2 </span>The <code><a href=#websocket>WebSocket</a></code> interface</span><span class=ja-translation lang=ja><span class=secno>7.3.2 </span><code><a href=#websocket>WebSocket</a></code> 界面</span></h4>
46360    
46361    <pre class="idl no-ja-translation" data-ja-hash="ad320fa7a9cb0d3cec0ee75028d6a3af"><span class=en-original lang=en>    <pre class="idl no-ja-translation" data-ja-hash="ad320fa7a9cb0d3cec0ee75028d6a3af"><span class=en-original lang=en>
46362  [<a href=#dom-websocket title=dom-WebSocket>Constructor</a>(in DOMString url)]  [<a href=#dom-websocket title=dom-WebSocket>Constructor</a>(in DOMString url)]
# Line 46370  interface <dfn id=websocket>WebSocket</d Line 46380  interface <dfn id=websocket>WebSocket</d
46380    <p class="no-ja-translation" data-ja-hash="8d800da3ace58054cf4cbfee755511f1"><span class=en-original lang=en><code><a href=#websocket>WebSocket</a></code> objects must also implement the    <p class="no-ja-translation" data-ja-hash="8d800da3ace58054cf4cbfee755511f1"><span class=en-original lang=en><code><a href=#websocket>WebSocket</a></code> objects must also implement the
46381    <code>EventTarget</code> interface. <a href=#refsDOM3EVENTS>[DOM3EVENTS]</a>    <code>EventTarget</code> interface. <a href=#refsDOM3EVENTS>[DOM3EVENTS]</a>
46382    
46383    </span><p class="no-ja-translation" data-ja-hash="dda30c8aee730e38ff73b5b778115c01"><span class=en-original lang=en>The <dfn id=dom-websocket title=dom-WebSocket><code>WebSocket(<var title="">url</var>)</code></dfn> constructor takes one argument,    </span><p class="no-ja-translation" data-ja-hash="ee020dee499cd162f75f4fcb5f973a74"><span class=en-original lang=en>The <dfn id=dom-websocket title=dom-WebSocket><code>WebSocket(<var title="">url</var>)</code></dfn> constructor takes one argument,
46384    <var title="">url</var>, which specifies the <a href=#url>URL</a> to    <var title="">url</var>, which specifies the <a href=#url>URL</a> to
46385    which to connect. When a <code><a href=#websocket>WebSocket</a></code> object is created,    which to connect. When the <code>WebSocket()</code> constructor is
46386    the UA must <a href=#parse-a-url title="parse a url">parse</a> this argument and    invoked, the UA must run these steps:</span></p>
46387    verify that the URL parses without failure and has a <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component whose value is  
46388    either "<code title="">ws</code>" or "<code title="">wss</code>",    <ol><li><p class="no-ja-translation" data-ja-hash="308540edd6901f1d7d61cc5ed08095eb"><span class=en-original lang=en><a href=#parse-a-url title="parse a url">Parse</a> the <var title="">url</var> argument.</span></li>
46389    when compared in an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> manner. If  
46390    it does, it has, and it is, then the user agent must asynchronously     <li><p class="no-ja-translation" data-ja-hash="46653630f94032aa5162a845ef584e35"><span class=en-original lang=en>If the previous step failed, or if <var title="">url</var>
46391    <a href=#establish-a-web-socket-connection>establish a Web Socket connection</a> to <var title="">url</var>. Otherwise, the constructor must raise a     does not have a <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>
46392    <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.</span></p>     component whose value is either "<code title="">ws</code>" or
46393       "<code title="">wss</code>", when compared in an <a href=#ascii-case-insensitive>ASCII
46394       case-insensitive</a> manner, then throw a
46395       <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.</span></li>
46396    
46397       <li><p class="no-ja-translation" data-ja-hash="e2314cbdd408248b19d4b079eb53e1ac"><span class=en-original lang=en>Return a new <code><a href=#websocket>WebSocket</a></code> object, and continue
46398       these steps in the background (without blocking scripts).</span></li>
46399    
46400       <li><p class="no-ja-translation" data-ja-hash="cad631d88b7bd765e94e6adce6217a5b"><span class=en-original lang=en>Let <var title="">origin</var> be the <a href=#ascii-serialization-of-an-origin title="ASCII
46401       serialization of an origin">ASCII serialization</a> of the
46402       <a href=#origin-0>origin</a> of the script that invoked the <code title=dom-WebSocket><a href=#dom-websocket>WebSocket()</a></code> constructor.</span></li>
46403    
46404       <li><p class="no-ja-translation" data-ja-hash="fdced7df437637af6894d247c096c147"><span class=en-original lang=en>If the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>
46405       component of <var title="">url</var> is "<code title="">ws</code>",
46406       set <var title="">secure</var> to false; otherwise, the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a> component is "<code title="">wss</code>", set <var title="">secure</var> to
46407       true.</span></li>
46408    
46409       <li><p class="no-ja-translation" data-ja-hash="b72d65ce075bdb53e34dbdfccc519391"><span class=en-original lang=en>Let <var title="">host</var> be the value of the <a href=#url-host title=url-host>&lt;host&gt;</a> component of <var title="">url</var>.</span></li>
46410    
46411    <p class="no-ja-translation" data-ja-hash="89c88518a44b891e0b244b3a7fbfa271"><span class=en-original lang=en>The <dfn id=dom-websocket-url title=dom-WebSocket-URL><code>URL</code></dfn>     <li><p class="no-ja-translation" data-ja-hash="ba637f8f4107607c81c8395a83991555"><span class=en-original lang=en>If <var title="">url</var> has a <a href=#url-port title=url-port>&lt;port&gt;</a> component, then let <var title="">port</var> be that component's value; otherwise, there is
46412       no explicit <var title="">port</var>.</span></li>
46413    
46414       <li><p class="no-ja-translation" data-ja-hash="7b1e0ab45d84e2293bcc1e772bd3c526"><span class=en-original lang=en>Let <var title="">resource name</var> be the value of the
46415       <a href=#url-path title=url-path>&lt;path&gt;</a> component (which might
46416       be empty) of <var title="">url</var>.</span></li>
46417    
46418       <li><p class="no-ja-translation" data-ja-hash="1c091c246d53e4be63e029b434e5a643"><span class=en-original lang=en>If <var title="">resource name</var> is the empty string,
46419       set it to a single character U+002F SOLIDUS (/).</span></li>
46420    
46421       <li><p class="no-ja-translation" data-ja-hash="b4d30b38e3392062549c017751651656"><span class=en-original lang=en>If <var title="">url</var> has a <a href=#url-query title=url-query>&lt;query&gt;</a> component, then append a
46422       single U+003F QUESTION MARK (?) character to <var title="">resource
46423       name</var>, followed by the value of the <a href=#url-query title=url-query>&lt;query&gt;</a> component.</span></li>
46424    
46425       <li><p class="no-ja-translation" data-ja-hash="f55f2390fa0a6e33f532cecbf59037d2"><span class=en-original lang=en><a href=#establish-a-web-socket-connection>Establish a Web Socket connection</a> to a host
46426       <var title="">host</var>, on port <var title="">port</var> (if one
46427       was specified), from <var title="">origin</var>, with the flag <var title="">secure</var>, and with <var title="">resource name</var>
46428       as the resource name.</span></li>
46429    
46430      </ol><hr><p class="no-ja-translation" data-ja-hash="89c88518a44b891e0b244b3a7fbfa271"><span class=en-original lang=en>The <dfn id=dom-websocket-url title=dom-WebSocket-URL><code>URL</code></dfn>
46431    attribute must return the value that was passed to the    attribute must return the value that was passed to the
46432    constructor.</span></p>    constructor.</span></p>
46433    
# Line 46401  interface <dfn id=websocket>WebSocket</d Line 46447  interface <dfn id=websocket>WebSocket</d
46447    
46448     <dd class="no-ja-translation" data-ja-hash="a26644c4b00929d673aed29727fa9617"><span class=en-original lang=en>The connection has been closed or could not be opened.</span></dd>     <dd class="no-ja-translation" data-ja-hash="a26644c4b00929d673aed29727fa9617"><span class=en-original lang=en>The connection has been closed or could not be opened.</span></dd>
46449    
46450    </dl><p class="no-ja-translation" data-ja-hash="dfd485ce491a48cd51ce381f60c32a6e"><span class=en-original lang=en>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to    </dl><p class="no-ja-translation" data-ja-hash="562d51e4faccbb42cb699fd6b9d33db9"><span class=en-original lang=en>When the object is created its <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> must be set to
46451    <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0).</span></p>    <code title=dom-WebSocket-CONNECTING><a href=#dom-websocket-connecting>CONNECTING</a></code> (0). The
46452      steps executed when the constructor is invoked change this
46453      attribute's value.</span></p>
46454    
46455    <p class="no-ja-translation" data-ja-hash="715a40aa96cdd89d033668e715e17b68"><span class=en-original lang=en>The <dfn id=dom-websocket-postmessage title=dom-WebSocket-postMessage><code>postMessage(<var title="">data</var>)</code></dfn> method transmits data using the    <p class="no-ja-translation" data-ja-hash="715a40aa96cdd89d033668e715e17b68"><span class=en-original lang=en>The <dfn id=dom-websocket-postmessage title=dom-WebSocket-postMessage><code>postMessage(<var title="">data</var>)</code></dfn> method transmits data using the
46456    connection. If the connection is not established (<code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> is not <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code>), it must raise an    connection. If the connection is not established (<code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> is not <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code>), it must raise an
# Line 46456  interface <dfn id=websocket>WebSocket</d Line 46504  interface <dfn id=websocket>WebSocket</d
46504     <dd><p class="no-ja-translation" data-ja-hash="8250a18cc071463032f040ac731955ef"><span class=en-original lang=en>Must be invoked whenever an <code title=event-WebSocket-closed>closed</code> event is targeted at or     <dd><p class="no-ja-translation" data-ja-hash="8250a18cc071463032f040ac731955ef"><span class=en-original lang=en>Must be invoked whenever an <code title=event-WebSocket-closed>closed</code> event is targeted at or
46505     bubbles through the <code><a href=#websocket>WebSocket</a></code> object.</span></dd>     bubbles through the <code><a href=#websocket>WebSocket</a></code> object.</span></dd>
46506    
46507    </dl><h4 id=the-web-socket-protocol class="no-ja-translation" data-ja-hash="28deb8b51c7d365c832157517dd088dd"><span class=en-original lang=en><span class=secno>7.3.4 </span>The Web Socket protocol</span></h4>    </dl><h4 id=feedback-from-the-protocol class="no-ja-translation" data-ja-hash="7158b36c34c3920244ef326862b5da70"><span class=en-original lang=en><span class=secno>7.3.4 </span>Feedback from the protocol</span></h4>
46508    
46509    <p class="no-ja-translation" data-ja-hash="412202fca9ec5aa97174475c99de5a95"><span class=en-original lang=en>The <a href=#task-source>task source</a> for all <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a    <p class="no-ja-translation" data-ja-hash="6c4e1188122a279bb0b7a8660ebaffb7"><span class=en-original lang=en>When the <i><a href=#web-socket-connection-is-established>Web Socket connection is established</a></i>, the user
46510    task">queued</a> by algorithms in this section and its    agent must run the following steps:</span></p>
46511    subsections is the <dfn id=web-socket-task-source>Web Socket task source</dfn>.</span></p>  
46512      <ol><li>
46513    
46514    <h5 id=client-side-requirements class="no-ja-translation" data-ja-hash="7e6021fb7db3197e82f301ec6100aa95"><span class=en-original lang=en><span class=secno>7.3.4.1 </span>Client-side requirements</span></h5>      <p class="no-ja-translation" data-ja-hash="a4b3326b41f214cfa3b9b4ac58086d25"><span class=en-original lang=en>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
46515        to <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</span></p>
46516    
46517       </li>
46518    
46519       <li>
46520    
46521        <p class="no-ja-translation" data-ja-hash="d9f049f9ca1cdf508e48da9e573a3aae"><span class=en-original lang=en><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>
46522        named <code title=event-WebSocket-open><a href=#event-websocket-open>open</a></code> at the
46523        <code><a href=#websocket>WebSocket</a></code> object.</span></p>
46524    
46525       </li>
46526    
46527      </ol><hr><p class="no-ja-translation" data-ja-hash="4ad60f9ab9695865fca34157e6f4bfad"><span class=en-original lang=en>When <i>a Web Socket message has been received</i> with text <var title="">data</var>, the user agent must create an event that uses
46528      the <code><a href=#messageevent>MessageEvent</a></code> interface, with the event name <code title=event-message><a href=#event-message>message</a></code>, which does not bubble, is
46529      cancelable, has no default action, and whose <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code> attribute is set to <var title="">data</var>, and <a href=#queue-a-task>queue a task</a> to dispatch it at
46530      the <code><a href=#websocket>WebSocket</a></code> object.</span></p>
46531    
46532      <hr><p id=closeWebSocket class="no-ja-translation" data-ja-hash="c882ec1a1d63c1b7a001d10cd8f373ac"><span class=en-original lang=en>When the <i><a href=#web-socket-connection-is-closed>Web Socket connection is
46533      closed</a></i>, the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value
46534      must be changed to <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code>
46535      (2), and the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire
46536      a simple event</a> named <code title=event-WebSocket-close><a href=#event-websocket-close>close</a></code> at the
46537      <code><a href=#websocket>WebSocket</a></code> object.</span></p>
46538    
46539      <hr><p class="no-ja-translation" data-ja-hash="be8ea7ccda5a0f8cc2852d3ceefa5cde"><span class=en-original lang=en>The <a href=#task-source>task source</a> for all <a href=#concept-task title=concept-task>tasks</a> <a href=#queue-a-task title="queue a
46540      task">queued</a> in this section is the <dfn id=web-socket-task-source>Web Socket task
46541      source</dfn>.</span></p>
46542    
46543    
46544    
46545      <h4 id=websocket-protocol title="This protocol enables two-way
46546      communication between a user agent running untrusted code running in
46547      a controlled environment to a remote host that understands the
46548      protocol. It is intended to fail to communicate with servers of
46549      pre-existing protocols like SMTP or HTTP, while allowing HTTP
46550      servers to opt-in to supporting this protocol if desired. It is
46551      designed to be easy to implement on the server side." class="no-ja-translation" data-ja-hash="28deb8b51c7d365c832157517dd088dd"><span class=en-original lang=en><span class=secno>7.3.5 </span>The Web Socket
46552      protocol</span></h4>
46553    
46554      <div class=no-rfc>
46555       <p class="note no-ja-translation" data-ja-hash="6fdffdb5ee2010d0fa5092fe62656cea"><span class=en-original lang=en>This section will be extracted into an RFC in due
46556       course.</span></p>
46557      </div>
46558    
46559    <p class="no-ja-translation" data-ja-hash="7ad27eb42a8c0872ef1a2540d22a1112"><span class=en-original lang=en><em>This section only applies to user agents.</em></span></p>    <h5 id=introduction-5 class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.3.5.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.3.5.1 </span>はじめに</span></h5>
46560    
46561      <p class="XXX no-ja-translation" data-ja-hash="2f43b42fd833d1e77420a8dae7419000"><span class=en-original lang=en>...</span></p>
46562    
46563      <h5 id=client-side-requirements class="no-ja-translation" data-ja-hash="7e6021fb7db3197e82f301ec6100aa95"><span class=en-original lang=en><span class=secno>7.3.5.2 </span>Client-side requirements</span></h5>
46564    
46565      <p class="no-ja-translation" data-ja-hash="977cc0420b3d8e5a1d0e5e28ff411383"><span class=en-original lang=en><em>This section only applies to user agents, not to
46566      servers.</em></span></p>
46567    
46568    <p class="note no-ja-translation" data-ja-hash="d31c25671ddb73bf101a01a307dd27b5"><span class=en-original lang=en>This specification doesn't currently define a limit    <p class="note no-ja-translation" data-ja-hash="d31c25671ddb73bf101a01a307dd27b5"><span class=en-original lang=en>This specification doesn't currently define a limit
46569    to the number of simultaneous connections that a client can    to the number of simultaneous connections that a client can
46570    establish to a server.</span></p>    establish to a server.</span></p>
46571    
46572    
46573    <h6 id=handshake class="no-ja-translation" data-ja-hash="7559811a22a9c4b79332bd85a197e4c5"><span class=en-original lang=en><span class=secno>7.3.4.1.1 </span>Handshake</span></h6>    <h6 id=handshake class="no-ja-translation" data-ja-hash="7559811a22a9c4b79332bd85a197e4c5"><span class=en-original lang=en><span class=secno>7.3.5.2.1 </span>Handshake</span></h6>
   
   <p class="no-ja-translation" data-ja-hash="4f2e4d6dcfee06faa640e4625d1ddb91"><span class=en-original lang=en>When the user agent is to <dfn id=establish-a-web-socket-connection>establish a Web Socket  
   connection</dfn> to <var title="">url</var>, it must run the  
   following steps, in the background (without blocking scripts or  
   anything like that):</span></p>  
   
   <ol><li id=ws-ua-1><p class="no-ja-translation" data-ja-hash="cbc5be63ad29872ad7149762463765ce"><span class=en-original lang=en><a href=#resolve-a-url title="resolve a url">Resolve</a> the  
    <a href=#url>URL</a> <var title="">url</var>.</span></li> <!-- warning for  
    editors: this is referred to as "the first step" by later steps -->  
   
    <li><p class="no-ja-translation" data-ja-hash="20c440c80776047c782b864302311e0c"><span class=en-original lang=en>If the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>  
    component of the resulting <a href=#absolute-url>absolute URL</a> is "<code title="">ws</code>", set <var title="">secure</var> to false;  
    otherwise, the <a href=#url-scheme title=url-scheme>&lt;scheme&gt;</a>  
    component is "<code title="">wss</code>", set <var title="">secure</var> to true.</span></li>  
   
    <li><p class="no-ja-translation" data-ja-hash="a9c8b37e690d05198e116838dc35db09"><span class=en-original lang=en>Let <var title="">host</var> be the value of the <a href=#url-host title=url-host>&lt;host&gt;</a> component in the resulting  
    <a href=#absolute-url>absolute URL</a>.</span></li>  
46574    
46575     <li><p class="no-ja-translation" data-ja-hash="b372b508151f2de4230f6e129e6f094b"><span class=en-original lang=en>If the resulting <a href=#absolute-url>absolute URL</a> has a <a href=#url-port title=url-port>&lt;port&gt;</a> component, then let <var title="">port</var> be that component's value; otherwise, if <var title="">secure</var> is false, let <var title="">port</var> be 81,    <p class="no-ja-translation" data-ja-hash="7a230a3ea19b82366ed5bb5a33218403"><span class=en-original lang=en>When the user agent is to <dfn id=establish-a-web-socket-connection>establish a Web Socket
46576     otherwise let <var title="">port</var> be 815.</span></li>    connection</dfn> to a host <var title="">host</var>, optionally on
46577      port <var title="">port</var>, from an origin <var title="">origin</var>, with a flag <var title="">secure</var>, and
46578      with a particular <var title="">resource name</var>, it must run the
46579      following steps:</span></p>
46580    
46581     <li><p class="no-ja-translation" data-ja-hash="cac4305f03442f6e04f7980acad109f7"><span class=en-original lang=en>Let <var title="">resource name</var> be the value of the    <ol><li>
    <a href=#url-path title=url-path>&lt;path&gt;</a> component (which might  
    be empty) in the resulting <a href=#absolute-url>absolute URL</a>.</span></li>  
46582    
46583     <li><p class="no-ja-translation" data-ja-hash="1c091c246d53e4be63e029b434e5a643"><span class=en-original lang=en>If <var title="">resource name</var> is the empty string,      <p class="no-ja-translation" data-ja-hash="2a6b9bfa4a1cfe7a828412e24dc388e4"><span class=en-original lang=en>If there is no explicit <var title="">port</var>, then: if <var title="">secure</var> is false, let <var title="">port</var> be 81,
46584     set it to a single character U+002F SOLIDUS (/).</span></li>      otherwise let <var title="">port</var> be 815.</span></p>
46585    
46586     <li><p class="no-ja-translation" data-ja-hash="01d2a8d9ae6a179e2767f88c0129defa"><span class=en-original lang=en>If the resulting <a href=#absolute-url>absolute URL</a> has a <a href=#url-query title=url-query>&lt;query&gt;</a> component, then append a     </li>
    single 003F QUESTION MARK (?) character to <var title="">resource  
    name</var>, followed by the value of the <a href=#url-query title=url-query>&lt;query&gt;</a> component.</span></li>  
46587    
46588     <li>     <li>
46589    
46590      <p class="no-ja-translation" data-ja-hash="9d8f75a69c2125f5cff81388ee480bb3"><span class=en-original lang=en>If the user agent is configured to use a proxy to connect to      <p class="no-ja-translation" data-ja-hash="9177058118c5c6597e882aa9bbbdc61b"><span class=en-original lang=en>If the user agent is configured to use a proxy to connect to
46591      port <var title="">port</var>, then connect to that proxy and ask      host <var title="">host</var> and/or port <var title="">port</var>, then connect to that proxy and ask it to open
46592      it to open a TCP/IP connection to the host given by <var title="">host</var> and the port given by <var title="">port</var>.</span></p>      a TCP/IP connection to the host given by <var title="">host</var>
46593        and the port given by <var title="">port</var>.</span></p>
46594    
46595      <div class=example>      <div class=example>
46596    
46597       <p class="no-ja-translation" data-ja-hash="64b8513c9d75350a94d3a00654661220"><span class=en-original lang=en>For example, if the user agent uses an HTTP proxy, then if it       <p class="no-ja-translation" data-ja-hash="084d3c3c0707c043dc9f72438c48de21"><span class=en-original lang=en>For example, if the user agent uses an HTTP proxy for all
46598       was to try to connect to port 80 on server example.com, it might       traffic, then if it was to try to connect to port 80 on server
46599       send the following lines to the proxy server:</span></p>       example.com, it might send the following lines to the proxy
46600         server:</span></p>
46601    
46602       <pre class="no-ja-translation" data-ja-hash="1f8f871d62f91a334a9e1fd0de6e91b4"><span class=en-original lang=en>CONNECT example.com HTTP/1.1</span></pre>       <pre class="no-ja-translation" data-ja-hash="1f8f871d62f91a334a9e1fd0de6e91b4"><span class=en-original lang=en>CONNECT example.com HTTP/1.1</span></pre>
46603    
# Line 46568  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46651  Proxy-authorization: Basic ZWRuYW1vZGU6b
46651    
46652      <pre class="no-ja-translation" data-ja-hash="515b8413e33a7f0529afd8dd37d79c47"><span class=en-original lang=en>48 6f 73 74 3a 20</span></pre>      <pre class="no-ja-translation" data-ja-hash="515b8413e33a7f0529afd8dd37d79c47"><span class=en-original lang=en>48 6f 73 74 3a 20</span></pre>
46653    
46654      <p class="no-ja-translation" data-ja-hash="aeece17f0ee2feb2ed95ce661a1d0ec2"><span class=en-original lang=en>Send the <var title="">host</var> value, encoded as US-ASCII,      <p class="no-ja-translation" data-ja-hash="a1daa45cbf03ebafdc50aaa1540807b3"><span class=en-original lang=en>Send the <var title="">host</var> value, encoded as US-ASCII
46655      if it represents a host name (and not an IP address).</span></p>      and <a href=#converted-to-lowercase>converted to lowercase</a>, if it represents a host
46656        name (and not an IP address).</span></p>
46657    
46658      <p class="no-ja-translation" data-ja-hash="3ba2f2a7333ba0f325ebeb782825016e"><span class=en-original lang=en>Send the following bytes:</span></p>      <p class="no-ja-translation" data-ja-hash="3ba2f2a7333ba0f325ebeb782825016e"><span class=en-original lang=en>Send the following bytes:</span></p>
46659    
# Line 46585  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46669  Proxy-authorization: Basic ZWRuYW1vZGU6b
46669    
46670      <pre class="no-ja-translation" data-ja-hash="c5b29da152ce30de1b9044c3fa90bc6b"><span class=en-original lang=en>4f 72 69 67 69 6e 3a 20</span></pre>      <pre class="no-ja-translation" data-ja-hash="c5b29da152ce30de1b9044c3fa90bc6b"><span class=en-original lang=en>4f 72 69 67 69 6e 3a 20</span></pre>
46671    
46672      <p class="no-ja-translation" data-ja-hash="c8c4373f8e0fa45a578489f4636dcf4a"><span class=en-original lang=en>Send the <a href=#ascii-serialization-of-an-origin title="ASCII serialization of an origin">ASCII      <p class="no-ja-translation" data-ja-hash="d08930b5a8f667f3c1a1d887db6c15b5"><span class=en-original lang=en>Send the <var title="">origin</var> value, encoded as US-ASCII
46673      serialization</a> of the <a href=#origin-0>origin</a> of the script that      and <a href=#converted-to-lowercase>converted to lowercase</a>.</span></p>
     invoked the <code title=dom-WebSocket><a href=#dom-websocket>WebSocket()</a></code>  
     constructor.</span></p>  
46674    
46675      <p class="no-ja-translation" data-ja-hash="3ba2f2a7333ba0f325ebeb782825016e"><span class=en-original lang=en>Send the following bytes:</span></p>      <p class="no-ja-translation" data-ja-hash="3ba2f2a7333ba0f325ebeb782825016e"><span class=en-original lang=en>Send the following bytes:</span></p>
46676    
# Line 46600  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46682  Proxy-authorization: Basic ZWRuYW1vZGU6b
46682    
46683     <li>     <li>
46684    
46685      <p class="no-ja-translation" data-ja-hash="ed3160a82be317f1a148deabc0e5f922"><span class=en-original lang=en>If the client has any authentication information or cookies      <p class="no-ja-translation" data-ja-hash="a6121f672a674a4dccd384b381fcb371"><span class=en-original lang=en>If the client has any authentication information or cookies
46686      that would be relevant to a resource with a <a href=#url>URL</a> that      that would be relevant to a resource accessed over HTTP, if <var title="">secure</var> is false, or HTTPS, if it is true, on host
46687      has a scheme of <code title="">http</code> if <var title="">secure</var> is false and <code title="">https</code> if      <var title="">host</var>, port <var title="">port</var>, with <var title="">resource name</var> as the path (and possibly query
46688      <var title="">secure</var> is true and is otherwise identical to      parameters), then HTTP headers that would be appropriate for that
46689      <var title="">url</var>, then HTTP headers that would be      information should be sent at this point. <a href=#refsRFC2616>[RFC2616]</a> <a href=#refsRFC2109>[RFC2109]</a> <a href=#refsRFC2965>[RFC2965]</a></span></p>
     appropriate for that information should be sent at this point. <a href=#refsRFC2616>[RFC2616]</a> <a href=#refsRFC2109>[RFC2109]</a> <a href=#refsRFC2965>[RFC2965]</a></span></p>  
46690    
46691      <p class="no-ja-translation" data-ja-hash="3add27299547d242eba5c6eb61313319"><span class=en-original lang=en>Each header must be on a line of its own (each ending with a CR      <p class="no-ja-translation" data-ja-hash="3add27299547d242eba5c6eb61313319"><span class=en-original lang=en>Each header must be on a line of its own (each ending with a CR
46692      LF sequence). For the purposes of this step, each header must not      LF sequence). For the purposes of this step, each header must not
# Line 46614  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46695  Proxy-authorization: Basic ZWRuYW1vZGU6b
46695    
46696      <div class=example>      <div class=example>
46697    
46698       <p class="no-ja-translation" data-ja-hash="1d2fcf00eacbf2717782740b082802b1"><span class=en-original lang=en>For example, if the server had a username and password that       <p class="no-ja-translation" data-ja-hash="14cf94edd47533d7be96aa95cdd42038"><span class=en-original lang=en>For example, if the server had a username and password that
46699       applied to that URL, it could send:</span></p>       applied to <code title="">http://example.com/socket</code>, and
46700         the Web Socket was being opened to <code title="">ws://example.com:80/socket</code>, it could send
46701         them:</span></p>
46702    
46703       <pre class="no-ja-translation" data-ja-hash="b3493548fab5a43405bd53d015516c1e"><span class=en-original lang=en>Authorization: Basic d2FsbGU6ZXZl</span></pre>       <pre class="no-ja-translation" data-ja-hash="b3493548fab5a43405bd53d015516c1e"><span class=en-original lang=en>Authorization: Basic d2FsbGU6ZXZl</span></pre>
46704    
46705         <p class="no-ja-translation" data-ja-hash="f9283b18918e748b0b01e116964bb7ba"><span class=en-original lang=en>However, it would not send them if the Web Socket was being
46706         opened to <code title="">ws://example.com/socket</code>, as that
46707         uses a different port (81, not 80).</span></p>
46708    
46709      </div>      </div>
46710    
46711     </li>     </li>
# Line 46652  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46739  Proxy-authorization: Basic ZWRuYW1vZGU6b
46739      string "Upgrade:&nbsp;WebSocket", CRLF, the string      string "Upgrade:&nbsp;WebSocket", CRLF, the string
46740      "Connection:&nbsp;Upgrade", CRLF.</span></p>      "Connection:&nbsp;Upgrade", CRLF.</span></p>
46741    
46742      <p class="XXX no-ja-translation" data-ja-hash="85cd0eb037650dee1db23765082ce3b8"><span class=en-original lang=en>What if the response is a 401 asking for      <!-- v2 if we ever support the server requiring credentials, this
46743      credentials?</span></p>      is where it goes -->
46744    
46745     </li>     </li>
46746    
# Line 46815  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46902  Proxy-authorization: Basic ZWRuYW1vZGU6b
46902    
46903      <dl class=switch><dt class="no-ja-translation" data-ja-hash="51b956777d93e73fb3422d561d04f17a"><span class=en-original lang=en>If the entry's name is "<code title="">websocket-origin</code>"</span></dt>      <dl class=switch><dt class="no-ja-translation" data-ja-hash="51b956777d93e73fb3422d561d04f17a"><span class=en-original lang=en>If the entry's name is "<code title="">websocket-origin</code>"</span></dt>
46904    
46905       <dd class="no-ja-translation" data-ja-hash="2e1be891eb73a4d233c480e5a3c48c87"><span class=en-original lang=en>If the value is not exactly equal to the <a href=#ascii-serialization-of-an-origin title="ASCII       <dd><p class="no-ja-translation" data-ja-hash="9efa8446c0cbc0faaff6af879c720acb"><span class=en-original lang=en>If the value is not exactly equal to <var title="">origin</var>, <a href=#converted-to-lowercase>converted to lowercase</a>, then
      serialization of an origin">ASCII serialization</a> of the  
      <a href=#origin-0>origin</a> of the script that invoked the <code title=dom-WebSocket><a href=#dom-websocket>WebSocket()</a></code> constructor, then  
46906       <a href=#fail-the-web-socket-connection>fail the Web Socket connection</a> and abort these       <a href=#fail-the-web-socket-connection>fail the Web Socket connection</a> and abort these
46907       steps.</span></dd>       steps.</span></dd>
46908    
46909    
46910       <dt class="no-ja-translation" data-ja-hash="8d1ab28a1d22ea3e7c14f511ab05b839"><span class=en-original lang=en>If the entry's name is "<code title="">websocket-location</code>"</span></dt>       <dt class="no-ja-translation" data-ja-hash="8d1ab28a1d22ea3e7c14f511ab05b839"><span class=en-original lang=en>If the entry's name is "<code title="">websocket-location</code>"</span></dt>
46911    
46912       <dd class="no-ja-translation" data-ja-hash="81bd5d4f57a11c35ceb6d662577d035e"><span class=en-original lang=en>If the value is not exactly equal to the <a href=#absolute-url>absolute       <dd>
      URL</a> that resulted from the <a href=#ws-ua-1>first  
      step</a> of ths algorithm, then <a href=#fail-the-web-socket-connection>fail the Web Socket  
      connection</a> and abort these steps.</span></dd>  
46913    
46914          <p class="no-ja-translation" data-ja-hash="296fd3f39d356d862abede1f3a85080e"><span class=en-original lang=en>If the value is not exactly equal to a string consisting of
46915          the following components in the same order, then <a href=#fail-the-web-socket-connection>fail the
46916          Web Socket connection</a> and abort these steps:</span></p>
46917    
46918       <dt class="no-ja-translation" data-ja-hash="63d543973c15cc0de8112b7931a2075d"><span class=en-original lang=en>If the entry's name is "<code title="">set-cookie</code>" or        <ol><li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="2d3e4c58195aac0bba2b88748e0508b9"><span class=en-original lang=en>The string "<code title="">http</code>" if <var title="">secure</var> is false and "<code title="">https</code>" if <var title="">secure</var> is
46919       "<code title="">set-cookie2</code>" or another cookie-related         true</span></li>
      header name</span></dt>  
46920    
46921       <dd class="no-ja-translation" data-ja-hash="262e7c05b7efe54438b0eb8185710491"><span class=en-original lang=en>Handle the cookie as defined by the appropriate spec, except         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="c0b845d7f5089b867aae1069682105be"><span class=en-original lang=en>The three characters "<code title="">://</code>".</span></li>
      pretend that the resource's <a href=#url>URL</a> actually has a  
      scheme of <code title="">http</code> if <var title="">secure</var> is false and <code title="">https</code> if  
      <var title="">secure</var> is true and is otherwise identical to  
      <var title="">url</var>. <a href=#refsRFC2109>[RFC2109]</a> <a href=#refsRFC2965>[RFC2965]</a></span></dd>  
46922    
46923           <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="20f86ab7b131c35d52cf4d5306a391ae"><span class=en-original lang=en>The value of <var title="">host</var>.</span></li>
46924    
46925       <dt class="no-ja-translation" data-ja-hash="1c396c11c90f5314ccb9f6b830dcf717"><span class=en-original lang=en>Any other name</span></dt>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="228e700689d4f4513264570cd5eb1b3b"><span class=en-original lang=en>If <var title="">secure</var> is false and <var title="">port</var> is not 81, or if <var title="">secure</var>
46926           is true and <var title="">port</var> is not 815: a "<code title="">:</code>" character followed by the value of <var title="">port</var>.</span></li>
46927    
46928       <dd class="no-ja-translation" data-ja-hash="99fa56b2f87409b3eebd0cc92507d7b0"><span class=en-original lang=en>Ignore it.</span></dd>         <li><p class="no-ja-translation ja-translation-inserted" data-ja-hash="cccc510cb80e058171dbb60b11ae36b0"><span class=en-original lang=en>The value of <var title="">resource name</var>.</span></li>
46929    
46930      </dl></li>        </ol></dd>
46931    
    <li>  
46932    
46933      <p class="no-ja-translation" data-ja-hash="a4b3326b41f214cfa3b9b4ac58086d25"><span class=en-original lang=en>Change the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value       <dt class="no-ja-translation" data-ja-hash="63d543973c15cc0de8112b7931a2075d"><span class=en-original lang=en>If the entry's name is "<code title="">set-cookie</code>" or
46934      to <code title=dom-WebSocket-OPEN><a href=#dom-websocket-open>OPEN</a></code> (1).</span></p>       "<code title="">set-cookie2</code>" or another cookie-related
46935         header name</span></dt>
46936    
46937     </li>       <dd><p class="no-ja-translation" data-ja-hash="6431dbc625432176d2e8da5219991b4a"><span class=en-original lang=en>Handle the cookie as defined by the appropriate spec, with
46938         the resource being the one with the host <var title="">host</var>, the port <var title="">port</var>, the path
46939         (and possibly query parameters) <var title="">resource
46940         name</var>, and the scheme <code title="">http</code> if <var title="">secure</var> is false and <code title="">https</code> if
46941         <var title="">secure</var> is true. <a href=#refsRFC2109>[RFC2109]</a> <a href=#refsRFC2965>[RFC2965]</a></span></dd>
46942    
    <li>  
46943    
46944      <p class="no-ja-translation" data-ja-hash="d9f049f9ca1cdf508e48da9e573a3aae"><span class=en-original lang=en><a href=#queue-a-task>Queue a task</a> to <a href=#fire-a-simple-event>fire a simple event</a>       <dt class="no-ja-translation" data-ja-hash="1c396c11c90f5314ccb9f6b830dcf717"><span class=en-original lang=en>Any other name</span></dt>
     named <code title=event-WebSocket-open><a href=#event-websocket-open>open</a></code> at the  
     <code><a href=#websocket>WebSocket</a></code> object.</span></p>  
46945    
46946     </li>       <dd class="no-ja-translation" data-ja-hash="99fa56b2f87409b3eebd0cc92507d7b0"><span class=en-original lang=en>Ignore it.</span></dd>
46947    
46948        </dl></li>
46949    
46950     <li>     <li>
46951    
# Line 46870  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 46955  Proxy-authorization: Basic ZWRuYW1vZGU6b
46955    
46956     </li>     </li>
46957    
46958    </ol><p class="no-ja-translation" data-ja-hash="9868d8fa8ff3e299f742c733a4c003cb"><span class=en-original lang=en>To <dfn id=fail-the-web-socket-connection>fail the Web Socket connection</dfn>, the user agent must    </ol><p class="no-ja-translation" data-ja-hash="40b83334c2d608d38d8e0b63a41de6a5"><span class=en-original lang=en>To <dfn id=fail-the-web-socket-connection>fail the Web Socket connection</dfn>, the user agent must
46959    <a href=#close-the-web-socket-connection>close the Web Socket connection</a>, and may report the    <a href=#close-the-web-socket-connection>close the Web Socket connection</a>, and may report the
46960    problem to the user (which would be especially useful for    problem to the user (which would be especially useful for
46961    developers). However, user agents must not convey the failure    developers). However, user agents must not convey the failure
46962    information to the script in a way distinguishable from the Web    information to the script that attempted the connection in a way
46963    Socket being closed normally.</span></p>    distinguishable from the Web Socket being closed normally.</span></p>
46964    
46965    
46966    <h6 id=data-framing class="no-ja-translation" data-ja-hash="778994daf2871f77e63f3443c972851c"><span class=en-original lang=en><span class=secno>7.3.4.1.2 </span>Data framing</span></h6>    <h6 id=data-framing class="no-ja-translation" data-ja-hash="778994daf2871f77e63f3443c972851c"><span class=en-original lang=en><span class=secno>7.3.5.2.2 </span>Data framing</span></h6>
46967    
46968    <p class="no-ja-translation" data-ja-hash="98b4a3c08bec40b49b1187ea0d2e6eda"><span class=en-original lang=en>Once a <a href=#web-socket-connection-is-established>Web Socket connection is established</a>, the    <p class="no-ja-translation" data-ja-hash="98b4a3c08bec40b49b1187ea0d2e6eda"><span class=en-original lang=en>Once a <a href=#web-socket-connection-is-established>Web Socket connection is established</a>, the
46969    user agent must run through the following state machine for the    user agent must run through the following state machine for the
# Line 46919  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47004  Proxy-authorization: Basic ZWRuYW1vZGU6b
47004         <li><p class="no-ja-translation" data-ja-hash="17319fb2be483f2462025ed3d006b7fd"><span class=en-original lang=en>Multiply <var title="">length</var> by 128, add <var title="">b<sub title="">v</sub></var> to that result, and store         <li><p class="no-ja-translation" data-ja-hash="17319fb2be483f2462025ed3d006b7fd"><span class=en-original lang=en>Multiply <var title="">length</var> by 128, add <var title="">b<sub title="">v</sub></var> to that result, and store
47005         the final result in <var title="">length</var>.</span></li>         the final result in <var title="">length</var>.</span></li>
47006    
47007         <li><p class="no-ja-translation" data-ja-hash="71f5e8a06bc1d20afd2cdaaaeceaba5b"><span class=en-original lang=en>If the high-order bit of <var title="">b</var> is set         <li><p class="no-ja-translation" data-ja-hash="b3360163188754c79cd7ad7116787fc4"><span class=en-original lang=en>If the high-order bit of <var title="">b</var> is set
47008         (i.e. if <var title="">b</var> <i title="">and</i>ed with 0x80         (i.e. if <var title="">b</var> <i title="">and</i>ed with 0x80
47009         returns 0x80), then return to the step above labeled <a href=#ws-cd-length>length</a>.</span></li>         returns 0x80), then return to the step above labeled <a href=#ws-cd-length><i>length</i></a>.</span></li>
47010    
47011         <li><p class="no-ja-translation" data-ja-hash="a51da9344aad1175495a2ecb13d8b29e"><span class=en-original lang=en>Read <var title="">length</var> bytes.</span></li>         <li><p class="no-ja-translation" data-ja-hash="a51da9344aad1175495a2ecb13d8b29e"><span class=en-original lang=en>Read <var title="">length</var> bytes.</span></li>
47012    
# Line 46943  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47028  Proxy-authorization: Basic ZWRuYW1vZGU6b
47028    
47029         <li id=ws-cd-data><p class="no-ja-translation" data-ja-hash="77897e18fc67ca8a17a6e3bf6f1a9c51"><span class=en-original lang=en><em>Data</em>: Read a byte, let <var title="">b</var> be that byte.</span></li>         <li id=ws-cd-data><p class="no-ja-translation" data-ja-hash="77897e18fc67ca8a17a6e3bf6f1a9c51"><span class=en-original lang=en><em>Data</em>: Read a byte, let <var title="">b</var> be that byte.</span></li>
47030    
47031         <li><p class="no-ja-translation" data-ja-hash="92f166193678410942139b150418aaff"><span class=en-original lang=en>If <var title="">b</var> is not 0xff, then append <var title="">b</var> to <var title="">raw data</var> and return to         <li><p class="no-ja-translation" data-ja-hash="964203f6c860e159666c077ba6f86279"><span class=en-original lang=en>If <var title="">b</var> is not 0xff, then append <var title="">b</var> to <var title="">raw data</var> and return to
47032         the previous step (labeled <a href=#ws-cd-data>data</a>).</span></li>         the previous step (labeled <a href=#ws-cd-data><i>data</i></a>).</span></li>
47033    
47034         <li><p class="no-ja-translation" data-ja-hash="dcc821f269fb5bcdea8a60dd438e2251"><span class=en-original lang=en>Interpret <var title="">raw data</var> as a UTF-8         <li><p class="no-ja-translation" data-ja-hash="dcc821f269fb5bcdea8a60dd438e2251"><span class=en-original lang=en>Interpret <var title="">raw data</var> as a UTF-8
47035         string, and store that string in <var title="">data</var>.</span></p>         string, and store that string in <var title="">data</var>.</span></p>
47036    
47037         <li><p class="no-ja-translation" data-ja-hash="0113e004c7f7e3d15156175dcd9f4e31"><span class=en-original lang=en>If <var title="">frame type</var> is 0x00, create an         <li><p class="no-ja-translation" data-ja-hash="2a5d42d043afe573024798ed7fb6c6ce"><span class=en-original lang=en>If <var title="">frame type</var> is 0x00, then <dfn id=a-message-has-been-received>a
47038         event that uses the <code><a href=#messageevent>MessageEvent</a></code> interface, with         message has been received</dfn> with text <var title="">data</var>.  Otherwise, discard the data.</span></li>
        the event name <code title=event-message><a href=#event-message>message</a></code>,  
        which does not bubble, is cancelable, has no default action,  
        and whose <code title=dom-MessageEvent-data><a href=#dom-messageevent-data>data</a></code>  
        attribute is set to <var title="">data</var>, and <a href=#queue-a-task>queue a  
        task</a> to dispatch it at the <code><a href=#websocket>WebSocket</a></code>  
        object. Otherwise, discard the data.</span></li>  
47039    
47040        </ol></dd>        </ol></dd>
47041    
# Line 46978  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47057  Proxy-authorization: Basic ZWRuYW1vZGU6b
47057    
47058     <li><p class="no-ja-translation" data-ja-hash="1ebac491391ca99d0eb87a15bebd09f3"><span class=en-original lang=en>Send a 0xff byte to the server.</span></li>     <li><p class="no-ja-translation" data-ja-hash="1ebac491391ca99d0eb87a15bebd09f3"><span class=en-original lang=en>Send a 0xff byte to the server.</span></li>
47059    
47060    </ol><p class="XXX no-ja-translation" data-ja-hash="cdb7257c89b37308a3f0bc3da47c025e"><span class=en-original lang=en>People often request the ability to send binary    </ol><!-- v2: People often request the ability to send binary blobs over
47061    blobs over this API; also, once the other postMessage() methods    this API; we should also look into allowing name/value pairs,
47062    support it, we should look into allowing name/value pairs, arrays,    arrays, and numbers using postMessage() instead of just strings and
47063    and numbers using postMessage() instead of just strings and binary    binary data. --><h5 id=server-side-requirements class="no-ja-translation" data-ja-hash="0647bde3a51eb63d72d908b151e17929"><span class=en-original lang=en><span class=secno>7.3.5.3 </span>Server-side requirements</span></h5>
   data.</span></p>  
   
   
   <h5 id=server-side-requirements class="no-ja-translation" data-ja-hash="0647bde3a51eb63d72d908b151e17929"><span class=en-original lang=en><span class=secno>7.3.4.2 </span>Server-side requirements</span></h5>  
47064    
47065    <p class="no-ja-translation" data-ja-hash="c74a346cc7a53414f846fc2a2bc1a380"><span class=en-original lang=en><em>This section only applies to servers.</em></span></p> <!-- XXX that's not a defined conformance class -->    <p class="no-ja-translation" data-ja-hash="c74a346cc7a53414f846fc2a2bc1a380"><span class=en-original lang=en><em>This section only applies to servers.</em></span></p> <!-- XXX that's not a defined conformance class -->
47066    
47067    <h6 id=minimal-handshake class="no-ja-translation" data-ja-hash="a14e603f60e616603f0b604a55af0e5c"><span class=en-original lang=en><span class=secno>7.3.4.2.1 </span>Minimal handshake</span></h6>    <h6 id=minimal-handshake class="no-ja-translation" data-ja-hash="a14e603f60e616603f0b604a55af0e5c"><span class=en-original lang=en><span class=secno>7.3.5.3.1 </span>Minimal handshake</span></h6>
47068    
47069    <p class="note no-ja-translation" data-ja-hash="bfba10fe0bf3a8a371b54c97a1dc75f5"><span class=en-original lang=en>This section describes the minimal requirements for    <p class="note no-ja-translation" data-ja-hash="bfba10fe0bf3a8a371b54c97a1dc75f5"><span class=en-original lang=en>This section describes the minimal requirements for
47070    a server-side implementation of Web Sockets.</span></p>    a server-side implementation of Web Sockets.</span></p>
# Line 47039  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47114  Proxy-authorization: Basic ZWRuYW1vZGU6b
47114    <p class="no-ja-translation" data-ja-hash="ede85e2d9a7499bdbb554793220726f6"><span class=en-original lang=en>If the connection isn't dropped at this point, go to the <a href=#ws-sd-framing>data framing</a> section.</span></p>    <p class="no-ja-translation" data-ja-hash="ede85e2d9a7499bdbb554793220726f6"><span class=en-original lang=en>If the connection isn't dropped at this point, go to the <a href=#ws-sd-framing>data framing</a> section.</span></p>
47115    
47116    
47117    <h6 id=handshake-details class="no-ja-translation" data-ja-hash="b8357c474ba2706bc2fb8d30aef53c13"><span class=en-original lang=en><span class=secno>7.3.4.2.2 </span>Handshake details</span></h6>    <h6 id=handshake-details class="no-ja-translation" data-ja-hash="b8357c474ba2706bc2fb8d30aef53c13"><span class=en-original lang=en><span class=secno>7.3.5.3.2 </span>Handshake details</span></h6>
47118    
47119    <p class="no-ja-translation" data-ja-hash="ced1e4abc4ca5b79242882ea79869b14"><span class=en-original lang=en>The previous section ignores the data that is transmitted by the    <p class="no-ja-translation" data-ja-hash="ced1e4abc4ca5b79242882ea79869b14"><span class=en-original lang=en>The previous section ignores the data that is transmitted by the
47120    client during the handshake.</span></p>    client during the handshake.</span></p>
# Line 47102  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47177  Proxy-authorization: Basic ZWRuYW1vZGU6b
47177    
47178     </dd>     </dd>
47179    
47180    </dl><h6 id=ws-sd-framing class="no-ja-translation" data-ja-hash="778994daf2871f77e63f3443c972851c"><span class=en-original lang=en><span class=secno>7.3.4.2.3 </span>Data framing</span></h6>    </dl><h6 id=ws-sd-framing class="no-ja-translation" data-ja-hash="778994daf2871f77e63f3443c972851c"><span class=en-original lang=en><span class=secno>7.3.5.3.3 </span>Data framing</span></h6>
47181    
47182    <p class="note no-ja-translation" data-ja-hash="b6750cb27c7e2affc88f417ed641202a"><span class=en-original lang=en>This section only describes how to handle content    <p class="note no-ja-translation" data-ja-hash="b6750cb27c7e2affc88f417ed641202a"><span class=en-original lang=en>This section only describes how to handle content
47183    that this specification allows user agents to send (text). It    that this specification allows user agents to send (text). It
# Line 47120  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47195  Proxy-authorization: Basic ZWRuYW1vZGU6b
47195     <li><p class="no-ja-translation" data-ja-hash="28c7bbf5b45b5d3bc1fb9a55c74b4c47"><span class=en-original lang=en>Let <var title="">raw data</var> be an empty byte     <li><p class="no-ja-translation" data-ja-hash="28c7bbf5b45b5d3bc1fb9a55c74b4c47"><span class=en-original lang=en>Let <var title="">raw data</var> be an empty byte
47196     array.</span></li>     array.</span></li>
47197    
47198     <li id=ws-sd-data><p class="no-ja-translation" data-ja-hash="77897e18fc67ca8a17a6e3bf6f1a9c51"><span class=en-original lang=en><em>Data</em>: Read a byte, let <var title="">b</var> be that byte.</span></li>     <li id=ws-sd-data><p class="no-ja-translation" data-ja-hash="107e1d9391afa00e403a7f05f0cc5de5"><span class=en-original lang=en><i>Data</i>: Read a byte, let <var title="">b</var> be that byte.</span></li>
47199    
47200     <li><p class="no-ja-translation" data-ja-hash="b6ef0fc0a3e85d16516e07221d92302b"><span class=en-original lang=en>If <var title="">b</var> is not 0xff, then append <var title="">b</var> to <var title="">raw data</var> and return to the     <li><p class="no-ja-translation" data-ja-hash="c050bf92fea8d99511a69a70430faab4"><span class=en-original lang=en>If <var title="">b</var> is not 0xff, then append <var title="">b</var> to <var title="">raw data</var> and return to the
47201     previous step (labeled <a href=#ws-sd-data>data</a>).</span></li>     previous step (labeled <a href=#ws-sd-data><i>data</i></a>).</span></li>
47202    
47203     <li><p class="no-ja-translation" data-ja-hash="04b792ecc7e0ae81214e40765e659ffc"><span class=en-original lang=en>Interpret <var title="">raw data</var> as a UTF-8 string,     <li><p class="no-ja-translation" data-ja-hash="04b792ecc7e0ae81214e40765e659ffc"><span class=en-original lang=en>Interpret <var title="">raw data</var> as a UTF-8 string,
47204     and apply whatever server-specific processing should occur for the     and apply whatever server-specific processing should occur for the
# Line 47131  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47206  Proxy-authorization: Basic ZWRuYW1vZGU6b
47206    
47207     <li><p class="no-ja-translation" data-ja-hash="6e0a2ad48383f02a92a4640eda86e9f3"><span class=en-original lang=en>Return to the first step to read the next byte.</span></li>     <li><p class="no-ja-translation" data-ja-hash="6e0a2ad48383f02a92a4640eda86e9f3"><span class=en-original lang=en>Return to the first step to read the next byte.</span></li>
47208    
47209    </ol><hr><p class="no-ja-translation" data-ja-hash="3adfbf4f41ab269b49eed194e5ce9526"><span class=en-original lang=en>The server should run through the followin steps to send strings    </ol><hr><p class="no-ja-translation" data-ja-hash="691b40f6a720afe82efe57cc25f86e9c"><span class=en-original lang=en>The server should run through the following steps to send strings
47210    to the client:</span></p>    to the client:</span></p>
47211    
47212    <ol><li><p class="no-ja-translation" data-ja-hash="9205f687212bc618bb1e797aad797f0e"><span class=en-original lang=en>Send a 0x00 byte to the client to indicate the start of a    <ol><li><p class="no-ja-translation" data-ja-hash="9205f687212bc618bb1e797aad797f0e"><span class=en-original lang=en>Send a 0x00 byte to the client to indicate the start of a
# Line 47143  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47218  Proxy-authorization: Basic ZWRuYW1vZGU6b
47218     <li><p class="no-ja-translation" data-ja-hash="ca216d445785fb0aa188b1d19f3037a1"><span class=en-original lang=en>Send a 0xff byte to the client to indicate the end of the     <li><p class="no-ja-translation" data-ja-hash="ca216d445785fb0aa188b1d19f3037a1"><span class=en-original lang=en>Send a 0xff byte to the client to indicate the end of the
47219     message.</span></li>     message.</span></li>
47220    
47221    </ol><h5 id=closing-the-connection class="no-ja-translation" data-ja-hash="0fd2411815a2d7368f7e215a028b3877"><span class=en-original lang=en><span class=secno>7.3.4.3 </span>Closing the connection</span></h5>    </ol><h5 id=closing-the-connection class="no-ja-translation" data-ja-hash="0fd2411815a2d7368f7e215a028b3877"><span class=en-original lang=en><span class=secno>7.3.5.4 </span>Closing the connection</span></h5>
47222    
47223    <p class="no-ja-translation" data-ja-hash="adf4f0ea5643d37fe87d85dcee797ec3"><span class=en-original lang=en>To <dfn id=close-the-web-socket-connection>close the Web Socket connection</dfn>, either the user    <p class="no-ja-translation" data-ja-hash="adf4f0ea5643d37fe87d85dcee797ec3"><span class=en-original lang=en>To <dfn id=close-the-web-socket-connection>close the Web Socket connection</dfn>, either the user
47224    agent or the server closes the TCP/IP connection. There is no    agent or the server closes the TCP/IP connection. There is no
# Line 47157  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47232  Proxy-authorization: Basic ZWRuYW1vZGU6b
47232    <p class="no-ja-translation" data-ja-hash="6f7e98cd8275bbe960c7d75619ab87e0"><span class=en-original lang=en>User agents should not <a href=#close-the-web-socket-connection>close the Web Socket    <p class="no-ja-translation" data-ja-hash="6f7e98cd8275bbe960c7d75619ab87e0"><span class=en-original lang=en>User agents should not <a href=#close-the-web-socket-connection>close the Web Socket
47233    connection</a> arbitrarily.</span></p>    connection</a> arbitrarily.</span></p>
47234    
   <p id=closeWebSocket class="no-ja-translation" data-ja-hash="89c7e2061f31ed5bf8cd84328b2a4237"><span class=en-original lang=en>When the <a href=#web-socket-connection-is-closed>Web Socket connection is  
   closed</a>, the <code title=dom-WebSocket-readyState><a href=#dom-websocket-readystate>readyState</a></code> attribute's value  
   must be changed to <code title=dom-WebSocket-CLOSED><a href=#dom-websocket-closed>CLOSED</a></code>  
   (2), and the user agent must <a href=#queue-a-task>queue a task</a> to <a href=#fire-a-simple-event>fire  
   a simple event</a> named <code title=event-WebSocket-close><a href=#event-websocket-close>close</a></code> at the  
   <code><a href=#websocket>WebSocket</a></code> object.</span></p>  
47235    
47236      <h5 id=security-considerations class="no-ja-translation" data-ja-hash="e267da5d3ce594aee233daa50baa6853"><span class=en-original lang=en><span class=secno>7.3.5.5 </span>Security considerations</span></h5>
47237    
47238      <p class="XXX no-ja-translation" data-ja-hash="2f43b42fd833d1e77420a8dae7419000"><span class=en-original lang=en>...</span></p>
47239    
47240    
47241    <h3 id=crossDocumentMessages class="no-ja-translation" data-ja-hash="3136ead84c45a13354c12358b21fb592"><span class=en-original lang=en><span class=secno>7.4 </span><dfn>Cross-document messaging</dfn></span></h3>    <h3 id=crossDocumentMessages class="no-ja-translation" data-ja-hash="3136ead84c45a13354c12358b21fb592"><span class=en-original lang=en><span class=secno>7.4 </span><dfn>Cross-document messaging</dfn></span></h3>
# Line 47183  Proxy-authorization: Basic ZWRuYW1vZGU6b Line 47255  Proxy-authorization: Basic ZWRuYW1vZGU6b
47255    messaging</a> is the <dfn id=posted-message-task-source>posted message task source</dfn>.</span></p>    messaging</a> is the <dfn id=posted-message-task-source>posted message task source</dfn>.</span></p>
47256    
47257    
47258    <h4 id=introduction-5 class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.4.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.4.1 </span>はじめに</span></h4>    <h4 id=introduction-6 class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.4.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.4.1 </span>はじめに</span></h4>
47259    
47260    <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>    <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>
47261    
# Line 47441  function receiver(e) { Line 47513  function receiver(e) {
47513    
47514    <h3 id=channel-messaging class="no-ja-translation" data-ja-hash="2add582aa37167b56d19a6860919a9fc"><span class=en-original lang=en><span class=secno>7.5 </span><dfn>Channel messaging</dfn></span></h3>    <h3 id=channel-messaging class="no-ja-translation" data-ja-hash="2add582aa37167b56d19a6860919a9fc"><span class=en-original lang=en><span class=secno>7.5 </span><dfn>Channel messaging</dfn></span></h3>
47515    
47516    <h4 id=introduction-6 class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.5.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.5.1 </span>はじめに</span></h4>    <h4 id=introduction-7 class="has-ja-translation" data-ja-hash="0b79795d3efc95b9976c7c5b933afce2"><span class=en-original lang=en><span class=secno>7.5.1 </span>Introduction</span><span class=ja-translation lang=ja><span class=secno>7.5.1 </span>はじめに</span></h4>
47517    
47518    <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>    <p class="has-ja-translation" data-ja-hash="585b83d0801ae75a14554d8d2c737fb2"><span class=en-original lang=en><em>This section is non-normative.</em></span><span class=ja-translation lang=ja><em>この節は規定の一部ではありません。</em></span></p>
47519    

Legend:
Removed from v.1.232  
changed lines
  Added in v.1.233

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24