Skip to content

Commit

Permalink
Fetch is the new CORS (and more). Also fix a few minor bugs thanks to @…
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Oct 24, 2013
1 parent db99f8b commit 9b60830
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 39 deletions.
43 changes: 21 additions & 22 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="//www.whatwg.org/"><img alt="WHATWG" height="100" src="//resources.whatwg.org/logo-xhr.svg" width="100"></a>
<h1 class="head" id="xmlhttprequest-ls">XMLHttpRequest</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-22-october-2013">Living Standard — Last Updated 22 October 2013</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-24-october-2013">Living Standard — Last Updated 24 October 2013</h2>

<dl>
<dt>This Version:
Expand Down Expand Up @@ -36,7 +36,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-22-october-2013">
<p class="copyright"><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><img alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/80x15.png"></a>
To the extent possible under law, the editor has waived all copyright and
related or neighboring rights to this work. In addition, as of
22 October 2013, the editor has made this specification available
24 October 2013, the editor has made this specification available
under the
<a href="http://www.openwebfoundation.org/legal/the-owf-1-0-agreements/owfa-1-0" rel="license">Open Web Foundation Agreement Version 1.0</a>,
which is available at
Expand Down Expand Up @@ -216,14 +216,14 @@ <h3 id="extensibility"><span class="secno">2.1 </span>Extensibility</h3>

<h2 id="terminology"><span class="secno">3 </span>Terminology</h2>

<p>This specification heavily borrows terminology, from
Cross-Origin Resource Sharing, DOM, DOM Parsing and Serialization, Encoding,
File API, HTML, HTTP, Typed Array, URL, Web IDL, and XML.
<p>This specification heavily borrows terminology, from DOM,
DOM Parsing and Serialization, Encoding, Fetch, File API, HTML, HTTP, Typed Array, URL,
Web IDL, and XML.

<a href="#refsCORS">[CORS]</a>
<a href="#refsDOM">[DOM]</a>
<a href="#refsDOMPS">[DOMPS]</a>
<a href="#refsENCODING">[ENCODING]</a>
<a href="#refsFETCH">[FETCH]</a>
<a href="#refsFILEAPI">[FILEAPI]</a>
<a href="#refsHTML">[HTML]</a>
<a href="#refsHTTP">[HTTP]</a>
Expand Down Expand Up @@ -1468,11 +1468,11 @@ <h4 id="the-getresponseheader()-method"><span class="secno">4.6.3 </span>The <co
<li><p>Return null.
</ol>

<p class="note">The Cross-Origin Resource Sharing specification filters
<p class="note">The Fetch specification filters
<a href="#concept-response-header" title="concept-response-header">response headers</a> exposed by
<code title="dom-XMLHttpRequest-getAllResponseHeaders"><a href="#dom-xmlhttprequest-getallresponseheaders">getAllResponseHeaders()</a></code>
for <a class="external" href="http://www.w3.org/TR/2013/CR-cors-20130129/#cross-origin-request" title="cross-origin request">cross-origin requests</a>.
<a href="#refsCORS">[CORS]</a>
<code title="dom-XMLHttpRequest-getResponseHeader"><a href="#dom-xmlhttprequest-getresponseheader">getResponseHeader()</a></code>
for cross-origin requests.
<a href="#refsFETCH">[FETCH]</a>

<div class="example">

Expand Down Expand Up @@ -1521,11 +1521,11 @@ <h4 id="the-getallresponseheaders()-method"><span class="secno">4.6.4 </span>The
U+003A COLON U+0020 SPACE pair.
</ol>

<p class="note">The Cross-Origin Resource Sharing specification filters
<p class="note">The Fetch specification filters
<a href="#concept-response-header" title="concept-response-header">response headers</a> exposed by
<code title="dom-XMLHttpRequest-getAllResponseHeaders"><a href="#dom-xmlhttprequest-getallresponseheaders">getAllResponseHeaders()</a></code>
for <a class="external" href="http://www.w3.org/TR/2013/CR-cors-20130129/#cross-origin-request" title="cross-origin request">cross-origin requests</a>.
<a href="#refsCORS">[CORS]</a>
for cross-origin requests.
<a href="#refsFETCH">[FETCH]</a>

<div class="example">
<p>For the following script:
Expand Down Expand Up @@ -2074,12 +2074,12 @@ <h3 id="events"><span class="secno">4.7 </span>Events summary</h3>

<h2 id="interface-formdata"><span class="secno">5 </span>Interface <code title="">FormData</code></h2>

<pre class="idl">typedef (<a class="external" href="http://dev.w3.org/2006/webapi/FileAPI/#file">File</a> or DOMString) <dfn id="formdataentryvalue">FormDataEntryValue</dfn>;
<pre class="idl">typedef (<a class="external" href="http://dev.w3.org/2006/webapi/FileAPI/#file">File</a> or [EnsureUTF16] DOMString) <dfn id="formdataentryvalue">FormDataEntryValue</dfn>;

[<a href="#dom-formdata" title="dom-FormData">Constructor</a>(optional <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#htmlformelement">HTMLFormElement</a> <var>form</var>)]
interface <dfn id="formdata">FormData</dfn> {
void <a href="#dom-formdata-append" title="dom-FormData-append">append</a>([EnsureUTF16] DOMString <var>name</var>, <a class="external" href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a> <var>value</var>, optional [EnsureUTF16] DOMString <var>filename</var>);
void <a href="#dom-formdata-append" title="dom-FormData-append">append</a>(DOMString <var>name</var>, [EnsureUTF16] DOMString <var>value</var>);
void <a href="#dom-formdata-append" title="dom-FormData-append">append</a>([EnsureUTF16] DOMString <var>name</var>, [EnsureUTF16] DOMString <var>value</var>);
void <a href="#dom-formdata-delete" title="dom-FormData-delete">delete</a>([EnsureUTF16] DOMString <var>name</var>);
<a href="#formdataentryvalue">FormDataEntryValue</a>? <a href="#dom-formdata-get" title="dom-FormData-get">get</a>([EnsureUTF16] DOMString <var>name</var>);
sequence&lt;<a href="#formdataentryvalue">FormDataEntryValue</a>&gt; <a href="#dom-formdata-getall" title="dom-FormData-getAll">getAll</a>([EnsureUTF16] DOMString <var>name</var>);
Expand Down Expand Up @@ -2342,13 +2342,12 @@ <h3 id="suggested-names-for-events-using-the-progressevent-interface"><span clas

<h3 id="security-considerations"><span class="secno">6.4 </span>Security Considerations</h3>

<p>For cross-origin requests some kind of opt-in, e.g.
Cross-Origin Resource Sharing, has to be used before
<p>For cross-origin requests some kind of opt-in, e.g. Fetch, has to be used before
<a class="external" href="http://dom.spec.whatwg.org/#concept-event" title="concept-event">events</a> using the
<code><a href="#progressevent">ProgressEvent</a></code> interface are
<a class="external" href="http://dom.spec.whatwg.org/#concept-event-dispatch" title="concept-event-dispatch">dispatched</a>
as information (e.g. size) would be revealed that cannot be obtained
otherwise. <a class="informative" href="#refsCORS">[CORS]</a>
otherwise. <a class="informative" href="#refsFETCH">[FETCH]</a>


<h3 id="example"><span class="secno">6.5 </span>Example</h3>
Expand Down Expand Up @@ -2427,9 +2426,6 @@ <h2 class="no-num" id="references">References</h2>
<div id="anolis-references"><dl><dt id="refsCOOKIES">[COOKIES]
<dd><cite><a href="http://tools.ietf.org/html/rfc6265">HTTP State Management Mechanism</a></cite>, Adam Barth. IETF.

<dt id="refsCORS">[CORS]
<dd><cite><a href="http://www.w3.org/TR/cors/">CORS (obsolete)</a></cite>, Anne van Kesteren. W3C.

<dt id="refsDOM">[DOM]
<dd><cite><a href="http://dom.spec.whatwg.org/">DOM</a></cite>, Anne van Kesteren, Aryeh Gregor and Ms2ger. WHATWG.

Expand All @@ -2442,6 +2438,9 @@ <h2 class="no-num" id="references">References</h2>
<dt id="refsENCODING">[ENCODING]
<dd><cite><a href="http://encoding.spec.whatwg.org/">Encoding</a></cite>, Anne van Kesteren. WHATWG.

<dt id="refsFETCH">[FETCH]
<dd><cite><a href="http://fetch.spec.whatwg.org/">Fetch</a></cite>, Anne van Kesteren. WHATWG.

<dt id="refsFILEAPI">[FILEAPI]
<dd><cite><a href="http://dev.w3.org/2006/webapi/FileAPI/">File API</a></cite>, Arun Ranganathan and Jonas Sicking. W3C.

Expand Down Expand Up @@ -2534,7 +2533,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
Joe Farro,
Jonas Sicking,
Julian Reschke,
Jungkee Song,
송정기 (Jungkee Song),
呂康豪 (Kang-Hao Lu),
Karl Dubost,
Lachlan Hunt,
Expand Down
33 changes: 16 additions & 17 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ <h3 id="extensibility">Extensibility</h3>

<h2 id="terminology">Terminology</h2>

<p>This specification heavily borrows terminology, from
Cross-Origin Resource Sharing, DOM, DOM Parsing and Serialization, Encoding,
File API, HTML, HTTP, Typed Array, URL, Web IDL, and XML.
<p>This specification heavily borrows terminology, from DOM,
DOM Parsing and Serialization, Encoding, Fetch, File API, HTML, HTTP, Typed Array, URL,
Web IDL, and XML.

<span data-anolis-ref>CORS</span>
<span data-anolis-ref>DOM</span>
<span data-anolis-ref>DOMPS</span>
<span data-anolis-ref>ENCODING</span>
<span data-anolis-ref>FETCH</span>
<span data-anolis-ref>FILEAPI</span>
<span data-anolis-ref>HTML</span>
<span data-anolis-ref>HTTP</span>
Expand Down Expand Up @@ -1422,11 +1422,11 @@ <h4>The <code title>getResponseHeader()</code> method</h4>
<li><p>Return null.
</ol>

<p class=note>The Cross-Origin Resource Sharing specification filters
<p class=note>The Fetch specification filters
<span title=concept-response-header>response headers</span> exposed by
<code title="dom-XMLHttpRequest-getAllResponseHeaders">getAllResponseHeaders()</code>
for <span data-anolis-spec=cors title="cross-origin request">cross-origin requests</span>.
<span data-anolis-ref>CORS</span>
<code title="dom-XMLHttpRequest-getResponseHeader">getResponseHeader()</code>
for cross-origin requests.
<span data-anolis-ref>FETCH</span>

<div class="example">

Expand Down Expand Up @@ -1475,11 +1475,11 @@ <h4>The <code title>getAllResponseHeaders()</code> method</h4>
U+003A COLON U+0020 SPACE pair.
</ol>

<p class=note>The Cross-Origin Resource Sharing specification filters
<p class=note>The Fetch specification filters
<span title=concept-response-header>response headers</span> exposed by
<code title="dom-XMLHttpRequest-getAllResponseHeaders">getAllResponseHeaders()</code>
for <span data-anolis-spec=cors title="cross-origin request">cross-origin requests</span>.
<span data-anolis-ref>CORS</span>
for cross-origin requests.
<span data-anolis-ref>FETCH</span>

<div class="example">
<p>For the following script:
Expand Down Expand Up @@ -2028,12 +2028,12 @@ <h3 id="events">Events summary</h3>

<h2>Interface <code title>FormData</code></h2>

<pre class="idl">typedef (<span data-anolis-spec=fileapi>File</span> or DOMString) <dfn>FormDataEntryValue</dfn>;
<pre class="idl">typedef (<span data-anolis-spec=fileapi>File</span> or [EnsureUTF16] DOMString) <dfn>FormDataEntryValue</dfn>;

[<span title="dom-FormData">Constructor</span>(optional <span data-anolis-spec=html>HTMLFormElement</span> <var>form</var>)]
interface <dfn>FormData</dfn> {
void <span title="dom-FormData-append">append</span>([EnsureUTF16] DOMString <var>name</var>, <span data-anolis-spec=fileapi>Blob</span> <var>value</var>, optional [EnsureUTF16] DOMString <var>filename</var>);
void <span title="dom-FormData-append">append</span>(DOMString <var>name</var>, [EnsureUTF16] DOMString <var>value</var>);
void <span title="dom-FormData-append">append</span>([EnsureUTF16] DOMString <var>name</var>, [EnsureUTF16] DOMString <var>value</var>);
void <span title=dom-FormData-delete>delete</span>([EnsureUTF16] DOMString <var>name</var>);
<span>FormDataEntryValue</span>? <span title=dom-FormData-get>get</span>([EnsureUTF16] DOMString <var>name</var>);
sequence&lt;<span>FormDataEntryValue</span>> <span title=dom-FormData-getAll>getAll</span>([EnsureUTF16] DOMString <var>name</var>);
Expand Down Expand Up @@ -2296,13 +2296,12 @@ <h3>Suggested names for events using the <code title="">ProgressEvent</code> int

<h3>Security Considerations</h3>

<p>For cross-origin requests some kind of opt-in, e.g.
Cross-Origin Resource Sharing, has to be used before
<p>For cross-origin requests some kind of opt-in, e.g. Fetch, has to be used before
<span data-anolis-spec=dom title=concept-event>events</span> using the
<code>ProgressEvent</code> interface are
<span data-anolis-spec=dom title=concept-event-dispatch>dispatched</span>
as information (e.g. size) would be revealed that cannot be obtained
otherwise. <span data-anolis-ref class=informative>CORS</span>
otherwise. <span data-anolis-ref class=informative>FETCH</span>


<h3>Example</h3>
Expand Down Expand Up @@ -2436,7 +2435,7 @@ <h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
Joe Farro,
Jonas Sicking,
Julian Reschke,
Jungkee Song,
송정기 (Jungkee Song),
呂康豪 (Kang-Hao Lu),
Karl Dubost,
Lachlan Hunt,
Expand Down

0 comments on commit 9b60830

Please sign in to comment.