Merge WHATWG change: Syncing with the new settings object concept from HTML.
authorJungkee Song <jungkee.song@samsung.com>
Fri, 22 Nov 2013 17:27:30 +0900
changeset 154 af78eda2c6c3
parent 153 18f2f1c5c8d7
child 155 3c6ed2f44efe
Merge WHATWG change: Syncing with the new settings object concept from HTML.
Overview.html
Overview.src.html
data/xrefs/dom/html-generated.json
data/xrefs/dom/xhr.json
xhr-1/Overview.html
xhr-1/Overview.src.html
xhr-1/data/xrefs/dom/html-generated.json
xhr-1/data/xrefs/dom/xhr.json
--- a/Overview.html	Fri Nov 22 16:31:45 2013 +0900
+++ b/Overview.html	Fri Nov 22 17:27:30 2013 +0900
@@ -511,10 +511,8 @@
   <a href="#source-origin">source origin</a> are not exposed when
   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#fetch" title="fetch">fetching</a> resources.
 
-  <p>When the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a>
-  is a <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, the
-  <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object has an associated
-  <dfn id="concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</dfn>.
+  <p>The <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object has an associated
+  <dfn id="concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</dfn>.
 
   <dl class="domintro">
     <dt><code><var title="">client</var> = new <a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">XMLHttpRequest</a>()</code>
@@ -536,13 +534,10 @@
     <li><p>If <var title="">options</var>'s <code title="">anonymous</code> member is
     true, set <var title="">xhr</var>'s <a href="#anonymous-flag">anonymous flag</a>.
 
-    <li><p>If the
-    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, set <var title="">xhr</var>'s
-    <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> to the
-    <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>
-    associated with the global object of <var title="">xhr</var>'s interface
-    object.
+    <li><p>Set <var title="">xhr</var>'s
+    <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a> to the
+    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#relevant-settings-object-for-a-global-object" title="relevant settings object for a global object">relevant settings object</a>
+    for the global object of <var title="">xhr</var>'s interface object.
 
     <li><p>Return <var title="">xhr</var>.
   </ol>
@@ -771,45 +766,29 @@
 method must run these steps:
 
 <ol>
- <li><p>Let <var title="">base</var> be null.
-
- <li>
-  <p>If the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-  <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, run these steps:
-
-  <ol>
-   <li><p>If <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> is not
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#fully-active">fully active</a>,
-   <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
-   "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
-
-   <li><p>Set <var title="">base</var> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#document-base-url">document base URL</a> of
-   <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
-
-   <li><p>Set <a href="#source-origin">source origin</a> to a globally unique identifier if the
-   <a href="#anonymous-flag">anonymous flag</a> is set, and the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#origin">origin</a>
-   of <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> otherwise.
-
-   <li><p>Set <a href="#referrer-source">referrer source</a> to
-   <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
-  </ol>
-
- <li>
-  <p>If the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-  <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#worker-environment">worker environment</a>, run these steps:
-
-  <ol>
-   <li><p>Set <var title="">base</var> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#script's-base-url">script's base URL</a>.
-
-   <li><p>Set <a href="#source-origin">source origin</a> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#concept-script" title="concept-script">script</a>'s
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#origin">origin</a>.
-
-   <li><p>Set <a href="#referrer-source">referrer source</a> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#script's-referrer-source">script's referrer source</a>.
-  </ol>
+ <li><p>If <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#responsible-document">responsible document</a> is not
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#fully-active">fully active</a>,
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
+
+ <li><p>Set <var title="">base</var> to
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-base-url">API base URL</a>.
+
+ <li><p>Set <a href="#source-origin">source origin</a> to
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#origin">origin</a>.
+
+ <li><p>Set <a href="#referrer-source">referrer source</a> to the
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a>'s
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document-url" title="concept-document-url">URL</a> if
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a> is a
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>, and
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a> otherwise.
 
  <li><p>If <var>method</var> does not match the <a class="external" href="http://tools.ietf.org/html/rfc2616/#section-5.1.1">Method</a>
  token production, <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> a JavaScript <code class="external"><a href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-predefined-exception">TypeError</a></code>.
@@ -2140,7 +2119,7 @@
   <dfn id="blob-response-entity-body">blob response entity body</dfn> is either a
   <code class="external"><a href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a></code> representing the
   <a href="#response-entity-body">response entity body</a> or null. If the <a href="#blob-response-entity-body">blob response entity body</a>
-  is null, let it be the return value of the following algorithm:</p>
+  is null, set it to the return value of the following algorithm:</p>
 
   <ol>
    <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return an empty
@@ -2156,7 +2135,7 @@
   <dfn id="document-response-entity-body">document response entity body</dfn>
   is either a <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>
   representing the <a href="#response-entity-body">response entity body</a> or null. If the
-  <a href="#document-response-entity-body">document response entity body</a> is null, let it be the return value of the
+  <a href="#document-response-entity-body">document response entity body</a> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
@@ -2246,7 +2225,7 @@
 
 <p>The <dfn id="json-response-entity-body">JSON response entity body</dfn> is either a JavaScript value
 representing the <a href="#response-entity-body">response entity body</a>. If the
-<a href="#json-response-entity-body">JSON response entity body</a> is null, let it be return value of the following
+<a href="#json-response-entity-body">JSON response entity body</a> is null, set it to the return value of the following
 algorithm:</p>
 
 <ol>
@@ -2263,7 +2242,7 @@
 
   <p>The <dfn id="text-response-entity-body">text response entity body</dfn> is either a
   string representing the <a href="#response-entity-body">response entity body</a> or null. If the
-  <a href="#text-response-entity-body">text response entity body</a> is null, let it be the return value of the
+  <a href="#text-response-entity-body">text response entity body</a> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
--- a/Overview.src.html	Fri Nov 22 16:31:45 2013 +0900
+++ b/Overview.src.html	Fri Nov 22 17:27:30 2013 +0900
@@ -520,10 +520,8 @@
   <span>source origin</span> are not exposed when
   <span data-anolis-spec=html title=fetch>fetching</span> resources.
 
-  <p>When the <span data-anolis-spec=html>JavaScript global environment</span>
-  is a <span data-anolis-spec=html>document environment</span>, the
-  <code>XMLHttpRequest</code> object has an associated
-  <dfn title=concept-XMLHttpRequest-document>document</dfn>.
+  <p>The <code>XMLHttpRequest</code> object has an associated
+  <dfn title=concept-XMLHttpRequest-settings-object>settings object</dfn>.
 
   <dl class=domintro>
     <dt><code><var title>client</var> = new <span title=dom-XMLHttpRequest>XMLHttpRequest</span>()</code>
@@ -545,13 +543,10 @@
     <li><p>If <var title>options</var>'s <code title>anonymous</code> member is
     true, set <var title>xhr</var>'s <span>anonymous flag</span>.
 
-    <li><p>If the
-    <span data-anolis-spec=html>JavaScript global environment</span> is a
-    <span data-anolis-spec=html>document environment</span>, set <var title>xhr</var>'s
-    <span title=concept-XMLHttpRequest-document>document</span> to the
-    <span data-anolis-spec=dom title=concept-document>document</span>
-    associated with the global object of <var title>xhr</var>'s interface
-    object.
+    <li><p>Set <var title>xhr</var>'s
+    <span title=concept-XMLHttpRequest-settings-object>settings object</span> to the
+    <span data-anolis-spec=html title="relevant settings object for a global object">relevant settings object</span>
+    for the global object of <var title>xhr</var>'s interface object.
 
     <li><p>Return <var title>xhr</var>.
   </ol>
@@ -780,45 +775,29 @@
 method must run these steps:
 
 <ol>
- <li><p>Let <var title>base</var> be null.
-
- <li>
-  <p>If the <span data-anolis-spec=html>JavaScript global environment</span> is a
-  <span data-anolis-spec=html>document environment</span>, run these steps:
-
-  <ol>
-   <li><p>If <span title=concept-XMLHttpRequest-document>document</span> is not
-   <span data-anolis-spec=html>fully active</span>,
-   <span data-anolis-spec=dom title=concept-throw>throw</span> an
-   "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
-
-   <li><p>Set <var title>base</var> to the
-   <span data-anolis-spec=html>document base URL</span> of
-   <span title=concept-XMLHttpRequest-document>document</span>.
-
-   <li><p>Set <span>source origin</span> to a globally unique identifier if the
-   <span>anonymous flag</span> is set, and the <span data-anolis-spec=html>origin</span>
-   of <span title=concept-XMLHttpRequest-document>document</span> otherwise.
-
-   <li><p>Set <span>referrer source</span> to
-   <span title=concept-XMLHttpRequest-document>document</span>.
-  </ol>
-
- <li>
-  <p>If the <span data-anolis-spec=html>JavaScript global environment</span> is a
-  <span data-anolis-spec=html>worker environment</span>, run these steps:
-
-  <ol>
-   <li><p>Set <var title>base</var> to the
-   <span data-anolis-spec=html>script's base URL</span>.
-
-   <li><p>Set <span>source origin</span> to the
-   <span data-anolis-spec=html title=concept-script>script</span>'s
-   <span data-anolis-spec=html>origin</span>.
-
-   <li><p>Set <span>referrer source</span> to the
-   <span data-anolis-spec=html>script's referrer source</span>.
-  </ol>
+ <li><p>If <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>responsible document</span> is not
+ <span data-anolis-spec=html>fully active</span>,
+ <span data-anolis-spec=dom title=concept-throw>throw</span> an
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
+
+ <li><p>Set <var title>base</var> to
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API base URL</span>.
+
+ <li><p>Set <span>source origin</span> to
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>origin</span>.
+
+ <li><p>Set <span>referrer source</span> to the
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span>'s
+ <span data-anolis-spec=dom title=concept-document-url>URL</span> if
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span> is a
+ <span data-anolis-spec=dom title=concept-document>document</span>, and
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span> otherwise.
 
  <li><p>If <var>method</var> does not match the <span data-anolis-spec=http>Method</span>
  token production, <span data-anolis-spec=dom title=concept-throw>throw</span> a JavaScript <code data-anolis-spec=webidl>TypeError</code>.
@@ -2149,7 +2128,7 @@
   <dfn id="blob-response-entity-body">blob response entity body</dfn> is either a
   <code data-anolis-spec=fileapi>Blob</code> representing the
   <span>response entity body</span> or null. If the <span>blob response entity body</span>
-  is null, let it be the return value of the following algorithm:</p>
+  is null, set it to the return value of the following algorithm:</p>
 
   <ol>
    <li><p>If the <span>response entity body</span> is null, return an empty
@@ -2165,7 +2144,7 @@
   <dfn id="document-response-entity-body">document response entity body</dfn>
   is either a <span data-anolis-spec=dom title=concept-document>document</span>
   representing the <span>response entity body</span> or null. If the
-  <span>document response entity body</span> is null, let it be the return value of the
+  <span>document response entity body</span> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
@@ -2255,7 +2234,7 @@
 
 <p>The <dfn>JSON response entity body</dfn> is either a JavaScript value
 representing the <span>response entity body</span>. If the
-<span>JSON response entity body</span> is null, let it be return value of the following
+<span>JSON response entity body</span> is null, set it to the return value of the following
 algorithm:</p>
 
 <ol>
@@ -2272,7 +2251,7 @@
 
   <p>The <dfn id="text-response-entity-body">text response entity body</dfn> is either a
   string representing the <span>response entity body</span> or null. If the
-  <span>text response entity body</span> is null, let it be the return value of the
+  <span>text response entity body</span> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
--- a/data/xrefs/dom/html-generated.json	Fri Nov 22 16:31:45 2013 +0900
+++ b/data/xrefs/dom/html-generated.json	Fri Nov 22 17:27:30 2013 +0900
@@ -10,6 +10,8 @@
     "allowed to show a pop-up": "browsers.html#allowed-to-show-a-pop-up",
     "already started": "scripting-1.html#already-started",
     "ancestor browsing context": "browsers.html#ancestor-browsing-context",
+    "api base url": "text-level-semantics.html#api-base-url",
+    "api referrer source": "text-level-semantics.html#api-referrer-source",
     "applet": "obsolete.html#the-applet-element",
     "application cache": "offline.html#application-cache",
     "area": "the-map-element.html#the-area-element",
@@ -468,8 +470,10 @@
     "presentational hints": "rendering.html#presentational-hints",
     "progress": "the-button-element.html#the-progress-element",
     "queue a task": "webappapis.html#queue-a-task",
+    "relevant settings object for a global object": "text-level-semantics.html#relevant-settings-object-for-a-global-object",
     "rel-icon": "links.html#rel-icon",
     "resolve a url": "urls.html#resolve-a-url",
+    "responsible document": "text-level-semantics.html#responsible-document",
     "rp": "text-level-semantics.html#the-rp-element",
     "rt": "text-level-semantics.html#the-rt-element",
     "ruby": "text-level-semantics.html#the-ruby-element",
--- a/data/xrefs/dom/xhr.json	Fri Nov 22 16:31:45 2013 +0900
+++ b/data/xrefs/dom/xhr.json	Fri Nov 22 17:27:30 2013 +0900
@@ -9,7 +9,7 @@
     "concept-formdata-entry-name": "concept-formdata-entry-name",
     "concept-formdata-entry-value": "concept-formdata-entry-value",
     "concept-response-header": "concept-response-header",
-    "concept-xmlhttprequest-document": "concept-xmlhttprequest-document",
+    "concept-xmlhttprequest-settings-object": "concept-xmlhttprequest-settings-object",
     "cross-origin request event rules": "cross-origin-request-event-rules",
     "cross-origin request steps": "cross-origin-request-steps",
     "document response entity body": "document-response-entity-body",
--- a/xhr-1/Overview.html	Fri Nov 22 16:31:45 2013 +0900
+++ b/xhr-1/Overview.html	Fri Nov 22 17:27:30 2013 +0900
@@ -507,10 +507,8 @@
 
   <h3 id="constructor"><span class="secno">4.2 </span>Constructor</h3>
 
-  <p>When the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a>
-  is a <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, the
-  <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object has an associated
-  <dfn id="concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</dfn>.
+  <p>The <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object has an associated
+  <dfn id="concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</dfn>.
 
   <dl class="domintro">
     <dt><code><var title="">client</var> = new <a href="#dom-xmlhttprequest" title="dom-XMLHttpRequest">XMLHttpRequest</a>()</code>
@@ -525,13 +523,10 @@
     <li><p>Let <var title="">xhr</var> be a new <code><a href="#xmlhttprequest">XMLHttpRequest</a></code>
     object.
 
-    <li><p>If the
-    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, set <var title="">xhr</var>'s
-    <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> to the
-    <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>
-    associated with the global object of <var title="">xhr</var>'s interface
-    object.
+    <li><p>Set <var title="">xhr</var>'s
+    <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a> to the
+    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#relevant-settings-object-for-a-global-object" title="relevant settings object for a global object">relevant settings object</a>
+    for the global object of <var title="">xhr</var>'s interface object.
 
     <li><p>Return <var title="">xhr</var>.
   </ol>
@@ -758,44 +753,29 @@
 method must run these steps:
 
 <ol>
- <li><p>Let <var title="">base</var> be null.
-
- <li>
-  <p>If the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-  <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#document-environment">document environment</a>, run these steps:
-
-  <ol>
-   <li><p>If <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> is not
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#fully-active">fully active</a>,
-   <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
-   "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
-
-   <li><p>Set <var title="">base</var> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#document-base-url">document base URL</a> of
-   <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
-
-   <li><p>Set <a href="#source-origin">source origin</a> to the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#origin">origin</a>
-   of <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
-
-   <li><p>Set <a href="#referrer-source">referrer source</a> to
-   <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
-  </ol>
-
- <li>
-  <p>If the <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
-  <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#worker-environment">worker environment</a>, run these steps:
-
-  <ol>
-   <li><p>Set <var title="">base</var> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#script's-base-url">script's base URL</a>.
-
-   <li><p>Set <a href="#source-origin">source origin</a> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#concept-script" title="concept-script">script</a>'s
+ <li><p>If <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#responsible-document">responsible document</a> is not
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#fully-active">fully active</a>,
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> an
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception.
+
+  <li><p>Set <var title="">base</var> to
+  <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+  <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-base-url">API base URL</a>.
+
+   <li><p>Set <a href="#source-origin">source origin</a> to
+   <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
    <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/browsers.html#origin">origin</a>.
 
    <li><p>Set <a href="#referrer-source">referrer source</a> to the
-   <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/webappapis.html#script's-referrer-source">script's referrer source</a>.
-  </ol>
+   <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a>'s
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document-url" title="concept-document-url">URL</a> if
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a> is a
+ <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>, and
+ <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
+ <a class="external" href="http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#api-referrer-source">API referrer source</a> otherwise.
 
  <li><p>If <var>method</var> does not match the <a class="external" href="http://tools.ietf.org/html/rfc2616/#section-5.1.1">Method</a>
  token production, <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-throw" title="concept-throw">throw</a> a JavaScript <code class="external"><a href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-predefined-exception">TypeError</a></code>.
@@ -2115,7 +2095,7 @@
   <dfn id="blob-response-entity-body">blob response entity body</dfn> is either a
   <code class="external"><a href="http://dev.w3.org/2006/webapi/FileAPI/#blob">Blob</a></code> representing the
   <a href="#response-entity-body">response entity body</a> or null. If the <a href="#blob-response-entity-body">blob response entity body</a>
-  is null, let it be the return value of the following algorithm:</p>
+  is null, set it to the return value of the following algorithm:</p>
 
   <ol>
    <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return an empty
@@ -2131,7 +2111,7 @@
   <dfn id="document-response-entity-body">document response entity body</dfn>
   is either a <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>
   representing the <a href="#response-entity-body">response entity body</a> or null. If the
-  <a href="#document-response-entity-body">document response entity body</a> is null, let it be the return value of the
+  <a href="#document-response-entity-body">document response entity body</a> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
@@ -2221,7 +2201,7 @@
 
 <p>The <dfn id="json-response-entity-body">JSON response entity body</dfn> is either a JavaScript value
 representing the <a href="#response-entity-body">response entity body</a>. If the
-<a href="#json-response-entity-body">JSON response entity body</a> is null, let it be return value of the following
+<a href="#json-response-entity-body">JSON response entity body</a> is null, set it to the return value of the following
 algorithm:</p>
 
 <ol>
@@ -2238,7 +2218,7 @@
 
   <p>The <dfn id="text-response-entity-body">text response entity body</dfn> is either a
   string representing the <a href="#response-entity-body">response entity body</a> or null. If the
-  <a href="#text-response-entity-body">text response entity body</a> is null, let it be the return value of the
+  <a href="#text-response-entity-body">text response entity body</a> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
--- a/xhr-1/Overview.src.html	Fri Nov 22 16:31:45 2013 +0900
+++ b/xhr-1/Overview.src.html	Fri Nov 22 17:27:30 2013 +0900
@@ -516,10 +516,8 @@
 
   <h3 id="constructor">Constructor</h3>
 
-  <p>When the <span data-anolis-spec=html>JavaScript global environment</span>
-  is a <span data-anolis-spec=html>document environment</span>, the
-  <code>XMLHttpRequest</code> object has an associated
-  <dfn title=concept-XMLHttpRequest-document>document</dfn>.
+  <p>The <code>XMLHttpRequest</code> object has an associated
+  <dfn title=concept-XMLHttpRequest-settings-object>settings object</dfn>.
 
   <dl class=domintro>
     <dt><code><var title>client</var> = new <span title=dom-XMLHttpRequest>XMLHttpRequest</span>()</code>
@@ -534,13 +532,10 @@
     <li><p>Let <var title>xhr</var> be a new <code>XMLHttpRequest</code>
     object.
 
-    <li><p>If the
-    <span data-anolis-spec=html>JavaScript global environment</span> is a
-    <span data-anolis-spec=html>document environment</span>, set <var title>xhr</var>'s
-    <span title=concept-XMLHttpRequest-document>document</span> to the
-    <span data-anolis-spec=dom title=concept-document>document</span>
-    associated with the global object of <var title>xhr</var>'s interface
-    object.
+    <li><p>Set <var title>xhr</var>'s
+    <span title=concept-XMLHttpRequest-settings-object>settings object</span> to the
+    <span data-anolis-spec=html title="relevant settings object for a global object">relevant settings object</span>
+    for the global object of <var title>xhr</var>'s interface object.
 
     <li><p>Return <var title>xhr</var>.
   </ol>
@@ -767,44 +762,29 @@
 method must run these steps:
 
 <ol>
- <li><p>Let <var title>base</var> be null.
-
- <li>
-  <p>If the <span data-anolis-spec=html>JavaScript global environment</span> is a
-  <span data-anolis-spec=html>document environment</span>, run these steps:
-
-  <ol>
-   <li><p>If <span title=concept-XMLHttpRequest-document>document</span> is not
-   <span data-anolis-spec=html>fully active</span>,
-   <span data-anolis-spec=dom title=concept-throw>throw</span> an
-   "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
-
-   <li><p>Set <var title>base</var> to the
-   <span data-anolis-spec=html>document base URL</span> of
-   <span title=concept-XMLHttpRequest-document>document</span>.
-
-   <li><p>Set <span>source origin</span> to the <span data-anolis-spec=html>origin</span>
-   of <span title=concept-XMLHttpRequest-document>document</span>.
-
-   <li><p>Set <span>referrer source</span> to
-   <span title=concept-XMLHttpRequest-document>document</span>.
-  </ol>
-
- <li>
-  <p>If the <span data-anolis-spec=html>JavaScript global environment</span> is a
-  <span data-anolis-spec=html>worker environment</span>, run these steps:
-
-  <ol>
-   <li><p>Set <var title>base</var> to the
-   <span data-anolis-spec=html>script's base URL</span>.
-
-   <li><p>Set <span>source origin</span> to the
-   <span data-anolis-spec=html title=concept-script>script</span>'s
+ <li><p>If <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>responsible document</span> is not
+ <span data-anolis-spec=html>fully active</span>,
+ <span data-anolis-spec=dom title=concept-throw>throw</span> an
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception.
+
+  <li><p>Set <var title>base</var> to
+  <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+  <span data-anolis-spec=html>API base URL</span>.
+
+   <li><p>Set <span>source origin</span> to
+   <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
    <span data-anolis-spec=html>origin</span>.
 
    <li><p>Set <span>referrer source</span> to the
-   <span data-anolis-spec=html>script's referrer source</span>.
-  </ol>
+   <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span>'s
+ <span data-anolis-spec=dom title=concept-document-url>URL</span> if
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span> is a
+ <span data-anolis-spec=dom title=concept-document>document</span>, and
+ <span title=concept-XMLHttpRequest-settings-object>settings object</span>'s
+ <span data-anolis-spec=html>API referrer source</span> otherwise.
 
  <li><p>If <var>method</var> does not match the <span data-anolis-spec=http>Method</span>
  token production, <span data-anolis-spec=dom title=concept-throw>throw</span> a JavaScript <code data-anolis-spec=webidl>TypeError</code>.
@@ -2124,7 +2104,7 @@
   <dfn id="blob-response-entity-body">blob response entity body</dfn> is either a
   <code data-anolis-spec=fileapi>Blob</code> representing the
   <span>response entity body</span> or null. If the <span>blob response entity body</span>
-  is null, let it be the return value of the following algorithm:</p>
+  is null, set it to the return value of the following algorithm:</p>
 
   <ol>
    <li><p>If the <span>response entity body</span> is null, return an empty
@@ -2140,7 +2120,7 @@
   <dfn id="document-response-entity-body">document response entity body</dfn>
   is either a <span data-anolis-spec=dom title=concept-document>document</span>
   representing the <span>response entity body</span> or null. If the
-  <span>document response entity body</span> is null, let it be the return value of the
+  <span>document response entity body</span> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
@@ -2230,7 +2210,7 @@
 
 <p>The <dfn>JSON response entity body</dfn> is either a JavaScript value
 representing the <span>response entity body</span>. If the
-<span>JSON response entity body</span> is null, let it be return value of the following
+<span>JSON response entity body</span> is null, set it to the return value of the following
 algorithm:</p>
 
 <ol>
@@ -2247,7 +2227,7 @@
 
   <p>The <dfn id="text-response-entity-body">text response entity body</dfn> is either a
   string representing the <span>response entity body</span> or null. If the
-  <span>text response entity body</span> is null, let it be the return value of the
+  <span>text response entity body</span> is null, set it to the return value of the
   following algorithm:</p>
 
   <ol>
--- a/xhr-1/data/xrefs/dom/html-generated.json	Fri Nov 22 16:31:45 2013 +0900
+++ b/xhr-1/data/xrefs/dom/html-generated.json	Fri Nov 22 17:27:30 2013 +0900
@@ -10,6 +10,8 @@
     "allowed to show a pop-up": "browsers.html#allowed-to-show-a-pop-up",
     "already started": "scripting-1.html#already-started",
     "ancestor browsing context": "browsers.html#ancestor-browsing-context",
+    "api base url": "text-level-semantics.html#api-base-url",
+    "api referrer source": "text-level-semantics.html#api-referrer-source",
     "applet": "obsolete.html#the-applet-element",
     "application cache": "offline.html#application-cache",
     "area": "the-map-element.html#the-area-element",
@@ -468,8 +470,10 @@
     "presentational hints": "rendering.html#presentational-hints",
     "progress": "the-button-element.html#the-progress-element",
     "queue a task": "webappapis.html#queue-a-task",
+    "relevant settings object for a global object": "text-level-semantics.html#relevant-settings-object-for-a-global-object",
     "rel-icon": "links.html#rel-icon",
     "resolve a url": "urls.html#resolve-a-url",
+    "responsible document": "text-level-semantics.html#responsible-document",
     "rp": "text-level-semantics.html#the-rp-element",
     "rt": "text-level-semantics.html#the-rt-element",
     "ruby": "text-level-semantics.html#the-ruby-element",
--- a/xhr-1/data/xrefs/dom/xhr.json	Fri Nov 22 16:31:45 2013 +0900
+++ b/xhr-1/data/xrefs/dom/xhr.json	Fri Nov 22 17:27:30 2013 +0900
@@ -8,7 +8,7 @@
     "concept-formdata-entry-name": "concept-formdata-entry-name",
     "concept-formdata-entry-value": "concept-formdata-entry-value",
     "concept-response-header": "concept-response-header",
-    "concept-xmlhttprequest-document": "concept-xmlhttprequest-document",
+    "concept-xmlhttprequest-settings-object": "concept-xmlhttprequest-settings-object",
     "cross-origin request event rules": "cross-origin-request-event-rules",
     "cross-origin request steps": "cross-origin-request-steps",
     "document response entity body": "document-response-entity-body",