Merge Anne's change: Oct 11, 2012, Redo AnonXMLHttpRequest as dictionary argument
authorJungkee Song <jungkee.song@samsung.com>
Mon, 12 Nov 2012 18:46:01 +0900
changeset 85 cff809cbf044
parent 84 9cb42e7aacd8
child 86 e9af69ec538e
Merge Anne's change: Oct 11, 2012, Redo AnonXMLHttpRequest as dictionary argument
Overview.html
Overview.src.html
--- a/Overview.html	Mon Nov 12 18:34:54 2012 +0900
+++ b/Overview.html	Mon Nov 12 18:46:01 2012 +0900
@@ -436,7 +436,11 @@
   "text"
 };
 
-[<a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">Constructor</a>]
+dictionary <dfn id="xmlhttprequestoptions">XMLHttpRequestOptions</dfn> {
+  boolean anon = false;
+};
+
+[<a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">Constructor</a>(optional <a href="#xmlhttprequestoptions">XMLHttpRequestOptions</a> <var title="">options</var>)]
 interface <dfn id="xmlhttprequest">XMLHttpRequest</dfn> : <a href="#xmlhttprequesteventtarget">XMLHttpRequestEventTarget</a> {
   // <a href="#event-handlers">event handler</a>
   attribute <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler">EventHandler</a> <a href="#handler-xhr-onreadystatechange" title="handler-xhr-onreadystatechange">onreadystatechange</a>;
@@ -468,10 +472,6 @@
   readonly attribute any <a href="#dom-xmlhttprequest-response" title="dom-XMLHttpRequest-response">response</a>;
   readonly attribute DOMString <a href="#dom-xmlhttprequest-responsetext" title="dom-XMLHttpRequest-responseText">responseText</a>;
   readonly attribute <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#document">Document</a>? <a href="#dom-xmlhttprequest-responsexml" title="dom-XMLHttpRequest-responseXML">responseXML</a>;
-};
-
-[<a href="#dom-anonxmlhttprequest" title="dom-AnonXMLHttpRequest">Constructor</a>]
-interface <dfn id="anonxmlhttprequest">AnonXMLHttpRequest</dfn> : <a href="#xmlhttprequest">XMLHttpRequest</a> {
 };</pre>
 
 
@@ -520,37 +520,34 @@
 
   <h3 id="constructors"><span class="secno">4.3 </span>Constructors</h3>
 
-
   <p>The <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object has an associated
   <dfn id="anonymous-flag">anonymous flag</dfn>. If the <a href="#anonymous-flag">anonymous flag</a> is set,
   <a href="#user-credentials">user credentials</a> and the
   <a href="#xmlhttprequest-origin"><code>XMLHttpRequest</code> origin</a> are not exposed when
-  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a> resources. It can
-  only be set to true by using the
-  <code title="dom-AnonXMLHttpRequest"><a href="#dom-anonxmlhttprequest">AnonXMLHttpRequest()</a></code>
-  constructor.</p>
-
+  <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch" title="fetch">fetching</a> resources.
 
   <dl class="domintro">
-   <dt><var title="">client</var> = new <code title="dom-XMLHttpRequest"><a href="#dom-xmlhttprequest">XMLHttpRequest</a></code>()</dt>
-   <dd>Returns a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object.</dd>
-
-   <dt><var title="">client</var> = new <code title="dom-AnonXMLHttpRequest"><a href="#dom-anonxmlhttprequest">AnonXMLHttpRequest</a></code>()</dt>
-   <dd>Returns a new <code><a href="#anonxmlhttprequest">AnonXMLHttpRequest</a></code> object that has the
-   <a href="#anonymous-flag">anonymous flag</a> set.</dd>
-
+    <dt><code><var title="">client</var> = new <a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">XMLHttpRequest</a>()</code>
+    <dd>Returns a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object.
+
+    <dt><code><var title="">client</var> = new <a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">XMLHttpRequest</a>({anon:true})</code>
+    <dd>Returns a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object that has its
+    <a href="#anonymous-flag">anonymous flag</a> set.
   </dl>
 
-  <p>The <dfn id="dom-xmlhttprequest" title="dom-XMLHttpRequest"><code>XMLHttpRequest()</code></dfn>
-  constructor must return a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object.
-
-
   <p>The
-  <dfn id="dom-anonxmlhttprequest" title="dom-AnonXMLHttpRequest"><code>AnonXMLHttpRequest()</code></dfn>
-  constructor must return a new <code><a href="#anonxmlhttprequest">AnonXMLHttpRequest</a></code> object with
-  its <a href="#anonymous-flag">anonymous flag</a> set.</p>
-
-
+  <dfn id="dom-xmlhttprequest" title="dom-XMLHttpRequest"><code>XMLHttpRequest(<var title="">options</var>)</code></dfn>
+  constructor must run these steps:
+
+  <ol>
+    <li><p>Let <var title="">xhr</var> be a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code>
+    object.
+
+    <li><p>If <var title="">options</var>'s <code title="">anon</code> member is
+    true, set <var title="">xhr</var>'s <a href="#anonymous-flag">anonymous flag</a>.
+
+    <li><p>Return <var title="">xhr</var>.
+  </ol>
 
 
 <h3 id="garbage-collection"><span class="secno">4.4 </span>Garbage collection</h3>
--- a/Overview.src.html	Mon Nov 12 18:34:54 2012 +0900
+++ b/Overview.src.html	Mon Nov 12 18:46:01 2012 +0900
@@ -400,7 +400,11 @@
   "text"
 };
 
-[<span title="dom-XMLHttpRequest">Constructor</span>]
+dictionary <dfn>XMLHttpRequestOptions</dfn> {
+  boolean anon = false;
+};
+
+[<span title="dom-XMLHttpRequest">Constructor</span>(optional <span>XMLHttpRequestOptions</span> <var title>options</var>)]
 interface <dfn id="xmlhttprequest">XMLHttpRequest</dfn> : <span>XMLHttpRequestEventTarget</span> {
   // <a href="#event-handlers">event handler</a>
   attribute <span data-anolis-spec=html>EventHandler</span> <span title="handler-xhr-onreadystatechange">onreadystatechange</span>;
@@ -432,10 +436,6 @@
   readonly attribute any <span title="dom-XMLHttpRequest-response">response</span>;
   readonly attribute DOMString <span title="dom-XMLHttpRequest-responseText">responseText</span>;
   readonly attribute <span data-anolis-spec=dom>Document</span>? <span title="dom-XMLHttpRequest-responseXML">responseXML</span>;
-};
-
-[<span title="dom-AnonXMLHttpRequest">Constructor</span>]
-interface <dfn id="anonxmlhttprequest">AnonXMLHttpRequest</dfn> : <span>XMLHttpRequest</span> {
 };</pre>
 
 
@@ -484,37 +484,34 @@
 
   <h3 id="constructors">Constructors</h3>
 
-
   <p>The <code>XMLHttpRequest</code> object has an associated
   <dfn>anonymous flag</dfn>. If the <span>anonymous flag</span> is set,
   <span>user credentials</span> and the
   <span><code>XMLHttpRequest</code> origin</span> are not exposed when
-  <span data-anolis-spec=html title=fetch>fetching</span> resources. It can
-  only be set to true by using the
-  <code title="dom-AnonXMLHttpRequest">AnonXMLHttpRequest()</code>
-  constructor.</p>
-
+  <span data-anolis-spec=html title=fetch>fetching</span> resources.
 
   <dl class="domintro">
-   <dt><var title>client</var> = new <code title="dom-XMLHttpRequest">XMLHttpRequest</code>()</dt>
-   <dd>Returns a new <code>XMLHttpRequest</code> object.</dd>
-
-   <dt><var title>client</var> = new <code title="dom-AnonXMLHttpRequest">AnonXMLHttpRequest</code>()</dt>
-   <dd>Returns a new <code>AnonXMLHttpRequest</code> object that has the
-   <span>anonymous flag</span> set.</dd>
-
+    <dt><code><var title>client</var> = new <span title="dom-XMLHttpRequest">XMLHttpRequest</span>()</code>
+    <dd>Returns a new <code>XMLHttpRequest</code> object.
+
+    <dt><code><var title>client</var> = new <span title="dom-XMLHttpRequest">XMLHttpRequest</span>({anon:true})</code>
+    <dd>Returns a new <code>XMLHttpRequest</code> object that has its
+    <span>anonymous flag</span> set.
   </dl>
 
-  <p>The <dfn title="dom-XMLHttpRequest"><code>XMLHttpRequest()</code></dfn>
-  constructor must return a new <code>XMLHttpRequest</code> object.
-
-
   <p>The
-  <dfn title="dom-AnonXMLHttpRequest"><code>AnonXMLHttpRequest()</code></dfn>
-  constructor must return a new <code>AnonXMLHttpRequest</code> object with
-  its <span>anonymous flag</span> set.</p>
-
-
+  <dfn title="dom-XMLHttpRequest"><code>XMLHttpRequest(<var title>options</var>)</code></dfn>
+  constructor must run these steps:
+
+  <ol>
+    <li><p>Let <var title>xhr</var> be a new <code>XMLHttpRequest</code>
+    object.
+
+    <li><p>If <var title>options</var>'s <code title>anon</code> member is
+    true, set <var title>xhr</var>'s <span>anonymous flag</span>.
+
+    <li><p>Return <var title>xhr</var>.
+  </ol>
 
 
 <h3>Garbage collection</h3>