<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WebKit gets Native getElementsByClassName</title>
	<atom:link href="http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/feed/" rel="self" type="application/rss+xml" />
	<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/</link>
	<description>All about WebKit development</description>
	<lastBuildDate>Sat, 21 Nov 2009 23:00:28 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mark Rowe</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23834</link>
		<dc:creator>Mark Rowe</dc:creator>
		<pubDate>Wed, 23 Jan 2008 03:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23834</guid>
		<description>@Jimmi: The &lt;a href=&#039;http://www.w3.org/TR/selectors-api/&#039; rel=&quot;nofollow&quot;&gt;Selectors API&lt;/a&gt; is similar to what you suggest but has the advantage of currently going through the standardisation process. Nightly builds of WebKit already support the &lt;code&gt;querySelector&lt;/code&gt; and &lt;code&gt;querySelectorAll&lt;/code&gt; methods that it specifies.</description>
		<content:encoded><![CDATA[<p>@Jimmi: The <a href='http://www.w3.org/TR/selectors-api/' rel="nofollow">Selectors API</a> is similar to what you suggest but has the advantage of currently going through the standardisation process. Nightly builds of WebKit already support the <code>querySelector</code> and <code>querySelectorAll</code> methods that it specifies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmi</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23833</link>
		<dc:creator>Jimmi</dc:creator>
		<pubDate>Tue, 22 Jan 2008 18:43:44 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23833</guid>
		<description>If you&#039;re going down this route, why not implement getElementsBySelector?

See here... http://simonwillison.net/2003/Mar/25/getElementsBySelector/</description>
		<content:encoded><![CDATA[<p>If you&#8217;re going down this route, why not implement getElementsBySelector?</p>
<p>See here&#8230; <a href="http://simonwillison.net/2003/Mar/25/getElementsBySelector/" rel="nofollow">http://simonwillison.net/2003/Mar/25/getElementsBySelector/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: randallfarmer</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23820</link>
		<dc:creator>randallfarmer</dc:creator>
		<pubDate>Thu, 17 Jan 2008 23:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23820</guid>
		<description>@Mark Rowe: That is lovely.</description>
		<content:encoded><![CDATA[<p>@Mark Rowe: That is lovely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Rowe</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23753</link>
		<dc:creator>Mark Rowe</dc:creator>
		<pubDate>Sat, 05 Jan 2008 23:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23753</guid>
		<description>@randallfarmer: It is already supported.</description>
		<content:encoded><![CDATA[<p>@randallfarmer: It is already supported.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: randallfarmer</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23752</link>
		<dc:creator>randallfarmer</dc:creator>
		<pubDate>Sat, 05 Jan 2008 23:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23752</guid>
		<description>This may be unlikely to happen, but I&#039;d love anyElement.getElementsByClassName (not just document.getElementsByClassName).  It seems to be in the HTML5 spec, but it&#039;s not clear whether it&#039;s in WebKit.

One example of where I&#039;d use it it: I&#039;ve got an application with forms for dozens of similar records.  Right now I manually search all elements of the active form for a particular classname (for example, &quot;answergroup&quot; or &quot;errlabel&quot;).  But it would be lovely if that could be a native lookup (at least in some browsers).</description>
		<content:encoded><![CDATA[<p>This may be unlikely to happen, but I&#8217;d love anyElement.getElementsByClassName (not just document.getElementsByClassName).  It seems to be in the HTML5 spec, but it&#8217;s not clear whether it&#8217;s in WebKit.</p>
<p>One example of where I&#8217;d use it it: I&#8217;ve got an application with forms for dozens of similar records.  Right now I manually search all elements of the active form for a particular classname (for example, &#8220;answergroup&#8221; or &#8220;errlabel&#8221;).  But it would be lovely if that could be a native lookup (at least in some browsers).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Smith</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23656</link>
		<dc:creator>David Smith</dc:creator>
		<pubDate>Tue, 25 Dec 2007 02:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23656</guid>
		<description>@Dimitri

Yes it does; you can also specify multiple classes to filter by (for example, document.getElementsByClassName(&#039;box red&#039;);).</description>
		<content:encoded><![CDATA[<p>@Dimitri</p>
<p>Yes it does; you can also specify multiple classes to filter by (for example, document.getElementsByClassName(&#8217;box red&#8217;);).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitri Bouniol</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23653</link>
		<dc:creator>Dimitri Bouniol</dc:creator>
		<pubDate>Mon, 24 Dec 2007 23:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23653</guid>
		<description>Does getElementsByClassName return elements that contain the clas specified?
For Example, if i were to do document. getElementsByClassName(&quot;box&quot;), would it return elements whose class is &quot;box red&quot; as well as the ones having only &quot;box&quot;?</description>
		<content:encoded><![CDATA[<p>Does getElementsByClassName return elements that contain the clas specified?<br />
For Example, if i were to do document. getElementsByClassName(&#8221;box&#8221;), would it return elements whose class is &#8220;box red&#8221; as well as the ones having only &#8220;box&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maciej Stachowiak</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23647</link>
		<dc:creator>Maciej Stachowiak</dc:creator>
		<pubDate>Mon, 24 Dec 2007 02:20:49 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23647</guid>
		<description>WebKit&#039;s XPath implementation (like, I believe, most of the browser-hosted ones) does not compile down to native code or anything like that. Therefore, XPath matching is likely to involve more branches than something specific to class. In addition, we have caches for fetching by id, class and tag name, which XPath would not easily be able to use without a lot of special-casing for certain XPath expressions.</description>
		<content:encoded><![CDATA[<p>WebKit&#8217;s XPath implementation (like, I believe, most of the browser-hosted ones) does not compile down to native code or anything like that. Therefore, XPath matching is likely to involve more branches than something specific to class. In addition, we have caches for fetching by id, class and tag name, which XPath would not easily be able to use without a lot of special-casing for certain XPath expressions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Rowe</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23646</link>
		<dc:creator>Mark Rowe</dc:creator>
		<pubDate>Mon, 24 Dec 2007 01:43:23 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23646</guid>
		<description>@gcarothers: In my tests the difference is closer to 15xs, which as you mention is still a very large gap.  Some quick testing in the Firefox 3 beta shows a similar performance gap compared to the native getElementsByClassName.  I would strongly encourage you to file a performance bug report at http://bugs.webkit.org/ about tightening up this aspect of XPath performance.</description>
		<content:encoded><![CDATA[<p>@gcarothers: In my tests the difference is closer to 15xs, which as you mention is still a very large gap.  Some quick testing in the Firefox 3 beta shows a similar performance gap compared to the native getElementsByClassName.  I would strongly encourage you to file a performance bug report at <a href="http://bugs.webkit.org/" rel="nofollow">http://bugs.webkit.org/</a> about tightening up this aspect of XPath performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Smith</title>
		<link>http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/comment-page-1/#comment-23644</link>
		<dc:creator>David Smith</dc:creator>
		<pubDate>Sun, 23 Dec 2007 20:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/153/webkit-gets-native-getelementsbyclassname/#comment-23644</guid>
		<description>@richardyork I&#039;m going to give it a shot, at least. We&#039;ll see if I have enough spare time to finish it :)</description>
		<content:encoded><![CDATA[<p>@richardyork I&#8217;m going to give it a shot, at least. We&#8217;ll see if I have enough spare time to finish it <img src='http://webkit.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
