<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML 5 &#187; WHATWG</title>
	<atom:link href="http://www.htmlfive.net/category/whatwg/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.htmlfive.net</link>
	<description>A central location for HTML5 news and updates</description>
	<lastBuildDate>Tue, 31 Aug 2010 10:55:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>XHTML5 in a nutshell</title>
		<link>http://www.htmlfive.net/xhtml5-in-a-nutshell/</link>
		<comments>http://www.htmlfive.net/xhtml5-in-a-nutshell/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:51:58 +0000</pubDate>
		<dc:creator>Sergey Mavrody</dc:creator>
				<category><![CDATA[Syntax]]></category>
		<category><![CDATA[WHATWG]]></category>
		<category><![CDATA[What's Next]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=2878</guid>
		<description><![CDATA[The WHATWG Wiki portal has a nice section describing HTML vs. XHTML differences, as well as specifics of a polyglot HTML document that also would be able to serve HTML5 document as valid XML document. I'd like to review what it takes to transform an HTML5 polyglot document into a valid XHTML5 document: it appears, [...]]]></description>
			<content:encoded><![CDATA[<p>The WHATWG Wiki portal has a nice section describing HTML vs. XHTML differences, as well as specifics of a polyglot HTML document that also would be able to serve HTML5 document as valid XML document. I'd like to review what it takes to transform an HTML5 polyglot document into a valid XHTML5 document: it appears, finally the 'XHTML5' has become an official name.</p>

<p>The W3C first public working draft of "Polyglot Markup" recommendation describes <em>polyglot </em>HTML document as a document that conforms to both the HTML and XHTML syntax by using a common subset of both the HTML and XHTML and in a nutshell the HTML5 polyglot document is:</p>
<ul>
	<li>HTML5 doctype/namespace</li>
	<li>XHTML well-formed syntax</li>
</ul>
Polyglot document could serve as either HTML or XHTML, depending on browser support and MIME type. A polyglot HTML5 code essentially becomes XHTML5 document if it is served with the XML MIME type <code>application/xhtml+xml</code> .

In a nutshell the XHTML5 document is:
<ul>
	<li>HTML doctype/namespace: The <code>&lt;!DOCTYPE html&gt;</code>
definition is optional, but it would be useful in a polyglot document by  preventing browser quirks mode.</li>
	<li>XHTML well-formed syntax</li>
	<li>XML MIME type: <code> application/xhtml+xml</code>.
This MIME declaration is not visible in the source code, but it would appear in the HTTP Content-Type header that could be configured on the server. Of course, the XML MIME type is not yet supported by the current version Internet Explorer though IE can render XHTML documents.</li>
	<li>Default XHTML namespace: <code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</code></li>
	<li>Secondary namespace such as SVG, MathML, Xlink, etc. To me this is like a test, if you don’t have a need for these namespaces  in your document, then the use of XHTML is overkill in the first place.</li>
</ul>
Finally, the basic XHTML5 document would look like this:
<div style="margin-top: 15px;padding: 0 40px">
<blockquote><code> </code>
<div><span style="color: #888888">&lt;!DOCTYPE html&gt;</span></div>
<code> </code>
<div>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</div>
<code> </code>
<div style="padding-left: 15px">&lt;head&gt;</div>
<code> </code>
<div style="padding-left: 30px">&lt;title&gt;&lt;/title&gt;</div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;meta charset="UTF-8" /&gt;</span></div>
<p style="padding-left: 15px">&lt;/head&gt;</p>
<code> </code>
<div style="padding-left: 15px">&lt;body&gt;</div>
<div>
<div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;svg xmlns="http://www.w3.org/2000/svg"&gt;</span></div>
<div style="padding-left: 60px"><span style="color: #999999">&lt;rect stroke="black" fill="blue" x="45px" y="45px" width="200px" height="100px" stroke-width="2" /&gt;</span></div>
<div style="padding-left: 30px"><span style="color: #888888">&lt;/svg&gt;</span></div>
</div>
</div>
<div style="padding-left: 15px">&lt;/body&gt;</div>
<div>&lt;/html&gt;</div></blockquote>
</div>
<p>The XML declaration <code>&lt;?xml version=”1.0” encoding=”UTF-8”?&gt;</code> is not required if the default UTF-8 encoding is used: an XHTML5 validator would not mind if it is omitted. However it is strongly recommended to configure the encoding using server HTTP <code>Content-Type</code> header, otherwise this character encoding could be included in the document as part of a meta tag <code>&lt;meta charset="UTF-8" /&gt;</code>. This encoding declaration would be needed for a polyglot document so that it will be treated as UTF-8 if served as either HTML or XHTML.</p>

<p>The <em>Total Validator Tool</em> - Firefox plugin/desktop app has now the user-selectable option for XHTML5-specific  validation.</p>
<p style="margin-bottom: 40px">I would say that the main advantage of using XHTML5 would be the ability to extend HTML5 to XML-based technologies such as SVG and MathML. The disadvantage is the lack of Internet Explorer support, more verbose code, and error handling. Unless we need that extensibility, HTML5 is the way to go.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/xhtml5-in-a-nutshell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 Rationale document</title>
		<link>http://www.htmlfive.net/html5-rationale-document/</link>
		<comments>http://www.htmlfive.net/html5-rationale-document/#comments</comments>
		<pubDate>Mon, 10 May 2010 17:15:46 +0000</pubDate>
		<dc:creator>Eitan Adler</dc:creator>
				<category><![CDATA[Syntax]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=2443</guid>
		<description><![CDATA[I've started a page on the wiki to document the rationale for the decisions made about the HTML specification. There are two goals for this document: Explain why things are the way they are Explain the difference between multiple similar elements by providing example usages. One person can not possibly write the entire thing so [...]]]></description>
			<content:encoded><![CDATA[<p>I've started a page on the wiki to document the <a href="http://wiki.whatwg.org/wiki/index.php?title=Rationale">rationale</a> for the decisions made about the HTML specification. </p>

<p>There are two goals for this document:
<ol>
<li>Explain why things are the way they are</li>
<li>Explain the difference between multiple similar elements by providing example usages.</li>
</ol>
</p>

<p>One person can not possibly write the entire thing so I hope that this becomes a group process where anyone interested can contribute so go <a href="http://wiki.whatwg.org/index.php?title=Special:UserLogin&amp;type=signup">sign up</a>, <a href="http://wiki.whatwg.org/index.php?title=Special:UserLogin">log in,</a> and <a href="http://wiki.whatwg.org/index.php?title=Rationale&amp;action=edit">edit</a><!--???,PROFIT-->.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/html5-rationale-document/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 at Last Call</title>
		<link>http://www.htmlfive.net/html5-at-last-call/</link>
		<comments>http://www.htmlfive.net/html5-at-last-call/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:52:17 +0000</pubDate>
		<dc:creator>Ian Hickson</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1100</guid>
		<description><![CDATA[For a brief period today, there were no outstanding e-mails or bugs on the specs, and so I took that opportunity to transition us here at the WHATWG to the next stage of HTML5's development: Last Call! This affects three specs at the WHATWG: HTML5 Web Workers Microdata vocabularies There's also a version of the [...]]]></description>
			<content:encoded><![CDATA[<p>For a brief period today, there were no outstanding e-mails or bugs on the specs, and so I took that opportunity to transition us here at the WHATWG to the next stage of HTML5's development: Last Call! This affects three specs at the WHATWG:</p>
<ul>
 <li><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">HTML5</a>
 </li><li><a href="http://www.whatwg.org/specs/web-workers/current-work/">Web Workers</a>
 </li><li><a href="http://www.whatwg.org/specs/vocabs/current-work/">Microdata vocabularies</a>
</li></ul>
<p>There's also a version of the spec called <a href="http://www.whatwg.org/specs/web-apps/current-work/complete.html">Web Applications 1.0</a> (for nostalgic reasons) that has all of the above as well as a number of other specs, namely Web Storage, Web Database, Server-sent Events, and the Web Sockets API and protocol, all together in one document. With the exception of the Web Database spec, they're all now in last call at the WHATWG.</p>
<p>So if you've been waiting to see if someone else would report the problem that you had seen, well, if it's not fixed, they didn't! So you should now send that feedback in yourself.</p>
<p>There's two ways to send feedback. If your feedback is something short and simple, you can just load up the spec in your browser, click on the section with the problem, then type in your message using the review comments box that appears at the bottom of the window, and hit the "Submit Review Comments" button. This works for the HTML5 and Web Applications 1.0 specs. (Thanks to the W3C HTML Working Group for making their bug database available to us for this purpose.)</p>
<p>If your feedback is more elaborate, then you should <a href="http://www.whatwg.org/mailing-list#specs">subscribe to the mailing list</a> and then send your feedback there.</p>
<p><i>Note: Lest there be any confusion, the W3C HTML WG has not yet transitioned HTML5 to Last Call at the W3C. HTML5 is a joint effort of W3C and WHATWG groups, but we have different issues lists and different criteria for going to Last Call. For more details on the W3C HTML WG's processes, see the <a href="http://www.w3.org/2007/03/HTML-WG-charter.html">W3C HTML WG charter</a>.</i></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/html5-at-last-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Usability testing HTML5</title>
		<link>http://www.htmlfive.net/usability-testing-html5/</link>
		<comments>http://www.htmlfive.net/usability-testing-html5/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 04:18:10 +0000</pubDate>
		<dc:creator>Ian Hickson</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=1030</guid>
		<description><![CDATA[Over the past few weeks, Google has been preparing and then running a usability study to test the microdata feature of HTML5. Methodology We first created three different variants based on the original microdata proposal: One based on what the spec said (documentation) One trying to put types in an explicit itemtype="" attribute and moving [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks, Google has been preparing and then running a usability study to test the microdata feature of HTML5.</p>
<h3>Methodology</h3>
<p>We first created three different variants based on the original microdata proposal:</p>
<ol>
 <li>One based on what the spec said (<a href="http://damowmow.com/playground/microdata/001/">documentation</a>)</li>
 <li>One trying to put types in an explicit <code>itemtype=""</code> attribute and moving "about" to <code>item=""</code>, and replacing <code>itemfor=""</code> with just having multiple <code>item=""</code>s with the same name (<a href="http://damowmow.com/playground/microdata/002/">documentation</a>)</li>
 <li>One trying to remove types altogether and using <code title="">item</code> as a boolean attribute. (<a href="http://damowmow.com/playground/microdata/003/">documentation</a>)</li>
</ol>
<p>Our plan was to run six studies, two for each variant, with each participant running through the following steps:</p>
<ol>
 <li>Read and comment on a couple of motivating slides explaining why one would care about microdata</li>
 <li>Read the provided documentation for the variant being tested</li>
 <li>Look at and comment on the <a href="http://damowmow.com/playground/microdata/001/animals-annotated.html">animals example with microdata</a> (<a href="http://damowmow.com/playground/microdata/002/animals-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/animals-annotated.html">variant 3</a>)</li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/001/flickr-annotated.html">the "flickr" example</a> (<a href="http://damowmow.com/playground/microdata/002/flickr-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/flickr-annotated.html">variant 3</a>)</li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/001/blog.html">blog example</a> (<a href="http://damowmow.com/playground/microdata/002/blog.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/blog.html">variant 3</a>)</li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/001/review.html">review example</a> (<a href="http://damowmow.com/playground/microdata/002/review.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/review.html">variant 3</a>)</li>
 <li>Compare and contrast the <a href="http://damowmow.com/playground/microdata/001/yelp-annotated.html">"yelp" example with microdata</a> to the equivalent of one of the other two variants (<a href="http://damowmow.com/playground/microdata/002/yelp-annotated.html">variant 2</a>, <a href="http://damowmow.com/playground/microdata/003/yelp-annotated.html">variant 3</a>)</li>
</ol>
<p>We made some changes along the way. After the first three, it became clear that "about" was a very confusing term to use for giving the item's global identifier, and so we changed the documentation and examples to use "itemid" instead (which turned out to be much less confusing). Early on we also introduced some documentation text to explain the differences between the variants in the last exercise, because just showing them the two side by side wasn't getting us anything useful (<a href="http://damowmow.com/playground/microdata/001-003">1 to 3</a>, <a href="http://damowmow.com/playground/microdata/002-001">2 to 1</a>, <a href="http://damowmow.com/playground/microdata/002-003">2 to 3</a>, <a href="http://damowmow.com/playground/microdata/003-001">3 to 1</a>).</p>
<p>After our sixth participant canceled on us, we decided to create a fourth variant (<a href="http://damowmow.com/playground/microdata/004/introduction">documentation</a>) based on what we'd learnt with the first five, and to get two more participants to test this variant specifically. For these participants, we used the following methodology:</p>
<ol>
 <li>Read and comment on a couple of motivating slides explaining why one would care about microdata</li>
 <li>Read the provided documentation for the variant being tested</li>
 <li>Look at and comment on the <a href="http://damowmow.com/playground/microdata/004/animals-annotated.html">animals example with microdata</a></li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/004/flickr-annotated.html">the "flickr" example</a></li>
 <li>Exercise: try to extract the data from <a href="http://damowmow.com/playground/microdata/004/review-annotated.html">the review example</a></li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/004/blog.html">blog example</a></li>
 <li>Exercise: try to annotate the <a href="http://damowmow.com/playground/microdata/004/yelp.html">"yelp" example</a></li>
</ol>
<h3>Conclusions</h3>
<p>Some interesting things came out of this study. First, as mentioned above, the term "about" turns out to be highly non-intuitive. I originally took the word from RDFa, on the principle that they knew more about this than I did, but our participants had a lot of trouble with that term. When we changed it to "itemid", there was a marked improvement in people's understanding of the concept.</p>
<p>Second, people were much less confused about types than I thought they would be. In preparing for this study I discussed microdata with a number of people, and I found that one major area of confusion was the concept of types vs the concept of properties. This is why variant 3 has no types: I wanted to find out whether people had trouble with them or not. Well, not only did people not have problems with types, several participants went out of their way to specify the type of an item, for example using the attribute name "type" instead of "item" in variant 1.</p>
<p>It seems that while reasoning about types at the theoretical level is somewhat confusing, it isn't so confusing that the concept should be kept out of the language. Instead, types should just be more explicitly mentioned. This is why we renamed "item" to "itemtype".</p>
<p>Third, people were confused by the scoping nature of the "item" attribute. Some of our participants never understood scoping at all, and most of the participants who understood the concept were still quite confused by the "item" attribute. We were encouraged, however, by one variant 1 participant's sudden enlightenment when they saw variant 3's "itemscope" attribute, and by the reaction of the variant 3 participant to the "itemscope" attribute compared to the reactions that the other two variants' participants had to their "item" attributes. This is why we split "item" into "itemtype" and "itemscope", instead of just using "itemtype".</p>
<p>We found that people who understood microdata's basic features also understood "itemfor", but while we were doing the study, it was pointed out on the WHATWG list that "itemfor" makes it impossible to find the properties of an item without scanning the whole document. This is why we tested the &lt;itemref> idea in variant 4. People were at least as able to understand this as "itemfor".</p>
<p>In general, the changes we made for variant 4 were all quite successful. With one exception, that's what HTML5 now says. The one exception is that I hoisted the "itemid" property to an attribute like "itemtype", based on the argument that if people want to scan a document for the item with a particular "itemid", &lt;itemref> would make it impossible to do it for the property without creating the microdata graph for the entire page.</p>
<p>One thing we weren't trying to test but which I was happy to see is that people really don't have any problems dealing with URLs as property names. In fact, they didn't even complain about URLs being long, which reassured me that microdata's lack of URL shortening mechanisms is probably not an issue.</p>
<p>Overall, this was a good and useful experience. I hope we can use usability studies to test other parts of HTML5 in the future.</p>
<h3>Update</h3>
<p>(Added based on Twitter feedback.) Some people have asked to see the raw data we collected in this study. I've uploaded <a href="http://damowmow.com/playground/microdata/results/">the raw files</a> as they were at the end of each participant's one-hour session. This data on its own isn't especially useful; what matters is how the participants reached their conclusions. There are seven hours' worth of video to document that, but we can't publish the video online, since that would be a violation of the legal agreement we have with the participants to protect their privacy.</p>
<p>The study was conducted by one of Google's usability study moderators, and the participants were screened and recruited by a separate team of usability study recruiters specifically for this study. Our criteria were intended to find Web developers who were somewhat comfortable with HTML and who had at most a passing knowledge of the HTML5 effort.</p>
<p>Bear in mind, when looking at the raw data, that the participants had just one hour to go from not knowing about this at all, to being expected to read and write code in a new syntax, with no hints other than the examples and the documentation (which most only glanced at!).</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/usability-testing-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spelling HTML5</title>
		<link>http://www.htmlfive.net/spelling-html5/</link>
		<comments>http://www.htmlfive.net/spelling-html5/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 14:21:35 +0000</pubDate>
		<dc:creator>Henri Sivonen</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=975</guid>
		<description><![CDATA[What’s the right way to spell “HTML5”? The short answer is: “HTML5” (without a space).

People in the WHATWG community have commonly referred to HTML5 as “HTML5” for quite a while. However, when the W3C HTML WG voted on adopting “Web Applications 1.0” the question about the title said “HTML 5”. Thus, the W3C HTML WG [...]]]></description>
			<content:encoded><![CDATA[<p>What’s the right way to spell “HTML5”? The short answer is: “HTML5” (without a space).</p>

<p>People in the WHATWG community have commonly referred to HTML5 as “HTML5” for quite a while. However, when the W3C HTML WG voted on adopting “Web Applications 1.0” the question about the title said “HTML 5”. Thus, the W3C HTML WG voted to adopt “HTML 5” as the title, but it wasn’t a vote for or against the space but about “HTML” and “5” in contrast to e.g. “Web Applications 1.0”. Anyway, as a result, the spec was retitled literally “HTML 5”.</p>

<p>This lead to inconsistency. Sometimes people kept writing “HTML5” and sometimes “HTML 5” (even on whatwg.org). This kind of inconsistency is bad for branding. <a href="http://www.zeldman.com/2009/08/31/loving-html5/">The Super Friends pointed this issue out</a> as the first thing they pointed out.</p>

<p>Now both the <a href="http://www.whatwg.org/specs/web-apps/current-work/">WHATWG Draft Standard</a> and <a href="http://dev.w3.org/html5/spec/Overview.html">W3C Editor’s Draft</a> spell it “HTML5”.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/spelling-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Response to &#8220;Notes on HTML 5&#8243;</title>
		<link>http://www.htmlfive.net/response-to-notes-on-html-5/</link>
		<comments>http://www.htmlfive.net/response-to-notes-on-html-5/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 22:55:16 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=964</guid>
		<description><![CDATA[The W3C Technical Architecture Group (TAG) is in the process of reviewing HTML 5. Noah Mendelsohn recently posted his initial, personal, not-speaking-on-behalf-of-TAG notes on HTML 5. Here are my initial, personal, not-speaking-on-behalf-of-WHATWG responses.

Limitations of the XML serialization


This may be old news, but I was surprised to see that document.write() is not supported when parsing the [...]]]></description>
			<content:encoded><![CDATA[<p>The W3C Technical Architecture Group (<abbr>TAG</abbr>) is in the process of reviewing HTML 5. Noah Mendelsohn recently posted his initial, personal, not-speaking-on-behalf-of-TAG <a href="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">notes on HTML 5</a>. Here are my initial, personal, not-speaking-on-behalf-of-WHATWG responses.</p>

<h4 id="draconian">Limitations of the XML serialization</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>This may be old news, but I was surprised to see that <code>document.write()</code> is not supported when parsing the XML serialization.  This seems to put the nail in the coffin of XML as a serialization format for colloquial HTML.  I understand that there are a variety of issues in making a sensible definition of how this would work, but my intuition is that it could be done reasonably cleanly (albeit not with most off-the-shelf XML parsers).</p>
</blockquote>

<p>Many, many things helped drive the nail in the coffin of XML as a serialization format for colloquial HTML. This was probably one of them. Others that come to mind:</p>

<ul>
<li>Draconian error handling enforced at runtime does not scale to the complexities of modern-day web applications. Ensuring well-formedness becomes increasingly difficult when content is dynamically cobbled together from multiple sources, some of which are beyond your control (user-generated content, third-party ad servers, and so on).</li>
<li>It provides no perceivable benefit to users. Draconianly handled content does not do more, does not download faster, and does not render faster than permissively handled content. Indeed, it is almost guaranteed to download slower, because it requires more bytes to express the same meaning -- in the form of end tags, self-closing tags, quoted attributes, and other markup which provides no end-user benefit but serves only to satisfy the artifical constraints of an intentionally restricted syntax.</li>
<li>IE never supported it, forcing you down the rabbit hole of polyglot documents.</li>
</ul>

<h4 id="applicable">Other applicable specifications</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>"Authors must not use elements, attributes, and attribute values for purposes other than their appropriate intended semantic purpose. Authors must not use elements, attributes, and attribute values that are not permitted by this specification or other applicable specifications." This is one of the most important sentences in the entire specification, but it's somewhat vague. If "other applicable specifications" means: any specification that anyone claims is applicable to HTML 5 extension, then we can extend the langauge with most any element without breaking conformance; if "applicable specifications" is a smaller (or empty) set, then this may be saying that HTML 5 has limited (or zero) extensibility.</p>
</blockquote>

<p>The phrase "or other application specifications" is indeed quite important, and quite intentional. It explicitly allows something that previous HTML specifications only implicitly allowed, or disallowed-but-everyone-ignored-that-part: future specifications which extend the vocabulary of previous specifications. <a href="http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2009Jul/0091.html">Ian Hickson uses RDFa as an example</a>: "If an RDFa specification said that text/html could have arbitrary xmlns:* attributes, then the HTML5 specification would (by virtue of the above-quoted sentence) defer to it and thus it would be allowed. ... Of course, if a community doesn't acknowledge the authority of such a spec, and they _do_ acknowledge the authority of the HTML5 spec, then it would be (for them) as if that spec didn't exist. Similarly, there might be a community that only acknowledges the HTML4 spec and doesn't consider HTML5 to be relevant, in which case for them, HTML5 isn't relevant. This is how specs work."</p>

<p><a href="http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2009Jul/0096.html">In response to a question about how validators could possible work with such flexible constraints</a>, Ian Hickson writes, "The same way validators work now. The validator implementors decide which specs they think are relevant to their users. The W3C CSS validator, for instance, can be configured to check against CSS2.1 rules or against SVG rules about CSS. It can't be configured to check against CSS2.1 + the :-moz-any-link extension, because the CSS validator implementors have decided that CSS2.1 and SVG are relevant, but not the Mozilla CSS extensions. ... The W3C HTML validator, similarly, supports checking a document against XHTML 1.1, or XHTML + RDFa, or XHTML + SVG, but doesn't support checking it against XHTML + DOCBOOK. So its implementors have decided that RDFa, SVG, and XHTML are relevant, but DOCBOOK is not."</p>

<p>People who think that such lack of constraints can only lead to madness go strangely silent when it is pointed out that <a href="http://lists.w3.org/Archives/Public/public-rdf-in-xhtml-tf/2009Jul/0097.html">they have already violated such constraints</a>, and the world failed to end as a result.</p>

<h4 id="url">URL terminology</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>The HTML 5 draft uses the term URL, not URI.</p>
</blockquote>

<p>I was under the impression that HTML 5 uses the term "URL" because that's what everyone else in the world uses (outside a few standards wonks who know the difference between URLs, URIs, IRIs, XRIs, LEIRIs, and so on). A few minutes of research supported my impression. <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7392#c1">Quoth Ian Hickson</a>: "'URL' is what everyone outside the standards world calls them. The few people who understand what on earth IRI, URN, URI, and URL are supposed to mean and how to distinguish them have demonstrated that they are able to understand such complicated terminology and can deal with the reuse of the term 'URL'. Others, who think 'URL' mean exactly what the HTML5 spec defines it as, have not demonstrated an ability to understand these subtleties and are better off with us using the term they're familiar with. The real solution is for the URI and IRI specs to be merged, for the URI spec to change its definitions to match what 'URL' is defined as in HTML5 (e.g. finally defining error handling as part of the core spec), and for everyone to stop using terms other than 'URL'."</p>

<p>It should be noted that not everyone agrees with this. For example, Roy Fielding (who obviously understands the subtle differences between URLs and other things) <a href="http://www.w3.org/2002/09/wbs/40318/wd08/results">recently stated</a>: "Use of the term URL in a manner that directly contradicts an Internet standard is negligent and childish. HTML5 can rot until that is fixed." Maciej Stachowiak, recently appointed co-chair of the W3C HTML Working Group, recently stated: "<a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1237.html">We need to get the references in order first</a>, because whether HTML5 references Web Address, or IRIbis, or something else, makes a difference to what we'll think about the naming issue. We need to decide as a Working Group if it's acceptable to use the term URL in a different way than RFC3986 (while making the difference clear). If it's unacceptable, then we need to propose an alternate term."</p>

<p>As <a href="http://www.google.com/search?q=cache+invalidation+and+naming+things">the old saying goes</a>, "There are only two hard problems in Computer Science: cache invalidation and naming things." I personally don't care about the matter either way, but there is obviously a wide spectrum of opinion.</p>

<h4 id="iribis">IRI-bis</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>It's unclear whether the factoring to reference WebAddr and/or IRI-bis will be retained.</p>
</blockquote>

<p>"WebAddr" refers to <a href="http://lists.w3.org/Archives/Public/public-html/2009Mar/att-0444/draft.html">Web Addresses</a>, a <a href="http://www.w3.org/html/wg/tracker/actions/68">now-defunct proposal</a> to split out the definition of "URL" that HTML 5 uses (which intentionally differs from the "official" definition in order to handle existing web content). The work on the "Web Addresses" specification has now been rolled into IRI-bis; "bis" means "next," so "IRI-bis" means "the next version of the IRI specification." <a href="http://lists.w3.org/Archives/Public/public-iri/2009Jul/0032.html">According to Ian Hickson</a>, so important definitions were lost in the process of splitting out "Web Addresses" from HTML 5 and subsequently merging "Web Addresses" into IRI-bis. There is also some <a href="http://lists.w3.org/Archives/Public/public-iri/2009Aug/0000.html">feedback about newlines within URLs</a>.</p>

<p><a href="http://lists.w3.org/Archives/Public/public-iri/">Work on IRI-bis</a> is ongoing. As it relates to HTML 5, it is tracked as <a href="http://www.w3.org/html/wg/tracker/issues/56">HTML ISSUE-56</a>.</p>

<h4 id="sniff">Content sniffing</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>HTML 5 calls for user agents to ignore normative Content-type in certain cases.</p>
</blockquote>

<p>HTML 5 calls for user agents to ignore normative Content-Type in certain cases because this is required to handle existing web content. Based on <a type="application/pdf" href="http://www.adambarth.com/papers/2009/barth-caballero-song.pdf">[PDF] the research of Adam Barth and others</a> into the content sniffing rules of a certain closed-source market-dominating browser, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=500713">progress has been made</a> towards <em>reducing</em> the amount of content sniffing on the public web. (Counterpoint: two steps forward, <a href="http://intertwingly.net/blog/2008/07/02/authoritative-true">one step back</a>.)</p>

<p>Personally, I have <a href="http://diveintomark.org/archives/2004/08/13/safari-content-sniffing">long</a> been <a href="http://diveintomark.org/archives/2006/09/12/sniff">opposed</a> to content sniffing, but if sniffing is going to occur, I would vastly prefer documented algorithms to undocumented ones. The "hope" behind documenting the sniffing rules now is that the web community can "freeze" the rules now and forever, i.e. not add any more complexity to an already complex world. I am personally skeptical, since HTML 5 also introduces (or at least promotes-to-their-own-elements) two new media families, audio and video, for which undocumented or underdocumented sniffing may already occur within proprietary browser plug-ins. And with <code>@font-face</code> support shipping or on the verge of shipping in multiple browsers, there may be new sniffing rules introduced there as well. I hope my concerns are unfounded.</p>

<p>Still, having sniffing rules documented in HTML 5 may -- <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=500713">someday soon</a> -- reduce the complexity of a shipping product. And how often does <em>that</em> happen?</p>

<h4 id="violations">Willful violations</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>HTML 5 acknowledges in several places that it is in "willful violation" of other specifications from the W3C and IETF.</p>
</blockquote>

<p>As stated in <a href="http://www.w3.org/TR/2009/WD-html5-20090825/introduction.html#compliance-with-other-specifications">&sect;1.5.2 Compliance with other specifications</a>, "This specification interacts with and relies on a wide variety of other specifications. In certain circumstances, unfortunately, the desire to be compatible with legacy content has led to this specification violating the requirements of these other specifications. Whenever this has occurred, the transgressions have been noted as 'willful violations'."</p>

<p>This is the complete list of "willful violations" in the <a href="http://www.w3.org/TR/2009/WD-html5-20090825/">August 25th W3C Editor's Draft of HTML 5</a>. (The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/">WHATWG draft</a> changes almost daily, whenever <a href="http://html5.org/tools/web-apps-tracker">a change is checked in</a>.)</p>

<ol>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/infrastructure.html#terminology-0">&sect;2.5.1 Terminology</a>: "The term "URL" in this specification is used in a manner distinct from the precise technical meaning it is given in RFC 3986. Readers familiar with that RFC will find it easier to read this specification if they pretend the term "URL" as used herein is really called something else altogether. This is a willful violation of RFC 3986."</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/infrastructure.html#character-encodings-0">&sect;2.7 Character Encodings</a>: "The requirement to treat certain encodings as other encodings according to the table above is a willful violation of the W3C Character Model specification, motivated by a desire for compatibility with legacy content." Related bugs: <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7444">Bug 7444</a>, <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7453">bug 7453</a>, <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7215">bug 7215</a>, <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7381">bug 7381</a>. There was a recent discussion about character encoding, starting with <a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1017.html">Addison Phillips' feedback on behalf of the I18N working group</a>, with <a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/thread.html#msg1017">several followups</a>. Some salient quotes: Maciej (Apple, Safari): "<a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1018.html">Browsers for Latin-script locales</a> pretty much universally use Windows-1252 as the default of last resort. This is necessary to be compatible with legacy content on the existing Web." Mark Davis (Google): "<a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1060.html">At Google, the encoding label is taken only as a weak signal</a> (a small factor in the heuristic detection). It is completely overwhelmed by the byte content analysis. (There are too many unlabeled pages *and mislabeled pages* for the label to be used as is.)" Henri Sivoven (Mozilla contributor), in response to a question about what constitutes a "legacy environment" for the purposes of character encoding detection: "<a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1021.html">The Web is a legacy environment</a>." (<a href="http://lists.w3.org/Archives/Public/public-html/2009Aug/1401.html">Ian Hickson echoes this sentiment</a>.)</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/infrastructure.html#character-encodings-0">&sect;2.7 Character Encodings</a>: "The requirement to default UTF-16 to LE rather than BE is a willful violation of RFC 2781, motivated by a desire for compatibility with legacy content."</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/embedded-content-0.html#interactions-with-xpath-and-xslt">&sect;3.4 Interactions with XPath and XSLT</a>: "These requirements are a willful violation of the XPath 1.0 specification, motivated by desire to have implementations be compatible with legacy content while still supporting the changes that this specification introduces to HTML regarding which namespace is used for HTML elements."</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/embedded-content-0.html#interactions-with-xpath-and-xslt">&sect;3.4 Interactions with XPath and XSLT</a>: "If the transformation program outputs an element in no namespace, the processor must, prior to constructing the corresponding DOM element node, change the namespace of the element to the HTML namespace, ASCII-lowercase the element's local name, and ASCII-lowercase the names of any non-namespaced attributes on the element. This requirement is a willful violation of the XSLT 1.0 specification, required because this specification changes the namespaces and case-sensitivity rules of HTML in a manner that would otherwise be incompatible with DOM-based XSLT transformations. (Processors that serialize the output are unaffected.)" There is a long discussion of these two violations in the comments of <a href="http://www.w3.org/Bugs/Public/show_bug.cgi?id=7059">bug 7059</a>.</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/forms.html#form-submission-algorithm">&sect;4.10.16.3 Form submission algorithm</a>: "Step 9: If <code>action</code> is the empty string, let <code>action</code> be the document's address. This step is a willful violation of RFC 3986, which would require base URL processing here. This violation is motivated by a desire for compatibility with legacy content."</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/browsers.html#processing-model-1">&sect;6.5.3 Script processing model</a>: "If the script's global object is a <code>Window</code> object, then in JavaScript, the <code>this</code> keyword in the global scope must return the <code>Window</code> object's <code>WindowProxy</code> object. This is a willful violation of the JavaScript specification current at the time of writing (ECMAScript edition 3). The JavaScript specification requires that the <code>this</code> keyword in the global scope return the global object, but this is not compatible with the security design prevalent in implementations as specified herein."</li>
<li><a href="http://www.w3.org/TR/2009/WD-html5-20090825/obsolete.html#other-elements-attributes-and-apis">&sect;12.3.4 Other elements, attributes, and APIs</a>: Regarding <code>document.all</code>, "These requirements are a willful violation of the JavaScript specification current at the time of writing (ECMAScript edition 3). The JavaScript specification requires that the <code>ToBoolean()</code> operator convert all objects to the true value, and does not have provisions for objects acting as if they were undefined 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>document.all</code> as a way to detect legacy user agents, and one that only supports those legacy user agents and uses the <code>document.all</code> object without testing for its presence first."</li>
</ol>

<p>As you can probably guess from these quotes, the HTML 5 community has decided that compatibility with existing web content trumps all other concerns. Other than the use of the term "URL," all of the "willful violations" are instances where other specifications do not adequately describe existing web content. I personally do not understand most of the issues listed here, so I have no opinion on whether the alleged benefit of violating existing standards is worth the alleged cost.</p>

<h4 id="versioning">Versioning</h4>

<blockquote cite="http://www.w3.org/2001/tag/2009/09/TagHTMLIssues.html">
<p>In-band global version identifiers, if new implementations handle them reasonably, may be useful for (a) authoring applications that want to track versions used for authoring (b) informative error handling when applications encounter constructs that are apparently 'in error'.</p>
</blockquote>

<p>The idea of version identifiers has been hashed and rehashed throughout the 5+ year process of defining HTML 5. Most notably, <a href="http://lists.w3.org/Archives/Public/public-html/2007Apr/0612.html">Microsoft proposed a version identifer</a> shortly after the W3C HTML Working Group reformed around HTML 5. Their proposal <a href="http://lists.w3.org/Archives/Public/public-html/2007Apr/thread.html#msg612">generated much discussion</a>, but <a href="http://lists.w3.org/Archives/Public/public-html/2007Apr/0637.html">was not ultimately adopted</a>. Several months later, Microsoft shipped Internet Explorer 8 with a "feature" called <a href="http://www.alistapart.com/articles/beyonddoctype">X-UA-Compatible</a>, which serves as a kind of IE-specific version identifier. <a href="http://diveintomark.org/archives/2008/03/18/translation-from-ms-speak-to-english-of-selected-portions-of-joel-spolskys-martin-headsets#comment-11565">I am personally not a fan</a> of this approach, in part because <a type="image/png" href="http://hsivonen.iki.fi/doctype/ie8-mode.png">[PNG] it adds a lot of complexity for web developers</a> who want to figure out why the still-dominant browser doesn't render their content according to standards.</p>

<p>Versioning in HTML 5 is tracked as <a href="http://www.w3.org/html/wg/tracker/issues/4">HTML ISSUE-4</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/response-to-notes-on-html-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help us review HTML5!</title>
		<link>http://www.htmlfive.net/help-us-review-html5/</link>
		<comments>http://www.htmlfive.net/help-us-review-html5/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 23:01:42 +0000</pubDate>
		<dc:creator>Ian Hickson</dc:creator>
				<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=659</guid>
		<description><![CDATA[<p>Are you interested in reviewing HTML5 for errors?
<ol>
<li>Jump in! All feedback is welcome, from anyone.
</li><li>Open the specification: either the <a href="http://www.whatwg.org/specs/web-apps/current-work/">one-page version</a>, or the <a href="http://whatwg.org/html5">multipage version</a> or the PDF copy (<a href="http://www.whatwg.org/specs/web-apps/current-work/html5-a4.pdf">A4</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/html5-letter.pdf">Letter</a>)
</li><li>Start reading! See below for ideas of what to look for.
</li></ol>
</p><p>If you find a problem, either send an e-mail to <a href="http://www.whatwg.org/mailing-list#specs">the WHATWG list</a> (whatwg@whatwg.org, subscription required), <a href="http://www.w3.org/Bugs/Public/enter_bug.cgi?assigned_to=dave.null%40w3.org&#38;blocked=&#38;bug_file_loc=&#38;bug_severity=normal&#38;bug_status=NEW&#38;comment=&#38;component=Spec%20bugs&#38;contenttypeentry=&#38;contenttypemethod=autodetect&#38;contenttypeselection=text%2Fplain&#38;data=&#38;dependson=&#38;description=&#38;form_name=enter_bug&#38;keywords=externalComments&#38;maketemplate=Remember%20values%20as%20bookmarkable%20template&#38;op_sys=All&#38;priority=P3&#38;product=HTML%20WG&#38;qa_contact=public-html-bugzilla%40w3.org&#38;rep_platform=All&#38;short_desc=&#38;target_milestone=---&#38;version=unspecified">file a bug</a> (registration required), send an e-mail to the public-html-comments@w3.org list (no subscription required), or send an e-mail directly to ian@hixie.ch.
</p><p>If everything goes according to plan, all issues will get a response from the editor before October. You can track how many issues remain to be responded to <a href="http://www.whatwg.org/issues/data.html">on our graph</a>.
<h3>What to look for</h3>
</p><p>The plan is to see whether we can shake down the spec and get rid of all the minor problems that have so far been overlooked. Typos, confusion, cross-reference errors, as well as mistakes in examples, errors in the definitions, and major errors like security bugs or contradictions.
</p><p>Anyone who helps find problems in the spec — however minor — will get their name in the acknowledgements section.
</p><p>You don't really need any experience to find the simplest class of problems: things that are confusing! If you don't understand something, then that's a problem. Not all the introduction sections and examples are yet written, but if there is a section with an introduction section that isn't clear, then you've found an issue: let us know!
</p><p>Something else that would now be good to search for is typos, spelling errors, grammar errors, and the like. Don't hesitate to send e-mails even for minor typos, all feedback even on such small issues is very welcome.
</p><p>If you have a specific need as a Web designer, then try to see if the need is met. If it isn't, and you haven't discussed this need before, then send an e-mail to the list. (So for example, if you want HTML to support date picker widgets, you'd look in the spec to see if it was covered. As it turns out, that one is!)
</p><p>If you have some specific expertise that lets you review a particular part of the spec for correctness, then that's another thing to look for. For example if you know about graphics, then reviewing the 2D Canvas API section would be a good use of your resources. If you know about scripting, then looking at the "Web browsers" section would be a good use of your time.
<h3>Staying in touch</h3>
</p><p>You are encouraged to join our IRC channel #whatwg on Freenode to stay in touch with what other people are doing, but this is by no means required. You are also encouraged to post in the <a href="http://wiki.whatwg.org/wiki/Reviewing_HTML5#Discussion">Discussion section</a> on <a href="http://wiki.whatwg.org/wiki/Reviewing_HTML5">the wiki page for this review project</a>, or in the blog comments below, to let people know what you are reviewing. You can get news updates by following <a href="http://twitter.com/WHATWG">@WHATWG</a> on Twitter.
</p>]]></description>
			<content:encoded><![CDATA[<p>Are you interested in reviewing HTML5 for errors?
<ol>
<li>Jump in! All feedback is welcome, from anyone.
</li><li>Open the specification: either the <a href="http://www.whatwg.org/specs/web-apps/current-work/">one-page version</a>, or the <a href="http://whatwg.org/html5">multipage version</a> or the PDF copy (<a href="http://www.whatwg.org/specs/web-apps/current-work/html5-a4.pdf">A4</a>, <a href="http://www.whatwg.org/specs/web-apps/current-work/html5-letter.pdf">Letter</a>)
</li><li>Start reading! See below for ideas of what to look for.
</li></ol>
</p><p>If you find a problem, either send an e-mail to <a href="http://www.whatwg.org/mailing-list#specs">the WHATWG list</a> (whatwg@whatwg.org, subscription required), <a href="http://www.w3.org/Bugs/Public/enter_bug.cgi?assigned_to=dave.null%40w3.org&amp;blocked=&amp;bug_file_loc=&amp;bug_severity=normal&amp;bug_status=NEW&amp;comment=&amp;component=Spec%20bugs&amp;contenttypeentry=&amp;contenttypemethod=autodetect&amp;contenttypeselection=text%2Fplain&amp;data=&amp;dependson=&amp;description=&amp;form_name=enter_bug&amp;keywords=externalComments&amp;maketemplate=Remember%20values%20as%20bookmarkable%20template&amp;op_sys=All&amp;priority=P3&amp;product=HTML%20WG&amp;qa_contact=public-html-bugzilla%40w3.org&amp;rep_platform=All&amp;short_desc=&amp;target_milestone=---&amp;version=unspecified">file a bug</a> (registration required), send an e-mail to the public-html-comments@w3.org list (no subscription required), or send an e-mail directly to ian@hixie.ch.
</p><p>If everything goes according to plan, all issues will get a response from the editor before October. You can track how many issues remain to be responded to <a href="http://www.whatwg.org/issues/data.html">on our graph</a>.
<h3>What to look for</h3>
</p><p>The plan is to see whether we can shake down the spec and get rid of all the minor problems that have so far been overlooked. Typos, confusion, cross-reference errors, as well as mistakes in examples, errors in the definitions, and major errors like security bugs or contradictions.
</p><p>Anyone who helps find problems in the spec — however minor — will get their name in the acknowledgements section.
</p><p>You don't really need any experience to find the simplest class of problems: things that are confusing! If you don't understand something, then that's a problem. Not all the introduction sections and examples are yet written, but if there is a section with an introduction section that isn't clear, then you've found an issue: let us know!
</p><p>Something else that would now be good to search for is typos, spelling errors, grammar errors, and the like. Don't hesitate to send e-mails even for minor typos, all feedback even on such small issues is very welcome.
</p><p>If you have a specific need as a Web designer, then try to see if the need is met. If it isn't, and you haven't discussed this need before, then send an e-mail to the list. (So for example, if you want HTML to support date picker widgets, you'd look in the spec to see if it was covered. As it turns out, that one is!)
</p><p>If you have some specific expertise that lets you review a particular part of the spec for correctness, then that's another thing to look for. For example if you know about graphics, then reviewing the 2D Canvas API section would be a good use of your resources. If you know about scripting, then looking at the "Web browsers" section would be a good use of your time.
<h3>Staying in touch</h3>
</p><p>You are encouraged to join our IRC channel #whatwg on Freenode to stay in touch with what other people are doing, but this is by no means required. You are also encouraged to post in the <a href="http://wiki.whatwg.org/wiki/Reviewing_HTML5#Discussion">Discussion section</a> on <a href="http://wiki.whatwg.org/wiki/Reviewing_HTML5">the wiki page for this review project</a>, or in the blog comments below, to let people know what you are reviewing. You can get news updates by following <a href="http://twitter.com/WHATWG">@WHATWG</a> on Twitter.
</p><p></p><p>This item was originally posted at: <a href='http://blog.whatwg.org'>http://blog.whatwg.org</a> and is licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT license</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/help-us-review-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This week in HTML 5 &#8211; Episode 16</title>
		<link>http://www.htmlfive.net/this-week-in-html-5-episode-16/</link>
		<comments>http://www.htmlfive.net/this-week-in-html-5-episode-16/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 17:51:57 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[WHATWG]]></category>
		<category><![CDATA[Weekly Review]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=424</guid>
		<description><![CDATA[
<p>Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.</p>

<p>The big news this week is <a href="http://html5.org/tools/web-apps-tracker?from=2528&#38;to=2529">r2529</a>, which makes so many changes that I had to ask Ian to explain it to me.  This is what he said:</p>

<blockquote>
<p><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-February/014072.html">Someone asked for <code>onbeforeunload</code></a>, so I started fixing it.  Then I found that there was some rot in the drywall.  So I took down the drywall.  Then I found a rat infestation.  So I killed all the rats.  Then I found that the reason for the rot was a slow leak in the plumbing.  So I tried fixing the plumbing, but it turned out the whole building used lead pipes.  So I had to redo all the plumbing.  But then I found that the town's water system wasn't quite compatible with modern plumbing techniques, and I had to dig up the entire town.  And that's basically it.</p>
</blockquote>

<p>"Amusing, in a quiet way," said Eeyore, "but not really helpful."</p>

<p>Basically, the way that scripts are defined has changed dramatically.  Not in an terribly incompatible way, just a clearer definition that paves the way for better specification of certain properties of <code>script</code> (and <code>noscript</code>).  Let's start with the new definition of a script:</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#definitions-0">
<p>A script has:</p> 
 
  <dl><dt>A script execution environment</dt> 
 
   <dd> 
 
    <p>The characteristics of the script execution environment depend
    on the language, and are not defined by this specification.</p> 
 
    <p>In JavaScript, the script execution environment
    consists of the interpreter, the stack of <i>execution
    contexts</i>, the <i>global code</i> and <i>function code</i> and
    the Function objects resulting, and so forth.</p> 
 
   </dd> 
 
   <dt>A list of code entry-points</dt> 
 
   <dd> 
 
    <p>Each code entry-point represents a block of executable code
    that the script exposes to other scripts and to the user
    agent.</p> 
 
    <p>Each Function object in a JavaScript
    <a href="http://www.whatwg.org/specs/web-apps/current-work/#script-execution-environment">script execution environment</a> has a corresponding code
    entry-point, for instance.</p> 
 
    <p>The main program code of the script, if any, is the
    <i>initial code entry-point</i>. Typically, the code
    corresponding to this entry-point is executed immediately after
    the script is parsed.</p> 
 
    <p>In JavaScript, this corresponds to the
    execution context of the global code.</p> 
 
   </dd> 
 
   <dt>A relationship with the script's global object</dt> 
 
   <dd> 
 
    <p>An object that provides the APIs that the code can use.</p> 
 
    <p>This is typically a <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> 
    object. In JavaScript, this corresponds to the <i>global
    object</i>.</p> 
 
    <p>When a <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-global-object">script's global object</a> is an
    empty object, it can't do anything that interacts with the
    environment.</p> 
 
   </dd> 
 
   <dt>A relationship with the script's browsing context</dt> 
 
   <dd> 
 
    <p>A <a href="http://www.whatwg.org/specs/web-apps/current-work/#browsing-context">browsing context</a> that is assigned responsibility
    for actions taken by the script.</p> 
 
    <p>When a script creates and <a href="http://www.whatwg.org/specs/web-apps/current-work/#navigate">navigates</a> a new <a href="http://www.whatwg.org/specs/web-apps/current-work/#top-level-browsing-context">top-level browsing
    context</a>, the <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#dom-opener">opener</a></code> 
    attribute of the new <a href="http://www.whatwg.org/specs/web-apps/current-work/#browsing-context">browsing context</a>'s
    <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> object will be set to the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-browsing-context">script's
    browsing context</a>'s <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> object.</p> 
 
   </dd> 
 
   <dt>A character encoding</dt> 
 
   <dd> 
 
    <p>A character encoding, set when the script is created, used to
    encode URLs.  If the character encoding is
    set from another source, e.g. a <a href="http://www.whatwg.org/specs/web-apps/current-work/#document's-character-encoding">document's character
    encoding</a>, then the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-character-encoding">script's character encoding</a> 
    must follow the source, so that if the source's changes, so does
    the script's.</p> 
 
   </dd> 
 
   <dt>A base URL</dt> 
 
   <dd> 
 
    <p>A <a href="http://www.whatwg.org/specs/web-apps/current-work/#url">URL</a>, set when the script is created, used to
    resolve relative URLs. If the base URL is
    set from another source, e.g. a <a href="http://www.whatwg.org/specs/web-apps/current-work/#document-base-url">document base URL</a>,
    then the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-base-url">script's base URL</a> must follow the source, so
    that if the source's changes, so does the script's.</p> 
 
   </dd> 
 
   <dt>Membership in a script group</dt> 
 
   <dd> 
 
    <p>A group of one or more scripts that are loaded in the same
    context, which are always disabled as a group. Scripts in a script
    group all have the same <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-global-object">global object</a> and <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-browsing-context">browsing context</a>.</p> 
 
    <p>A script group can be <i>frozen</i>. When a script group is
    frozen, any code defined in that script group will throw an
    exception when invoked. A frozen script group can be
    <i>unfrozen</i>, allowing scripts in that script group to run
    normally again.</p> 
 
   </dd> 
</dl></blockquote>

<p>The most interesting part of this new definition is the <i>script group</i>, a new concept which now governs all scripts.  When a <code>Document</code> is created, it gets a fresh <i>script group</i>, which contains all the scripts that are defined (or are later created somehow) in the document.  When the user navigates away from the document, the entire script group is <i>frozen</i>, and browsers should not execute those scripts anymore.  This sounds like an obvious statement if you think of documents as individual browser windows (or tabs), but consider the case of a document with multiple frames, or one with an embedded <code>iframe</code>.  Suppose that the user clicks some link within the iframe that only navigates to a new URL within the iframe (i.e. the parent document stays the same).  The parent document may have some reference to functions defined in the old iframe.  Should it still be able to call these functions?  IE says no; other browsers say yes.  HTML 5 now says no, because when the iframe navigates to a new URL, the old iframes <i>script group</i> is frozen -- even if there are active references to those scripts (say, from the parent document), browsers shouldn't allow the page to execute them.</p>

<p>The main benefit of this new concept of script groups is that it removes a number of complications faced by the non-IE browsers.  For example, it prevents the problem of scripts suddenly discovering that their global object is no longer the object that they think of as the <code>Window</code> object.  Script groups are also frozen when calling document.open().  Freezing script groups also defines the point at which timers and other callbacks are reset, which is something that previous versions of HTML had never defined.</p>

<p>And after all of this ripping up and redefining, HTML 5 now defines <a href="http://www.whatwg.org/specs/web-apps/current-work/#unloading-documents">the <code>onbeforeunload</code> event</a>, which is already supported by major browsers.</p>

<p>Other interesting tidbits this week:</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2532&#38;to=2533">r2533</a> adds support for <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#safe-passing-of-structured-data">passing structured data</a> between documents with <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages"><code>postMessage()</code></a>. [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017828.html">structured data discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2535&#38;to=2536">r2536</a> defines the <code>NameCreator</code>, <code>NameDeleter</code>, <code>NameGetter</code>, <code>NameSetter</code>, <code>IndexGetter</code>, and <code>IndexSetter</code> anonymous methods, which are used by browsers internally to manage lists of named or indexed properties (e.g. <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-elements"><code>form.elements</code></a>, per-element <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#embedding-custom-non-visible-data">custom <code>data</code> attributes</a>, or the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-imagedata-data">pixel data of a <code>canvas</code></a>).</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2536&#38;to=2537">r2537</a> explains that you can not click something while you're already in the process of clicking it.  (Technically speaking, it makes the <code>click()</code> method non-reentrant.) [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017858.html">nested <code>click()</code> discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2537&#38;to=2538">r2538</a> clarifies that non-interactive elements that are not usually focusable, but that do currently have focus (via <a href="https://developer.mozilla.org/ARIA_User_Agent_Implementors_Guide#11.3.1.1_HTML_5_Tabindex">the <code>tabindex</code> attribute), should simulate <code>onclick</code> events when the user presses <kbd>ENTER</kbd>.  This may seem like a minor point, but it is important for building keyboard-accessible web applications.  [</a><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017859.html">onclick discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2538&#38;to=2539">r2539</a> notes that buttons (and their values) are not submitted with other form data unless they were the button that submitted the form. [<a href="http://lists.w3.org/Archives/Public/public-html/2008Dec/0157.html">button submission discussion</a>]</li>
<li><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017732.html">Silvia Pfeiffer posts thoughts on video accessibility</a> and links to <a href="https://wiki.mozilla.org/Accessibility/Video_Accessibility">this collection of video accessibility requirements</a> on the Mozilla wiki.</li>
<li>Nine years in the making, the second major edition of the <a href="http://www.w3.org/TR/WCAG20/">Web Content Accessibility Guidelines</a> is now officially a W3C Recommendation.  The guidelines are supplemented by <a href="http://www.w3.org/TR/WCAG20-TECHS/">a comprehensive techniques document</a>, for example <a href="http://www.w3.org/TR/WCAG20-TECHS/H37.html">Using <code>alt</code> attributes on <code>img</code> elements</a>.  HTML 5 also includes <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-0.html#alt">a section on using the <code>alt</code> attribute</a>, but in general you should defer to WCAG 2.0 because it was written by experts.</li>
</ul>

<p>Tune in next week for another exciting episode of "This Week in HTML 5."</p>
]]></description>
			<content:encoded><![CDATA[
<p>Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.</p>

<p>The big news this week is <a href="http://html5.org/tools/web-apps-tracker?from=2528&amp;to=2529">r2529</a>, which makes so many changes that I had to ask Ian to explain it to me.  This is what he said:</p>

<blockquote>
<p><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-February/014072.html">Someone asked for <code>onbeforeunload</code></a>, so I started fixing it.  Then I found that there was some rot in the drywall.  So I took down the drywall.  Then I found a rat infestation.  So I killed all the rats.  Then I found that the reason for the rot was a slow leak in the plumbing.  So I tried fixing the plumbing, but it turned out the whole building used lead pipes.  So I had to redo all the plumbing.  But then I found that the town's water system wasn't quite compatible with modern plumbing techniques, and I had to dig up the entire town.  And that's basically it.</p>
</blockquote>

<p>"Amusing, in a quiet way," said Eeyore, "but not really helpful."</p>

<p>Basically, the way that scripts are defined has changed dramatically.  Not in an terribly incompatible way, just a clearer definition that paves the way for better specification of certain properties of <code>script</code> (and <code>noscript</code>).  Let's start with the new definition of a script:</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#definitions-0">
<p>A script has:</p> 
 
  <dl><dt>A script execution environment</dt> 
 
   <dd> 
 
    <p>The characteristics of the script execution environment depend
    on the language, and are not defined by this specification.</p> 
 
    <p>In JavaScript, the script execution environment
    consists of the interpreter, the stack of <i>execution
    contexts</i>, the <i>global code</i> and <i>function code</i> and
    the Function objects resulting, and so forth.</p> 
 
   </dd> 
 
   <dt>A list of code entry-points</dt> 
 
   <dd> 
 
    <p>Each code entry-point represents a block of executable code
    that the script exposes to other scripts and to the user
    agent.</p> 
 
    <p>Each Function object in a JavaScript
    <a href="http://www.whatwg.org/specs/web-apps/current-work/#script-execution-environment">script execution environment</a> has a corresponding code
    entry-point, for instance.</p> 
 
    <p>The main program code of the script, if any, is the
    <i>initial code entry-point</i>. Typically, the code
    corresponding to this entry-point is executed immediately after
    the script is parsed.</p> 
 
    <p>In JavaScript, this corresponds to the
    execution context of the global code.</p> 
 
   </dd> 
 
   <dt>A relationship with the script's global object</dt> 
 
   <dd> 
 
    <p>An object that provides the APIs that the code can use.</p> 
 
    <p>This is typically a <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> 
    object. In JavaScript, this corresponds to the <i>global
    object</i>.</p> 
 
    <p>When a <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-global-object">script's global object</a> is an
    empty object, it can't do anything that interacts with the
    environment.</p> 
 
   </dd> 
 
   <dt>A relationship with the script's browsing context</dt> 
 
   <dd> 
 
    <p>A <a href="http://www.whatwg.org/specs/web-apps/current-work/#browsing-context">browsing context</a> that is assigned responsibility
    for actions taken by the script.</p> 
 
    <p>When a script creates and <a href="http://www.whatwg.org/specs/web-apps/current-work/#navigate">navigates</a> a new <a href="http://www.whatwg.org/specs/web-apps/current-work/#top-level-browsing-context">top-level browsing
    context</a>, the <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#dom-opener">opener</a></code> 
    attribute of the new <a href="http://www.whatwg.org/specs/web-apps/current-work/#browsing-context">browsing context</a>'s
    <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> object will be set to the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-browsing-context">script's
    browsing context</a>'s <code><a href="http://www.whatwg.org/specs/web-apps/current-work/#window">Window</a></code> object.</p> 
 
   </dd> 
 
   <dt>A character encoding</dt> 
 
   <dd> 
 
    <p>A character encoding, set when the script is created, used to
    encode URLs.  If the character encoding is
    set from another source, e.g. a <a href="http://www.whatwg.org/specs/web-apps/current-work/#document's-character-encoding">document's character
    encoding</a>, then the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-character-encoding">script's character encoding</a> 
    must follow the source, so that if the source's changes, so does
    the script's.</p> 
 
   </dd> 
 
   <dt>A base URL</dt> 
 
   <dd> 
 
    <p>A <a href="http://www.whatwg.org/specs/web-apps/current-work/#url">URL</a>, set when the script is created, used to
    resolve relative URLs. If the base URL is
    set from another source, e.g. a <a href="http://www.whatwg.org/specs/web-apps/current-work/#document-base-url">document base URL</a>,
    then the <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-base-url">script's base URL</a> must follow the source, so
    that if the source's changes, so does the script's.</p> 
 
   </dd> 
 
   <dt>Membership in a script group</dt> 
 
   <dd> 
 
    <p>A group of one or more scripts that are loaded in the same
    context, which are always disabled as a group. Scripts in a script
    group all have the same <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-global-object">global object</a> and <a href="http://www.whatwg.org/specs/web-apps/current-work/#script's-browsing-context">browsing context</a>.</p> 
 
    <p>A script group can be <i>frozen</i>. When a script group is
    frozen, any code defined in that script group will throw an
    exception when invoked. A frozen script group can be
    <i>unfrozen</i>, allowing scripts in that script group to run
    normally again.</p> 
 
   </dd> 
</dl></blockquote>

<p>The most interesting part of this new definition is the <i>script group</i>, a new concept which now governs all scripts.  When a <code>Document</code> is created, it gets a fresh <i>script group</i>, which contains all the scripts that are defined (or are later created somehow) in the document.  When the user navigates away from the document, the entire script group is <i>frozen</i>, and browsers should not execute those scripts anymore.  This sounds like an obvious statement if you think of documents as individual browser windows (or tabs), but consider the case of a document with multiple frames, or one with an embedded <code>iframe</code>.  Suppose that the user clicks some link within the iframe that only navigates to a new URL within the iframe (i.e. the parent document stays the same).  The parent document may have some reference to functions defined in the old iframe.  Should it still be able to call these functions?  IE says no; other browsers say yes.  HTML 5 now says no, because when the iframe navigates to a new URL, the old iframes <i>script group</i> is frozen -- even if there are active references to those scripts (say, from the parent document), browsers shouldn't allow the page to execute them.</p>

<p>The main benefit of this new concept of script groups is that it removes a number of complications faced by the non-IE browsers.  For example, it prevents the problem of scripts suddenly discovering that their global object is no longer the object that they think of as the <code>Window</code> object.  Script groups are also frozen when calling document.open().  Freezing script groups also defines the point at which timers and other callbacks are reset, which is something that previous versions of HTML had never defined.</p>

<p>And after all of this ripping up and redefining, HTML 5 now defines <a href="http://www.whatwg.org/specs/web-apps/current-work/#unloading-documents">the <code>onbeforeunload</code> event</a>, which is already supported by major browsers.</p>

<p>Other interesting tidbits this week:</p>

<ul>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2532&amp;to=2533">r2533</a> adds support for <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#safe-passing-of-structured-data">passing structured data</a> between documents with <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages"><code>postMessage()</code></a>. [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017828.html">structured data discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2535&amp;to=2536">r2536</a> defines the <code>NameCreator</code>, <code>NameDeleter</code>, <code>NameGetter</code>, <code>NameSetter</code>, <code>IndexGetter</code>, and <code>IndexSetter</code> anonymous methods, which are used by browsers internally to manage lists of named or indexed properties (e.g. <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#dom-form-elements"><code>form.elements</code></a>, per-element <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#embedding-custom-non-visible-data">custom <code>data</code> attributes</a>, or the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-imagedata-data">pixel data of a <code>canvas</code></a>).</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2536&amp;to=2537">r2537</a> explains that you can not click something while you're already in the process of clicking it.  (Technically speaking, it makes the <code>click()</code> method non-reentrant.) [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017858.html">nested <code>click()</code> discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2537&amp;to=2538">r2538</a> clarifies that non-interactive elements that are not usually focusable, but that do currently have focus (via <a href="https://developer.mozilla.org/ARIA_User_Agent_Implementors_Guide#11.3.1.1_HTML_5_Tabindex">the <code>tabindex</code> attribute), should simulate <code>onclick</code> events when the user presses <kbd>ENTER</kbd>.  This may seem like a minor point, but it is important for building keyboard-accessible web applications.  [</a><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017859.html">onclick discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2538&amp;to=2539">r2539</a> notes that buttons (and their values) are not submitted with other form data unless they were the button that submitted the form. [<a href="http://lists.w3.org/Archives/Public/public-html/2008Dec/0157.html">button submission discussion</a>]</li>
<li><a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-December/017732.html">Silvia Pfeiffer posts thoughts on video accessibility</a> and links to <a href="https://wiki.mozilla.org/Accessibility/Video_Accessibility">this collection of video accessibility requirements</a> on the Mozilla wiki.</li>
<li>Nine years in the making, the second major edition of the <a href="http://www.w3.org/TR/WCAG20/">Web Content Accessibility Guidelines</a> is now officially a W3C Recommendation.  The guidelines are supplemented by <a href="http://www.w3.org/TR/WCAG20-TECHS/">a comprehensive techniques document</a>, for example <a href="http://www.w3.org/TR/WCAG20-TECHS/H37.html">Using <code>alt</code> attributes on <code>img</code> elements</a>.  HTML 5 also includes <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-0.html#alt">a section on using the <code>alt</code> attribute</a>, but in general you should defer to WCAG 2.0 because it was written by experts.</li>
</ul>

<p>Tune in next week for another exciting episode of "This Week in HTML 5."</p>
<p></p><p>This item was originally posted at: <a href='http://blog.whatwg.org'>http://blog.whatwg.org</a> and is licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT license</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/this-week-in-html-5-episode-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This Week in HTML 5 &#8211; Episode 15</title>
		<link>http://www.htmlfive.net/this-week-in-html-5-episode-15/</link>
		<comments>http://www.htmlfive.net/this-week-in-html-5-episode-15/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 17:42:43 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[WHATWG]]></category>
		<category><![CDATA[Weekly Review]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=390</guid>
		<description><![CDATA[<p>Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.</p>

<p>The big news this week is <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017569.html">the disintegration of HTTP authentication from HTML forms</a> (which was <a href="http://blog.whatwg.org/this-week-in-html-5-episode-14">last week's big news</a>).  As I predicted, the proposal <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/thread.html#17413">generated a healthy discussion</a>, but a combination of <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017518.html">security concerns</a> and concerns about tight coupling ultimately did in the proposal.</p>

<p>In its place, <a href="http://html5.org/tools/web-apps-tracker?from=2469&#38;to=2470">r2470</a> includes the following conformance requirement to allow for the possibility of someone specifying such a scheme in the future (<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017541.html">hat tip: Robert Sayre</a>):</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#navigating-across-documents">
<p>HTTP 401 responses that do not include a challenge recognised by the user agent must be processed as if they had no challenge, e.g. rendering the entity body as if the response had been 200 OK.</p>
<p>User agents may show the entity body of an HTTP 401 response even when the response do include a recognised challenge, with the option to login being included in a non-modal fashion, to enable the information provided by the server to be used by the user before authenticating. Similarly, user agents should allow the user to authenticate (in a non-modal fashion) against authentication challenges included in other responses such as HTTP 200 OK responses, effectively allowing resources to present HTTP login forms without requiring their use.</p>
</blockquote>

<p>Continuing with the web forms work, the <code>&#60;input&#62;</code> element has gained a new type: <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#color-state">a color picker</a>, marked up as <code>&#60;input type=color&#62;</code>.  Browser vendors are encouraged to integrate this field with platform-native color pickers, as appropriate.  As with all new input types, browsers that do not explicitly recognize the new type will default to a simple text field.</p>

<p>The <code>&#60;audio&#62;</code> and <code>&#60;video&#62;</code> API continues to churn rapidly.  Implementors should probably ignore it altogether until it's been stable for two consecutive weeks.  To wit: <a href="http://html5.org/tools/web-apps-tracker?from=2492&#38;to=2493">r2493</a> removes the <code>pixelratio</code> attribute, originally proposed to allow authors to override the display of videos known to be encoded with incorrect an aspect ratio.  <a href="http://html5.org/tools/web-apps-tracker?from=2497&#38;to=2498">r2498</a> adds the <code>playing</code> event, fired when playback as started.  <a href="http://html5.org/tools/web-apps-tracker?from=2488&#38;to=2489">r2489</a> drops the <code>HAVE_SOME_DATA</code> <code>readyState</code>.  I will try to write up a comprehensive summary of this API once its stabilizes.</p>

<p>Other interesting tidbits this week:</p>

<ul>
<li>The <code>&#60;input placeholder&#62;</code> attribute <a href="http://blog.whatwg.org/this-week-in-html-5-episode-13">that I discussed in episode 13</a> has three new conformance requirements: <a href="http://html5.org/tools/web-apps-tracker?from=2523&#38;to=2524">it must not contain newlines</a>, <a href="http://html5.org/tools/web-apps-tracker?from=2522&#38;to=2523">browsers must strip newlines if present</a>, and <a href="http://html5.org/tools/web-apps-tracker?from=2526&#38;to=2527">it may be empty</a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2467&#38;to=2468">r2468</a> defines the concept of a document's address, and <a href="http://html5.org/tools/web-apps-tracker?from=2468&#38;to=2469">r2469</a> defines the behavior of <code>document.open()</code> in terms of the document address.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2475&#38;to=2476">r2476</a> adds <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete-features.html#conformance-checkers-0">a new section for conformance checkers</a> (e.g. <a href="http://validator.w3.org/">the W3C validator</a>) that lists common conformance errors that aren't actually that important.  Examples: <code>&#60;script language="JavaScript"&#62;</code>, <code>&#60;img border=0&#62;</code>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2477&#38;to=2478">r2478</a> and <a href="http://html5.org/tools/web-apps-tracker?from=2478&#38;to=2479">r2479</a> give guidance for <abbr title="what you see is what you get">WYSIWYG</abbr> editors on how to fill in the <code>&#60;image alt&#62;</code> attribute if the user refuses to provide meaningful alternate text.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2485&#38;to=2486">r2486</a> restores the HTML 4 behavior of the <code>&#60;q&#62;</code> element, which is that browsers should insert quotation marks around the quoted phrase. [<a href="http://lists.w3.org/Archives/Public/public-html/2008Nov/0588.html">summary of massive <code>&#60;q&#62;</code> discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2524&#38;to=2525">r2525</a> mandates that browsers add an <code>Origin:</code> header to all non-GET requests, including the much-maligned <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/structured-client-side-storage.html#hyperlink-auditing"><code>ping</code> attribute</a>. [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/thread.html#17592">Origin discussion</a>]</li>
</ul>

<p>Tune in next week for another exciting episode of "This Week in HTML 5."</p>
]]></description>
			<content:encoded><![CDATA[<p>Welcome back to "This Week in HTML 5," where I'll try to summarize the major activity in the ongoing standards process in the WHATWG and W3C HTML Working Group.</p>

<p>The big news this week is <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017569.html">the disintegration of HTTP authentication from HTML forms</a> (which was <a href="http://blog.whatwg.org/this-week-in-html-5-episode-14">last week's big news</a>).  As I predicted, the proposal <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/thread.html#17413">generated a healthy discussion</a>, but a combination of <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017518.html">security concerns</a> and concerns about tight coupling ultimately did in the proposal.</p>

<p>In its place, <a href="http://html5.org/tools/web-apps-tracker?from=2469&#38;to=2470">r2470</a> includes the following conformance requirement to allow for the possibility of someone specifying such a scheme in the future (<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/017541.html">hat tip: Robert Sayre</a>):</p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#navigating-across-documents">
<p>HTTP 401 responses that do not include a challenge recognised by the user agent must be processed as if they had no challenge, e.g. rendering the entity body as if the response had been 200 OK.</p>
<p>User agents may show the entity body of an HTTP 401 response even when the response do include a recognised challenge, with the option to login being included in a non-modal fashion, to enable the information provided by the server to be used by the user before authenticating. Similarly, user agents should allow the user to authenticate (in a non-modal fashion) against authentication challenges included in other responses such as HTTP 200 OK responses, effectively allowing resources to present HTTP login forms without requiring their use.</p>
</blockquote>

<p>Continuing with the web forms work, the <code>&lt;input&gt;</code> element has gained a new type: <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#color-state">a color picker</a>, marked up as <code>&lt;input type=color&gt;</code>.  Browser vendors are encouraged to integrate this field with platform-native color pickers, as appropriate.  As with all new input types, browsers that do not explicitly recognize the new type will default to a simple text field.</p>

<p>The <code>&lt;audio&gt;</code> and <code>&lt;video&gt;</code> API continues to churn rapidly.  Implementors should probably ignore it altogether until it's been stable for two consecutive weeks.  To wit: <a href="http://html5.org/tools/web-apps-tracker?from=2492&amp;to=2493">r2493</a> removes the <code>pixelratio</code> attribute, originally proposed to allow authors to override the display of videos known to be encoded with incorrect an aspect ratio.  <a href="http://html5.org/tools/web-apps-tracker?from=2497&amp;to=2498">r2498</a> adds the <code>playing</code> event, fired when playback as started.  <a href="http://html5.org/tools/web-apps-tracker?from=2488&amp;to=2489">r2489</a> drops the <code>HAVE_SOME_DATA</code> <code>readyState</code>.  I will try to write up a comprehensive summary of this API once its stabilizes.</p>

<p>Other interesting tidbits this week:</p>

<ul>
<li>The <code>&lt;input placeholder&gt;</code> attribute <a href="http://blog.whatwg.org/this-week-in-html-5-episode-13">that I discussed in episode 13</a> has three new conformance requirements: <a href="http://html5.org/tools/web-apps-tracker?from=2523&amp;to=2524">it must not contain newlines</a>, <a href="http://html5.org/tools/web-apps-tracker?from=2522&amp;to=2523">browsers must strip newlines if present</a>, and <a href="http://html5.org/tools/web-apps-tracker?from=2526&amp;to=2527">it may be empty</a>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2467&amp;to=2468">r2468</a> defines the concept of a document's address, and <a href="http://html5.org/tools/web-apps-tracker?from=2468&amp;to=2469">r2469</a> defines the behavior of <code>document.open()</code> in terms of the document address.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2475&amp;to=2476">r2476</a> adds <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/obsolete-features.html#conformance-checkers-0">a new section for conformance checkers</a> (e.g. <a href="http://validator.w3.org/">the W3C validator</a>) that lists common conformance errors that aren't actually that important.  Examples: <code>&lt;script language="JavaScript"&gt;</code>, <code>&lt;img border=0&gt;</code>.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2477&amp;to=2478">r2478</a> and <a href="http://html5.org/tools/web-apps-tracker?from=2478&amp;to=2479">r2479</a> give guidance for <abbr title="what you see is what you get">WYSIWYG</abbr> editors on how to fill in the <code>&lt;image alt&gt;</code> attribute if the user refuses to provide meaningful alternate text.</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2485&amp;to=2486">r2486</a> restores the HTML 4 behavior of the <code>&lt;q&gt;</code> element, which is that browsers should insert quotation marks around the quoted phrase. [<a href="http://lists.w3.org/Archives/Public/public-html/2008Nov/0588.html">summary of massive <code>&lt;q&gt;</code> discussion</a>]</li>
<li><a href="http://html5.org/tools/web-apps-tracker?from=2524&amp;to=2525">r2525</a> mandates that browsers add an <code>Origin:</code> header to all non-GET requests, including the much-maligned <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/structured-client-side-storage.html#hyperlink-auditing"><code>ping</code> attribute</a>. [<a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-November/thread.html#17592">Origin discussion</a>]</li>
</ul>

<p>Tune in next week for another exciting episode of "This Week in HTML 5."</p>
<p></p><p>This item was originally posted at: <a href='http://blog.whatwg.org'>http://blog.whatwg.org</a> and is licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT license</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/this-week-in-html-5-episode-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Road to HTML 5: getElementsByClassName()</title>
		<link>http://www.htmlfive.net/the-road-to-html-5-getelementsbyclassname/</link>
		<comments>http://www.htmlfive.net/the-road-to-html-5-getelementsbyclassname/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 19:01:05 +0000</pubDate>
		<dc:creator>Mark Pilgrim</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WHATWG]]></category>

		<guid isPermaLink="false">http://blog.whatwg.org/?p=356</guid>
		<description><![CDATA[<p>Welcome back to my semi-regular column, "The Road to HTML 5," where I'll try to explain some of the <a href="http://wiki.whatwg.org/wiki/Differences_from_HTML4">new elements, attributes, and other features</a> in the upcoming HTML 5 specification.</p>

<p>The feature of the day is <a href="http://code.google.com/p/doctype/wiki/DocumentGetElementsByClassNameMethod"><code>getElementsByClassName()</code></a>.  Long desired by web developers and implemented in Javascript libraries like <a href="http://www.prototypejs.org/api/element/getElementsByClassName">Prototype</a>, this function does exactly what it says on the tin: it returns a list of elements in the DOM that define one or more classnames in the <code>class</code> attribute.  <code>getElementsByClassName()</code> exists as a method of the <code>document</code> object (for searching the entire DOM), as well as on each <code>HTMLElement</code> object (for searching the children of an element).</p>

<p><a href="http://www.whatwg.org/specs/web-apps/current-work/#dom-document-getelementsbyclassname">The HTML 5 specification defines <code>getElementsByClassName()</code>:</a></p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#dom-document-getelementsbyclassname">
<p>The <code>getElementsByClassName(<var>classNames</var>)</code> method takes a string that contains an <a href="http://www.whatwg.org/specs/web-apps/current-work/#unordered-set-of-unique-space-separated-tokens">unordered set of unique space-separated tokens</a> representing classes. When called, the method must return a live <code>NodeList</code> object containing all the elements in the document, in <a href="http://www.whatwg.org/specs/web-apps/current-work/#tree-order">tree order</a>, that have all the classes specified in that argument, having obtained the classes by <a href="http://www.whatwg.org/specs/web-apps/current-work/#split-a-string-on-spaces">splitting a string on spaces</a>. If there are no tokens specified in the argument, then the method must return an empty <code>NodeList</code>. If the document is in <a href="http://www.whatwg.org/specs/web-apps/current-work/#quirks-mode">quirks mode</a>, then the comparisons for the classes must be done in an <a href="http://www.whatwg.org/specs/web-apps/current-work/#ascii-case-insensitive">ASCII case-insensitive</a> manner, otherwise, the comparisons must be done in a <a href="http://www.whatwg.org/specs/web-apps/current-work/#case-sensitive">case-sensitive</a> manner.</p>
</blockquote>

<h3>A Brief History of getElementsByClassName()</h3>

<ul>
<li>September 2005: <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2005-September/004685.html">getElementsByClassName() Implementation Questions</a> and followups discuss whether <code>getElementsByClassName()</code> should take a string with multiple classnames, and if so, what that would mean.  <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-September/004716.html">Despite early protests</a>, it was eventually decided that <code>getElementsByClassName()</code> <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-November/005064.html">should take multiple classnames in a single string, separated by spaces</a>, and that the function should return elements that define <em>all</em> of given classnames.</li>
<li>February 2006: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-February/005703.html">I see this is still an open issue</a>."</li>
<li>October 2006: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-October/007407.html">This omnibus edition of your WHATWG mail includes replies to 50 or so separate e-mails about getElementsByClassName()</a>."</li>
<li>February 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012651.html">I landed support for this on the Mozilla trunk, and it will appear in upcoming Firefox alphas and betas. The array argument turned out to be quite a pain to implement, so we cut it</a>."  Ian Hickson responds: "I've changed the spec to use a space-separated list. ... I've dropped the array form altogether."</li>
<li>March 2007: John Resig puts Firefox 3's implementation to the test in <a href="http://ejohn.org/blog/getelementsbyclassname-speed-comparison/">getElementsByClassName Speed Comparison</a>.</li>
<li>July 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-July/012167.html">I suggest that participants in this thread reacquaint themselves with the discussion in the previous one before having it again</a>."  Good luck with that.</li>
<li>September 2007: "<a href="http://dev.opera.com/articles/view/new-development-techniques-using-opera-k/">A popular and useful feature [in Opera 9.5] will be the addition of native support for getElementByClassName from HTML5</a>."</li>
<li>December 2007: "<a href="http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/">Last week WebKit joined upcoming versions of Firefox and Opera in supporting [getElementsByClassName]</a>."</li>
<li>December 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-December/013119.html">Currently getElementsByClassName is specified as always being case sensitive. This would be fine, except that the primary other use of html class names (CSS selector matching) is only case sensitive in standards mode. This leads to situations ... in which CSS and getElementsByClassName match different results</a>."</li>
<li>July 2008: Ian Hickson responds: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-July/015391.html">I've made it consistent with how classes work in CSS (case-insensitive for quirks and case-sensitive otherwise)</a>."</li>
</ul>

<h3>Can We Use It?</h3>

<p>Yes We Can!  As you can tell from the timeline, <code>getElementsByClassName()</code> is supported natively in Firefox 3, Opera 9.5, Safari 3.1, and all versions of Google Chrome.  It is not available in any version of Microsoft Internet Explorer.  (IE 8 beta 2 is the latest version as of this writing.)  To use it in browsers that do not support it natively, you will need a wrapper script.  There are many such scripts; I myself am partial to <a href="http://www.robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/">Robert Nyman's Ultimate GetElementsByClassName</a>.  It uses the native <code>getElementsByClassName()</code> method in modern browsers that support it, then falls back to the little-known <a href="http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html#XPathEvaluator-evaluate"><code>document.evaluate()</code> method</a>, which is supported by older versions of Firefox (since at least 1.5) and Opera (since at least 9.27).  If all else fails, Robert's script falls back to recursively traversing the DOM and collecting elements that match the given classnames.</p>

<h3>And in conclusion</h3>

<p><code>getElementsByClassName()</code> is well-supported across all modern browsers except IE, and a performance-optimized open source wrapper script can cover IE and older browsers.</p>
]]></description>
			<content:encoded><![CDATA[<p>Welcome back to my semi-regular column, "The Road to HTML 5," where I'll try to explain some of the <a href="http://wiki.whatwg.org/wiki/Differences_from_HTML4">new elements, attributes, and other features</a> in the upcoming HTML 5 specification.</p>

<p>The feature of the day is <a href="http://code.google.com/p/doctype/wiki/DocumentGetElementsByClassNameMethod"><code>getElementsByClassName()</code></a>.  Long desired by web developers and implemented in Javascript libraries like <a href="http://www.prototypejs.org/api/element/getElementsByClassName">Prototype</a>, this function does exactly what it says on the tin: it returns a list of elements in the DOM that define one or more classnames in the <code>class</code> attribute.  <code>getElementsByClassName()</code> exists as a method of the <code>document</code> object (for searching the entire DOM), as well as on each <code>HTMLElement</code> object (for searching the children of an element).</p>

<p><a href="http://www.whatwg.org/specs/web-apps/current-work/#dom-document-getelementsbyclassname">The HTML 5 specification defines <code>getElementsByClassName()</code>:</a></p>

<blockquote cite="http://www.whatwg.org/specs/web-apps/current-work/#dom-document-getelementsbyclassname">
<p>The <code>getElementsByClassName(<var>classNames</var>)</code> method takes a string that contains an <a href="http://www.whatwg.org/specs/web-apps/current-work/#unordered-set-of-unique-space-separated-tokens">unordered set of unique space-separated tokens</a> representing classes. When called, the method must return a live <code>NodeList</code> object containing all the elements in the document, in <a href="http://www.whatwg.org/specs/web-apps/current-work/#tree-order">tree order</a>, that have all the classes specified in that argument, having obtained the classes by <a href="http://www.whatwg.org/specs/web-apps/current-work/#split-a-string-on-spaces">splitting a string on spaces</a>. If there are no tokens specified in the argument, then the method must return an empty <code>NodeList</code>. If the document is in <a href="http://www.whatwg.org/specs/web-apps/current-work/#quirks-mode">quirks mode</a>, then the comparisons for the classes must be done in an <a href="http://www.whatwg.org/specs/web-apps/current-work/#ascii-case-insensitive">ASCII case-insensitive</a> manner, otherwise, the comparisons must be done in a <a href="http://www.whatwg.org/specs/web-apps/current-work/#case-sensitive">case-sensitive</a> manner.</p>
</blockquote>

<h3>A Brief History of getElementsByClassName()</h3>

<ul>
<li>September 2005: <a href="http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2005-September/004685.html">getElementsByClassName() Implementation Questions</a> and followups discuss whether <code>getElementsByClassName()</code> should take a string with multiple classnames, and if so, what that would mean.  <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-September/004716.html">Despite early protests</a>, it was eventually decided that <code>getElementsByClassName()</code> <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-November/005064.html">should take multiple classnames in a single string, separated by spaces</a>, and that the function should return elements that define <em>all</em> of given classnames.</li>
<li>February 2006: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-February/005703.html">I see this is still an open issue</a>."</li>
<li>October 2006: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-October/007407.html">This omnibus edition of your WHATWG mail includes replies to 50 or so separate e-mails about getElementsByClassName()</a>."</li>
<li>February 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-October/012651.html">I landed support for this on the Mozilla trunk, and it will appear in upcoming Firefox alphas and betas. The array argument turned out to be quite a pain to implement, so we cut it</a>."  Ian Hickson responds: "I've changed the spec to use a space-separated list. ... I've dropped the array form altogether."</li>
<li>March 2007: John Resig puts Firefox 3's implementation to the test in <a href="http://ejohn.org/blog/getelementsbyclassname-speed-comparison/">getElementsByClassName Speed Comparison</a>.</li>
<li>July 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-July/012167.html">I suggest that participants in this thread reacquaint themselves with the discussion in the previous one before having it again</a>."  Good luck with that.</li>
<li>September 2007: "<a href="http://dev.opera.com/articles/view/new-development-techniques-using-opera-k/">A popular and useful feature [in Opera 9.5] will be the addition of native support for getElementByClassName from HTML5</a>."</li>
<li>December 2007: "<a href="http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/">Last week WebKit joined upcoming versions of Firefox and Opera in supporting [getElementsByClassName]</a>."</li>
<li>December 2007: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-December/013119.html">Currently getElementsByClassName is specified as always being case sensitive. This would be fine, except that the primary other use of html class names (CSS selector matching) is only case sensitive in standards mode. This leads to situations ... in which CSS and getElementsByClassName match different results</a>."</li>
<li>July 2008: Ian Hickson responds: "<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-July/015391.html">I've made it consistent with how classes work in CSS (case-insensitive for quirks and case-sensitive otherwise)</a>."</li>
</ul>

<h3>Can We Use It?</h3>

<p>Yes We Can!  As you can tell from the timeline, <code>getElementsByClassName()</code> is supported natively in Firefox 3, Opera 9.5, Safari 3.1, and all versions of Google Chrome.  It is not available in any version of Microsoft Internet Explorer.  (IE 8 beta 2 is the latest version as of this writing.)  To use it in browsers that do not support it natively, you will need a wrapper script.  There are many such scripts; I myself am partial to <a href="http://www.robertnyman.com/2008/05/27/the-ultimate-getelementsbyclassname-anno-2008/">Robert Nyman's Ultimate GetElementsByClassName</a>.  It uses the native <code>getElementsByClassName()</code> method in modern browsers that support it, then falls back to the little-known <a href="http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html#XPathEvaluator-evaluate"><code>document.evaluate()</code> method</a>, which is supported by older versions of Firefox (since at least 1.5) and Opera (since at least 9.27).  If all else fails, Robert's script falls back to recursively traversing the DOM and collecting elements that match the given classnames.</p>

<h3>And in conclusion</h3>

<p><code>getElementsByClassName()</code> is well-supported across all modern browsers except IE, and a performance-optimized open source wrapper script can cover IE and older browsers.</p>
<p></p><p>This item was originally posted at: <a href='http://blog.whatwg.org'>http://blog.whatwg.org</a> and is licensed under the <a href='http://www.opensource.org/licenses/mit-license.php'>MIT license</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.htmlfive.net/the-road-to-html-5-getelementsbyclassname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
