hixie: Introduce more magic for document.all. (whatwg r3403)

hixie: Introduce more magic for document.all. (whatwg r3403)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2532&r2=1.2533&f=h
http://html5.org/tools/web-apps-tracker?from=3402&to=3403

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2532
retrieving revision 1.2533
diff -u -d -r1.2532 -r1.2533
--- Overview.html 14 Jul 2009 03:17:27 -0000 1.2532
+++ Overview.html 14 Jul 2009 05:00:08 -0000 1.2533
@@ -65032,15 +65032,31 @@
   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="#references">[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="#references">[ECMA262]</a></p>
 
   </div><h2 id="no"><span class="secno">13 </span>Things that you can't do with this specification because
   they are better handled using other technologies that are further

Received on Tuesday, 14 July 2009 05:02:09 UTC