W3C home > Mailing lists > Public > public-html-commits@w3.org > July 2009

html5/spec Overview.html,1.2532,1.2533

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 14 Jul 2009 05:00:12 +0000
To: public-html-commits@w3.org
Message-Id: <E1MQa7h-0004wN-2v@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv18845

Modified Files:
	Overview.html 
Log Message:
Introduce more magic for document.all. (whatwg r3403)

Index: Overview.html
===================================================================
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:00:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 14 July 2009 05:00:23 GMT