[html5] r2664 - [] (0) Define how to handle out-of-range content attribute values in the DOM.
whatwg at whatwg.org
whatwg at whatwg.org
Wed Jan 14 00:56:30 PST 2009
Author: ianh
Date: 2009-01-14 00:56:29 -0800 (Wed, 14 Jan 2009)
New Revision: 2664
Modified:
index
source
Log:
[] (0) Define how to handle out-of-range content attribute values in the DOM.
Modified: index
===================================================================
--- index 2009-01-14 08:50:40 UTC (rev 2663)
+++ index 2009-01-14 08:56:29 UTC (rev 2664)
@@ -5190,52 +5190,58 @@
(<code>long</code>) then, on getting, the content attribute must be
parsed according to the <a href=#rules-for-parsing-integers title="rules for parsing
integers">rules for parsing signed integers</a>, and if that is
- successful, the resulting value must be returned. If, on the other
- hand, it fails, or if the attribute is absent, then the default
- value must be returned instead, or 0 if there is no default
- value. On setting, the given value must be converted to the shortest
- possible string representing the number as a <a href=#valid-integer>valid
- integer</a> in base ten and then that string must be used as the
- new content attribute value.</p>
+ successful, and the value is in the range of the DOM attribute's
+ type, the resulting value must be returned. If, on the other hand,
+ it fails or returns an out of range value, or if the attribute is
+ absent, then the default value must be returned instead, or 0 if
+ there is no default value. On setting, the given value must be
+ converted to the shortest possible string representing the number as
+ a <a href=#valid-integer>valid integer</a> in base ten and then that string must
+ be used as the new content attribute value.</p>
<p>If a reflecting DOM attribute is an <em>unsigned</em> integer
type (<code>unsigned long</code>) then, on getting, the content
attribute must be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
- non-negative integers</a>, and if that is successful, the
- resulting value must be returned. If, on the other hand, it fails,
- or if the attribute is absent, the default value must be returned
- instead, or 0 if there is no default value. On setting, the given
- value must be converted to the shortest possible string representing
- the number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> in base ten
- and then that string must be used as the new content attribute
- value.</p>
+ non-negative integers</a>, and if that is successful, and the
+ value is in the range of the DOM attribute's type, the resulting
+ value must be returned. If, on the other hand, it fails or returns
+ an out of range value, or if the attribute is absent, the default
+ value must be returned instead, or 0 if there is no default
+ value. On setting, the given value must be converted to the shortest
+ possible string representing the number as a <a href=#valid-non-negative-integer>valid
+ non-negative integer</a> in base ten and then that string must be
+ used as the new content attribute value.</p>
<p>If a reflecting DOM attribute is an unsigned integer type
(<code>unsigned long</code>) that is <dfn id=limited-to-only-positive-non-zero-numbers>limited to only positive
non-zero numbers</dfn>, then the behavior is similar to the previous
case, but zero is not allowed. On getting, the content attribute
must first be parsed according to the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
- non-negative integers</a>, and if that is successful, the
- resulting value must be returned. If, on the other hand, it fails,
- or if the attribute is absent, the default value must be returned
- instead, or 1 if there is no default value. On setting, if the value
- is zero, the user agent must fire an <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code>
- exception. Otherwise, the given value must be converted to the
- shortest possible string representing the number as a <a href=#valid-non-negative-integer>valid
- non-negative integer</a> in base ten and then that string must be
- used as the new content attribute value.</p>
+ non-negative integers</a>, and if that is successful, and the
+ value is in the range of the DOM attribute's type, the resulting
+ value must be returned. If, on the other hand, it fails or returns
+ an out of range value, or if the attribute is absent, the default
+ value must be returned instead, or 1 if there is no default
+ value. On setting, if the value is zero, the user agent must fire an
+ <code><a href=#index_size_err>INDEX_SIZE_ERR</a></code> exception. Otherwise, the given value
+ must be converted to the shortest possible string representing the
+ number as a <a href=#valid-non-negative-integer>valid non-negative integer</a> in base ten and
+ then that string must be used as the new content attribute
+ value.</p>
<p>If a reflecting DOM attribute is a floating point number type
(<code>float</code>) and it doesn't fall into one of the earlier
categories, then, on getting, the content attribute must be parsed
according to the <a href=#rules-for-parsing-floating-point-number-values>rules for parsing floating point number
- values</a>, and if that is successful, the resulting value must
- be returned. If, on the other hand, it fails, or if the attribute is
- absent, the default value must be returned instead, or 0.0 if there
- is no default value. On setting, the given value must be converted
- to the shortest possible string representing the number as a
- <a href=#valid-floating-point-number>valid floating point number</a> in base ten and then that
- string must be used as the new content attribute value.</p>
+ values</a>, and if that is successful, and the value is in the
+ range of the DOM attribute's type, the resulting value must be
+ returned. If, on the other hand, it fails or returns an out of range
+ value, or if the attribute is absent, the default value must be
+ returned instead, or 0.0 if there is no default value. On setting,
+ the given value must be converted to the shortest possible string
+ representing the number as a <a href=#valid-floating-point-number>valid floating point
+ number</a> in base ten and then that string must be used as the
+ new content attribute value.</p>
<p>If a reflecting DOM attribute is of the type
<code><a href=#domtokenlist-0>DOMTokenList</a></code>, then on getting it must return a
Modified: source
===================================================================
--- source 2009-01-14 08:50:40 UTC (rev 2663)
+++ source 2009-01-14 08:56:29 UTC (rev 2664)
@@ -5014,52 +5014,58 @@
(<code>long</code>) then, on getting, the content attribute must be
parsed according to the <span title="rules for parsing
integers">rules for parsing signed integers</span>, and if that is
- successful, the resulting value must be returned. If, on the other
- hand, it fails, or if the attribute is absent, then the default
- value must be returned instead, or 0 if there is no default
- value. On setting, the given value must be converted to the shortest
- possible string representing the number as a <span>valid
- integer</span> in base ten and then that string must be used as the
- new content attribute value.</p>
+ successful, and the value is in the range of the DOM attribute's
+ type, the resulting value must be returned. If, on the other hand,
+ it fails or returns an out of range value, or if the attribute is
+ absent, then the default value must be returned instead, or 0 if
+ there is no default value. On setting, the given value must be
+ converted to the shortest possible string representing the number as
+ a <span>valid integer</span> in base ten and then that string must
+ be used as the new content attribute value.</p>
<p>If a reflecting DOM attribute is an <em>unsigned</em> integer
type (<code>unsigned long</code>) then, on getting, the content
attribute must be parsed according to the <span>rules for parsing
- non-negative integers</span>, and if that is successful, the
- resulting value must be returned. If, on the other hand, it fails,
- or if the attribute is absent, the default value must be returned
- instead, or 0 if there is no default value. On setting, the given
- value must be converted to the shortest possible string representing
- the number as a <span>valid non-negative integer</span> in base ten
- and then that string must be used as the new content attribute
- value.</p>
+ non-negative integers</span>, and if that is successful, and the
+ value is in the range of the DOM attribute's type, the resulting
+ value must be returned. If, on the other hand, it fails or returns
+ an out of range value, or if the attribute is absent, the default
+ value must be returned instead, or 0 if there is no default
+ value. On setting, the given value must be converted to the shortest
+ possible string representing the number as a <span>valid
+ non-negative integer</span> in base ten and then that string must be
+ used as the new content attribute value.</p>
<p>If a reflecting DOM attribute is an unsigned integer type
(<code>unsigned long</code>) that is <dfn>limited to only positive
non-zero numbers</dfn>, then the behavior is similar to the previous
case, but zero is not allowed. On getting, the content attribute
must first be parsed according to the <span>rules for parsing
- non-negative integers</span>, and if that is successful, the
- resulting value must be returned. If, on the other hand, it fails,
- or if the attribute is absent, the default value must be returned
- instead, or 1 if there is no default value. On setting, if the value
- is zero, the user agent must fire an <code>INDEX_SIZE_ERR</code>
- exception. Otherwise, the given value must be converted to the
- shortest possible string representing the number as a <span>valid
- non-negative integer</span> in base ten and then that string must be
- used as the new content attribute value.</p>
+ non-negative integers</span>, and if that is successful, and the
+ value is in the range of the DOM attribute's type, the resulting
+ value must be returned. If, on the other hand, it fails or returns
+ an out of range value, or if the attribute is absent, the default
+ value must be returned instead, or 1 if there is no default
+ value. On setting, if the value is zero, the user agent must fire an
+ <code>INDEX_SIZE_ERR</code> exception. Otherwise, the given value
+ must be converted to the shortest possible string representing the
+ number as a <span>valid non-negative integer</span> in base ten and
+ then that string must be used as the new content attribute
+ value.</p>
<p>If a reflecting DOM attribute is a floating point number type
(<code>float</code>) and it doesn't fall into one of the earlier
categories, then, on getting, the content attribute must be parsed
according to the <span>rules for parsing floating point number
- values</span>, and if that is successful, the resulting value must
- be returned. If, on the other hand, it fails, or if the attribute is
- absent, the default value must be returned instead, or 0.0 if there
- is no default value. On setting, the given value must be converted
- to the shortest possible string representing the number as a
- <span>valid floating point number</span> in base ten and then that
- string must be used as the new content attribute value.</p>
+ values</span>, and if that is successful, and the value is in the
+ range of the DOM attribute's type, the resulting value must be
+ returned. If, on the other hand, it fails or returns an out of range
+ value, or if the attribute is absent, the default value must be
+ returned instead, or 0.0 if there is no default value. On setting,
+ the given value must be converted to the shortest possible string
+ representing the number as a <span>valid floating point
+ number</span> in base ten and then that string must be used as the
+ new content attribute value.</p>
<p>If a reflecting DOM attribute is of the type
<code>DOMTokenList</code>, then on getting it must return a
More information about the Commit-Watchers
mailing list