Skip to content

Commit

Permalink
[] (0) Tweak document.domain to handle IPv6 addresses.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2850 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Feb 23, 2009
1 parent a8fa711 commit 2fba31f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
23 changes: 15 additions & 8 deletions index
Expand Up @@ -35638,11 +35638,16 @@ interface <dfn id=window>Window</dfn> {
<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>&lt;host&gt;</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>

Expand All @@ -35654,9 +35659,11 @@ interface <dfn id=window>Window</dfn> {

<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
Expand All @@ -35673,8 +35680,8 @@ interface <dfn id=window>Window</dfn> {

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

Expand Down
25 changes: 16 additions & 9 deletions source
Expand Up @@ -40479,11 +40479,17 @@ interface <dfn>Window</dfn> {
<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">&lt;host&gt;</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>

Expand All @@ -40497,10 +40503,11 @@ interface <dfn>Window</dfn> {

<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
Expand All @@ -40520,8 +40527,8 @@ interface <dfn>Window</dfn> {

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

Expand Down

0 comments on commit 2fba31f

Please sign in to comment.