[html5] r1518 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed Apr 30 14:59:02 PDT 2008


Author: ianh
Date: 2008-04-30 14:59:01 -0700 (Wed, 30 Apr 2008)
New Revision: 1518

Modified:
   index
   source
Log:
[] (0) Also clarify the effective script origin for XMLHttpRequest documents.

Modified: index
===================================================================
--- index	2008-04-30 21:43:17 UTC (rev 1517)
+++ index	2008-04-30 21:59:01 UTC (rev 1518)
@@ -27274,13 +27274,14 @@
      <dt>If a <code>Document</code> or image was returned by the
       <code>XMLHttpRequest</code> API
 
-     <dd>The origin is the same as the origin of the <code>Document</code>
-      object that was the <a href="#active">active document</a> of the
-      <code><a href="#window">Window</a></code> object of the browsing
-      context from which the <code>XMLHttpRequest</code> constructor was
-      invoked. (That is, the origin is the same as the origin of the
-      <code>Document</code> to which the <code>XMLHttpRequest</code> object's
-      <a
+     <dd>The origin and <a href="#effective3">effective script origin</a> are
+      the same as the origin and <a href="#effective3">effective script
+      origin</a> of the <code>Document</code> object that was the <a
+      href="#active">active document</a> of the <code><a
+      href="#window">Window</a></code> object of the browsing context from
+      which the <code>XMLHttpRequest</code> constructor was invoked. (That
+      is, they track the <code>Document</code> to which the
+      <code>XMLHttpRequest</code> object's <a
       href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#document-pointer"><code>Document</code>
       pointer</a> pointed when it was created.) <a href="#refsXHR">[XHR]</a>
 
@@ -27328,10 +27329,10 @@
       <code>Document</code> or image is created.
     </dl>
 
-    <p>When a <code>Document</code> is created, its <a
-     href="#effective3">effective script origin</a> is initialised to the <a
-     href="#origin0">origin</a> of the <code>Document</code>. However, the
-     <code title=dom-document-domain><a
+    <p>When a <code>Document</code> is created, unless stated otherwise
+     above, its <a href="#effective3">effective script origin</a> is
+     initialised to the <a href="#origin0">origin</a> of the
+     <code>Document</code>. However, the <code title=dom-document-domain><a
      href="#domain">document.domain</a></code> attribute can be used to
      change it.</p>
   </dl>
@@ -27369,11 +27370,17 @@
   <p>The <dfn id=domain title=dom-document-domain><code>domain</code></dfn>
    attribute on <code>Document</code> objects must be initialised to <a
    href="#domain0">the document's domain</a>, if it has one, and the empty
-   string otherwise. On getting, the attribute must return its current value.
-   On setting, the user agent must run the following algorithm:
+   string otherwise. On getting, the attribute must return its current value,
+   unless the document was created by <code>XMLHttpRequest</code>, in which
+   case it must throw an <code>INVALID_ACCESS_ERR</code> exception. On
+   setting, the user agent must run the following algorithm:
 
   <ol>
    <li>
+    <p>If the document was created by <code>XMLHttpRequest</code>, throw an
+     <code>INVALID_ACCESS_ERR</code> exception and abort these steps.</p>
+
+   <li>
     <p>Apply the IDNA ToASCII algorithm to the new value, with both the
      AllowUnassigned and UseSTD3ASCIIRules flags set. Let <var title="">new
      value</var> be the result of the ToASCII algorithm.</p>

Modified: source
===================================================================
--- source	2008-04-30 21:43:17 UTC (rev 1517)
+++ source	2008-04-30 21:59:01 UTC (rev 1518)
@@ -24998,13 +24998,13 @@
      <dt>If a <code>Document</code> or image was returned by the
      <code>XMLHttpRequest</code> API</dt>
 
-     <dd>The origin is the same as the origin of the
-     <code>Document</code> object that was the <span>active
+     <dd>The origin and <span>effective script origin</span> are the
+     same as the origin and <span>effective script origin</span> of
+     the <code>Document</code> object that was the <span>active
      document</span> of the <code>Window</code> object of the browsing
      context from which the <code>XMLHttpRequest</code> constructor
-     was invoked. (That is, the origin is the same as the origin of
-     the <code>Document</code> to which the
-     <code>XMLHttpRequest</code> object's <a
+     was invoked. (That is, they track the <code>Document</code> to
+     which the <code>XMLHttpRequest</code> object's <a
      href="http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#document-pointer"><code>Document</code>
      pointer</a> pointed when it was created.) <a
      href="#refsXHR">[XHR]</a></dd>
@@ -25061,9 +25061,10 @@
 
     </dl>
 
-    <p>When a <code>Document</code> is created, its <span>effective
-    script origin</span> is initialised to the <span>origin</span> of
-    the <code>Document</code>. However, the <code
+    <p>When a <code>Document</code> is created, unless stated
+    otherwise above, its <span>effective script origin</span> is
+    initialised to the <span>origin</span> of the
+    <code>Document</code>. However, the <code
     title="dom-document-domain">document.domain</code> attribute can
     be used to change it.</p>
 
@@ -25109,13 +25110,23 @@
   attribute on <code>Document</code> objects must be initialised to
   <span>the document's domain</span>, if it has one, and the empty
   string otherwise. On getting, the attribute must return its current
-  value. On setting, the user agent must run the following
-  algorithm:</p>
+  value, unless the document was created by
+  <code>XMLHttpRequest</code>, in which case it must throw an
+  <code>INVALID_ACCESS_ERR</code> exception. On setting, the user
+  agent must run the following algorithm:</p>
 
   <ol>
 
    <li>
 
+    <p>If the document was created by <code>XMLHttpRequest</code>,
+    throw an <code>INVALID_ACCESS_ERR</code> exception and abort these
+    steps.</p>
+
+   </li>
+
+   <li>
+
     <p>Apply the IDNA ToASCII algorithm to the new value, with both
     the AllowUnassigned and UseSTD3ASCIIRules flags set. Let <var
     title="">new value</var> be the result of the ToASCII




More information about the Commit-Watchers mailing list