Permalink
Browse files

Move defining Document to the constructor

  • Loading branch information...
1 parent a4a780d commit 67244d007243de427ffe8367ed0a7c49d40be199 @annevk annevk committed Nov 22, 2012
Showing with 42 additions and 32 deletions.
  1. +22 −17 Overview.html
  2. +20 −15 Overview.src.html
View
@@ -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></p>
<h1 class="head" id="xmlhttprequest-ls">XMLHttpRequest</h1>
-<h2 class="no-num no-toc" id="living-standard-—-last-updated-14-november-2012">Living Standard — Last Updated 14 November 2012</h2>
+<h2 class="no-num no-toc" id="living-standard-—-last-updated-22-november-2012">Living Standard — Last Updated 22 November 2012</h2>
<dl>
<dt>This Version:</dt>
@@ -35,7 +35,7 @@ <h2 class="no-num no-toc" id="living-standard-—-last-updated-14-november-2012"
<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
-14 November 2012, the editor has made this specification available
+22 November 2012, 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
@@ -334,6 +334,11 @@ <h3 id="constructors"><span class="secno">4.2 </span>Constructors</h3>
<a href="#source-origin">source 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.
+<p>When the <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#javascript-global-environment">JavaScript global environment</a>
+is a <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/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>.
+
<dl class="domintro">
<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.
@@ -354,6 +359,14 @@ <h3 id="constructors"><span class="secno">4.2 </span>Constructors</h3>
<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>If the
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#document-environment">document environment</a>, set
+ <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a> to the
+ <a class="external" href="http://dom.spec.whatwg.org/#concept-document" title="concept-document">document</a>
+ associated with the global object of <var title="">xhr</var>'s interface
+ object.
+
<li><p>Return <var title="">xhr</var>.
</ol>
@@ -591,31 +604,23 @@ <h4 id="the-open()-method"><span class="secno">4.6.1 </span>The <code title="">o
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#document-environment">document environment</a>, run these steps:
<ol>
- <li>
- <p>Let <var title="">document</var> be the
- <a class="external" href="http://dom.spec.whatwg.org/#concept-document" title="concept-document">document</a>
- associated with the global object for which the
- <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> interface object was created from which
- this <code><a href="#xmlhttprequest">XMLHttpRequest</a></code> object was created.
-
- <p class="XXX">Should this move to the constructor phase?
-
- <li><p>If <var title="">document</var> is not
- <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#fully-active">fully active</a>,
+ <li><p>If <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>
+ is not <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#fully-active">fully active</a>,
<a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> an
"<code class="external"><a href="http://dom.spec.whatwg.org/#invalidstateerror">InvalidStateError</a></code>" exception and
terminate the overall set of steps.
<li><p>Set <var title="">base</var> to the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#document-base-url">document base URL</a> of
- <var title="">document</var>.
+ <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.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</a> of <var title="">document</var>
- otherwise.
+ <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.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 <var title="">document</var>.
+ <li><p>Set <a href="#referrer-source">referrer source</a> to
+ <a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
</ol>
<li>
View
@@ -286,6 +286,11 @@ <h3 id="constructors">Constructors</h3>
<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>.
+
<dl class=domintro>
<dt><code><var title>client</var> = new <span title=dom-XMLHttpRequest>XMLHttpRequest</span>()</code>
<dd>Returns a new <code>XMLHttpRequest</code> object.
@@ -306,6 +311,14 @@ <h3 id="constructors">Constructors</h3>
<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>If the
+ <span data-anolis-spec=html>JavaScript global environment</span> is a
+ <span data-anolis-spec=html>document environment</span>, set
+ <span title=concept-XMLHttpRequest-document>document</span> to the
+ <span title=concept-document data-anolis-spec=dom>document</span>
+ associated with the global object of <var title>xhr</var>'s interface
+ object.
+
<li><p>Return <var title>xhr</var>.
</ol>
@@ -543,31 +556,23 @@ <h3 id="request">Request</h3>
<span data-anolis-spec=html>document environment</span>, run these steps:
<ol>
- <li>
- <p>Let <var title>document</var> be the
- <span data-anolis-spec=dom title=concept-document>document</span>
- associated with the global object for which the
- <code>XMLHttpRequest</code> interface object was created from which
- this <code>XMLHttpRequest</code> object was created.
-
- <p class=XXX>Should this move to the constructor phase?
-
- <li><p>If <var title>document</var> is not
- <span data-anolis-spec=html>fully active</span>,
+ <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 and
terminate the overall set of steps.
<li><p>Set <var title>base</var> to the
<span data-anolis-spec=html>document base URL</span> of
- <var title>document</var>.
+ <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 <var title>document</var>
- otherwise.
+ <span data-anolis-spec=html>origin</span> of
+ <span title=concept-XMLHttpRequest-document>document</span> otherwise.
- <li><p>Set <span>referrer source</span> to <var title>document</var>.
+ <li><p>Set <span>referrer source</span> to
+ <span title=concept-XMLHttpRequest-document>document</span>.
</ol>
<li>

0 comments on commit 67244d0

Please sign in to comment.