[html5] r2850 - [] (0) Tweak document.domain to handle IPv6 addresses.
whatwg at whatwg.org
whatwg at whatwg.org
Sun Feb 22 23:56:24 PST 2009
Author: ianh
Date: 2009-02-22 23:56:23 -0800 (Sun, 22 Feb 2009)
New Revision: 2850
Modified:
index
source
Log:
[] (0) Tweak document.domain to handle IPv6 addresses.
Modified: index
===================================================================
--- index 2009-02-23 07:19:49 UTC (rev 2849)
+++ index 2009-02-23 07:56:23 UTC (rev 2850)
@@ -35638,12 +35638,17 @@
<p>The <dfn id=dom-document-domain title=dom-document-domain><code>domain</code></dfn>
attribute on <code>Document</code> objects must be initialized to
<a href="#the-document's-domain">the document's domain</a>, if it has one, and the empty
- string otherwise. On getting, the attribute must return its current
+ string otherwise. If the value is an IPv6 address, then the square
+ brackets from the host portion of the <a href=#url-host title=url-host><host></a> component must be omitted from
+ the attribute's value.</p>
+
+ <p>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><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception. On setting, the user
- agent must run the following algorithm:</p>
+ <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception.</p>
+ <p>On setting, the user agent must run the following algorithm:</p>
+
<ol><li>
<p>If the document was created by <code>XMLHttpRequest</code>,
@@ -35654,9 +35659,11 @@
<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>
+ <p>If the new value is an IP address, let <var title="">new
+ value</var> be the new value. Otherwise, apply the IDNA ToASCII
+ algorithm to the new value, with both the AllowUnassigned and
+ UseSTD3ASCIIRules flags set, and let <var title="">new value</var>
+ be the result of the ToASCII algorithm.</p>
<p>If ToASCII fails to convert one of the components of the
string, e.g. because it is too long or because it contains invalid
@@ -35673,8 +35680,8 @@
<ol><li>
- <p>If the current value is an IP address, throw a <code><a href=#security_err>SECURITY_ERR</a></code>
- exception and abort these steps.</p>
+ <p>If the current value is an IP address, throw a
+ <code><a href=#security_err>SECURITY_ERR</a></code> exception and abort these steps.</p>
</li>
Modified: source
===================================================================
--- source 2009-02-23 07:19:49 UTC (rev 2849)
+++ source 2009-02-23 07:56:23 UTC (rev 2850)
@@ -40479,12 +40479,18 @@
<p>The <dfn title="dom-document-domain"><code>domain</code></dfn>
attribute on <code>Document</code> objects must be initialized to
<span>the document's domain</span>, if it has one, and the empty
- string otherwise. On getting, the attribute must return its current
+ string otherwise. If the value is an IPv6 address, then the square
+ brackets from the host portion of the <span
+ title="url-host"><host></span> component must be omitted from
+ the attribute's value.</p>
+
+ <p>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:</p>
+ <code>INVALID_ACCESS_ERR</code> exception.</p>
+ <p>On setting, the user agent must run the following algorithm:</p>
+
<ol>
<li>
@@ -40497,10 +40503,11 @@
<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>
+ <p>If the new value is an IP address, let <var title="">new
+ value</var> be the new value. Otherwise, apply the IDNA ToASCII
+ algorithm to the new value, with both the AllowUnassigned and
+ UseSTD3ASCIIRules flags set, and let <var title="">new value</var>
+ be the result of the ToASCII algorithm.</p>
<p>If ToASCII fails to convert one of the components of the
string, e.g. because it is too long or because it contains invalid
@@ -40520,8 +40527,8 @@
<li>
- <p>If the current value is an IP address, throw a <code>SECURITY_ERR</code>
- exception and abort these steps.</p>
+ <p>If the current value is an IP address, throw a
+ <code>SECURITY_ERR</code> exception and abort these steps.</p>
</li>
More information about the Commit-Watchers
mailing list