Browse files

[giow] (2) Introduce more magic for document.all.

git-svn-id: http://svn.whatwg.org/webapps@3403 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent c36aed0 commit 1174692c263515cc53e8e5018f797b3a772f302d @Hixie Hixie committed Jul 14, 2009
Showing with 60 additions and 19 deletions.
  1. +25 −9 index
  2. +35 −10 source
View
34 index
@@ -71225,15 +71225,31 @@ time:empty { binding: <i title="">time</i>; }</pre>
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 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>
+ <p>The object returned for <code title=dom-document-all><a href=#dom-document-all>all</a></code>
+ has several unusual behaviors:</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>
View
45 source
@@ -84058,16 +84058,41 @@ time:empty { binding: <i title="">time</i>; }</pre>
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 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>
+ <p>The object returned for <code title="dom-document-all">all</code>
+ has several unusual behaviors:</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>

0 comments on commit 1174692

Please sign in to comment.