[html5] r3403 - [giow] (2) Introduce more magic for document.all.
whatwg at whatwg.org
whatwg at whatwg.org
Mon Jul 13 21:59:59 PDT 2009
Author: ianh
Date: 2009-07-13 21:59:57 -0700 (Mon, 13 Jul 2009)
New Revision: 3403
Modified:
index
source
Log:
[giow] (2) Introduce more magic for document.all.
Modified: index
===================================================================
--- index 2009-07-14 03:17:22 UTC (rev 3402)
+++ index 2009-07-14 04:59:57 UTC (rev 3403)
@@ -71225,16 +71225,32 @@
attribute must return an <code><a href=#htmlcollection-0>HTMLCollection</a></code> rooted at the
<code>Document</code> node, whose filter matches all elements.</p>
- <p>The user agent must act as if the ToBoolean() operator in
- JavaScript converted the object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code> to the false value.</p>
+ <p>The object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code>
+ has several unusual behaviors:</p>
- <p class=note>This is a <a href=#willful-violation>willful violation</a> of the
- JavaScript specification current at the time of writing (ECMAScript
- edition 3). The JavaScript specification requires that the
- ToBoolean() operator convert all objects to the true value. This
- violation is motivated by a desire for compatibility with legacy
- content. <a href=#refsECMA262>[ECMA262]</a></p>
+ <ul><li><p>The user agent must act as if the ToBoolean() operator in
+ JavaScript converts the object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code> to the false value.</li>
+ <li><p>The user agent must act as if, for the purposes of the <code title="">==</code> and <code title="">!=</code> operators in
+ JavaScript, the object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code> is equal to the <code title="">undefined</code> value.</li>
+
+ <li><p>The user agent must act such that the <code title="">typeof</code> operator in JavaScript returns the string
+ <code title="">undefined</code> when applied to the object returned
+ for <code title=dom-document-all><a href=#dom-document-all>all</a></code>.</li>
+
+ </ul><p class=note>These requirements are a <a href=#willful-violation>willful
+ violation</a> of the JavaScript specification current at the time
+ of writing (ECMAScript edition 3). The JavaScript specification
+ requires that the ToBoolean() operator convert all objects to the
+ true value, and does not have provisions for objects acting as if
+ they were <code title="">undefined</code> for the purposes of
+ certain operators. This violation is motivated by a desire for
+ compatibility with two classes of legacy content: one that uses the
+ presence of <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> as a
+ way to detect legacy user agents, and one that only supports those
+ legacy user agents and uses the <code title=dom-document-all><a href=#dom-document-all>document.all</a></code> object without testing
+ for its presence first. <a href=#refsECMA262>[ECMA262]</a></p>
+
</div>
Modified: source
===================================================================
--- source 2009-07-14 03:17:22 UTC (rev 3402)
+++ source 2009-07-14 04:59:57 UTC (rev 3403)
@@ -84058,17 +84058,42 @@
attribute must return an <code>HTMLCollection</code> rooted at the
<code>Document</code> node, whose filter matches all elements.</p>
- <p>The user agent must act as if the ToBoolean() operator in
- JavaScript converted the object returned for <code
- title="dom-document-all">all</code> to the false value.</p>
+ <p>The object returned for <code title="dom-document-all">all</code>
+ has several unusual behaviors:</p>
- <p class="note">This is a <span>willful violation</span> of the
- JavaScript specification current at the time of writing (ECMAScript
- edition 3). The JavaScript specification requires that the
- ToBoolean() operator convert all objects to the true value. This
- violation is motivated by a desire for compatibility with legacy
- content. <a href="#refsECMA262">[ECMA262]</a></p>
+ <ul>
+ <li><p>The user agent must act as if the ToBoolean() operator in
+ JavaScript converts the object returned for <code
+ title="dom-document-all">all</code> to the false value.</p></li>
+
+ <li><p>The user agent must act as if, for the purposes of the <code
+ title="">==</code> and <code title="">!=</code> operators in
+ JavaScript, the object returned for <code
+ title="dom-document-all">all</code> is equal to the <code
+ title="">undefined</code> value.</p></li>
+
+ <li><p>The user agent must act such that the <code
+ title="">typeof</code> operator in JavaScript returns the string
+ <code title="">undefined</code> when applied to the object returned
+ for <code title="dom-document-all">all</code>.</p></li>
+
+ </ul>
+
+ <p class="note">These requirements are a <span>willful
+ violation</span> of the JavaScript specification current at the time
+ of writing (ECMAScript edition 3). The JavaScript specification
+ requires that the ToBoolean() operator convert all objects to the
+ true value, and does not have provisions for objects acting as if
+ they were <code title="">undefined</code> for the purposes of
+ certain operators. This violation is motivated by a desire for
+ compatibility with two classes of legacy content: one that uses the
+ presence of <code title="dom-document-all">document.all</code> as a
+ way to detect legacy user agents, and one that only supports those
+ legacy user agents and uses the <code
+ title="dom-document-all">document.all</code> object without testing
+ for its presence first. <a href="#refsECMA262">[ECMA262]</a></p>
+
</div>
More information about the Commit-Watchers
mailing list