W3C home > Mailing lists > Public > public-html-commits@w3.org > August 2008

html5/spec Overview.html,1.1241,1.1242

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 12 Aug 2008 23:59:17 +0000
To: public-html-commits@w3.org
Message-Id: <E1KT3ll-0006Tf-9P@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv24864

Modified Files:
	Overview.html 
Log Message:
Tighten up document.open()'s type argument processing. (whatwg r2064)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1241
retrieving revision 1.1242
diff -u -d -r1.1241 -r1.1242
--- Overview.html	12 Aug 2008 22:46:32 -0000	1.1241
+++ Overview.html	12 Aug 2008 23:59:14 -0000	1.1242
@@ -8897,17 +8897,25 @@
      before emitting an end-of-file token).
 
    <li>Mark the document as being an <a href="#html-" title="HTML
-    documents">HTML document</a> (it might already be so-marked).</li>
-   <!-- text/plain handling -->
+    documents">HTML document</a> (it might already be so-marked).
 
-   <li>
-    <p>If <var title="">type</var> does not have the value
-     "<code>text/html</code>"<!-- XXX matched how?
-   -->, then act as if the
-     tokeniser had emitted a start tag token with the tag name "pre", then
-     set the <a href="#html-0">HTML parser</a>'s <a
+   <li> <!-- text/plain handling -->
+    <p>If <var title="">type</var> is an <a href="#ascii">ASCII
+     case-insensitive</a> match for the stirng "<code>text/plain</code>",
+     then act as if the tokeniser had emitted a start tag token with the tag
+     name "pre", then set the <a href="#html-0">HTML parser</a>'s <a
      href="#tokenization0">tokenization</a> stage's <a
-     href="#content4">content model flag</a> to <em>PLAINTEXT</em>.
+     href="#content4">content model flag</a> to <em>PLAINTEXT</em>.</p>
+
+    <p class=note>All other values are treated as <code>text/html</code>.</p>
+    <!--
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fgif')%3B%0D%0A%20%20var%20a%20%3D%20%5B%200x47%2C%200x49%2C%200x46%2C%200x38%2C%200x39%2C%200x61%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x80%2C%200xff%2C%200x00%2C%200xc0%2C%200xc0%2C%200xc0%2C%200x00%2C%200x00%2C%200x00%2C%200x21%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200xf9%2C%200x04%2C%200x01%2C%200x00%2C%200x00%2C%200x00%2C%200x00%2C%200x2c%2C%200x00%2C%200x00%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x00%2C%200x00%2C%200x01%2C%200x00%2C%200x01%2C%200x00%2C%200x00%2C%200x02%2C%200x02%2C%200x44%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%200x01%2C%200x00%2C%200x3b%20%5D%3B%0D%0A%20%20var%20s%20%3D%20%22%22%3B%0D%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20a.length%3B%20i%20%2B%3D201)%0D%0A%20%20%20%20s%20%2B%3D%20String.fromCharCode(a%5Bi%5D)%3B%0D%0A%20%20d.write(s)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27Text%2Fplain%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27%20text%2Fplain%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
+ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20{%20%0A%20%20var%20d%20%3D%20document.getElementsByTagName(%27iframe%27)[0].contentDocument%3B%0A%20%20d.open(%27text%2Fplain%3B%27)%3B%0A%20%20d.write(%27%3Cb%3Etest%27)%3B%0A%20%20d.close()%3B%0A}%3B%3C%2Fscript%3E
+    -->
+    
 
    <li>
     <p>If <var title="">replace</var> is false, then:
@@ -8938,12 +8946,6 @@
     <p>Return the <code>Document</code> on which the method was invoked.
   </ol>
 
-  <p class=big-issue>We shouldn't hard-code <code>text/plain</code> there. We
-   should do it some other way, e.g. hand off to the section on
-   content-sniffing and handling of incoming data streams, the part that
-   defines how this all works when stuff comes over the network.</p>
-  <!-- XXX Should we support XML/XHTML as a type to that method? -->
-
   <p>When called with three or more arguments, the <code
    title=dom-document-open><a href="#open">open()</a></code> method on the
    <code><a href="#htmldocument">HTMLDocument</a></code> object must call the
Received on Tuesday, 12 August 2008 23:59:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 9 October 2008 20:32:58 GMT