Skip to content

Commit

Permalink
Initial attempt at syncing with the new settings object concept from …
Browse files Browse the repository at this point in the history
…HTML.
  • Loading branch information
annevk committed Nov 12, 2013
1 parent c3c838b commit aca101a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 92 deletions.
65 changes: 19 additions & 46 deletions Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ <h2 id="interface-xmlhttprequest"><span class="secno">4 </span>Interface <code t

<h3 id="constructors"><span class="secno">4.1 </span>Constructors</h3>

<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>.
<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>
Expand All @@ -333,13 +331,10 @@ <h3 id="constructors"><span class="secno">4.1 </span>Constructors</h3>
<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.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 <var title="">xhr</var>'s
<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>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.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#script-settings-object">script settings object</a> associated with the global
object of <var title="">xhr</var>'s interface object.

<li><p>Return <var title="">xhr</var>.
</ol>
Expand Down Expand Up @@ -553,44 +548,22 @@ <h4 id="the-open()-method"><span class="secno">4.5.1 </span>The <code title="">o
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.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>, 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.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.

<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
<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.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
<a href="#concept-xmlhttprequest-document" title="concept-XMLHttpRequest-document">document</a>.
</ol>

<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#worker-environment">worker environment</a>, run these steps:
<li><p>If <a href="#concept-xmlhttprequest-settings-object" title="concept-XMLHttpRequest-settings-object">settings object</a>'s
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#responsible-document">responsible 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.

<ol>
<li><p>Set <var title="">base</var> to the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#script's-base-url">script's base URL</a>.
<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.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#api-base-url">API base URL</a>.

<li><p>Set <a href="#source-origin">source origin</a> to the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#concept-script" title="concept-script">script</a>'s
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</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.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#origin">origin</a>.

<li><p>Set <a href="#referrer-source">referrer source</a> to the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#script's-referrer-source">script's referrer source</a>.
</ol>
<li><p>Set <a href="#referrer-source">referrer source</a> to the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#api-referrer-source">API referrer source</a>.

<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://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throw</a> a
Expand Down
65 changes: 19 additions & 46 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,8 @@ <h2>Interface <code title>XMLHttpRequest</code></h2>

<h3 id="constructors">Constructors</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>
Expand All @@ -288,13 +286,10 @@ <h3 id="constructors">Constructors</h3>
<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>script settings object</span> associated with the global
object of <var title>xhr</var>'s interface object.

<li><p>Return <var title>xhr</var>.
</ol>
Expand Down Expand Up @@ -508,44 +503,22 @@ <h4>The <code title>open()</code> method</h4>
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> 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:
<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.

<ol>
<li><p>Set <var title>base</var> to the
<span data-anolis-spec=html>script's base URL</span>.
<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 the
<span data-anolis-spec=html title=concept-script>script</span>'s
<span data-anolis-spec=html>origin</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>
<li><p>Set <span>referrer source</span> to the
<span data-anolis-spec=html>API referrer source</span>.

<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
Expand Down

0 comments on commit aca101a

Please sign in to comment.