<?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: querySelector and querySelectorAll</title>
	<atom:link href="http://webkit.org/blog/156/queryselector-and-queryselectorall/feed/" rel="self" type="application/rss+xml" />
	<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/</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: Covex</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-24000</link>
		<dc:creator>Covex</dc:creator>
		<pubDate>Sat, 22 Mar 2008 15:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-24000</guid>
		<description>About querySelectorAll return value:
I think, that &quot;length&quot; property must not be enumerable (like in Array) to make &quot;for (var i in result)&quot; work the same way as &quot;for (var i=0; i&lt;result.length; i++)&quot;</description>
		<content:encoded><![CDATA[<p>About querySelectorAll return value:<br />
I think, that &#8220;length&#8221; property must not be enumerable (like in Array) to make &#8220;for (var i in result)&#8221; work the same way as &#8220;for (var i=0; i&lt;result.length; i++)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Smith</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23914</link>
		<dc:creator>David Smith</dc:creator>
		<pubDate>Sun, 17 Feb 2008 14:10:11 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23914</guid>
		<description>It&#039;s more complex than that; In order to do the return-one optimization for querySelectorAll, we would need to either special-case it (i.e. pre-parse the selector enough to determine if it&#039;s an id selector alone), or make the regular CSS parser change its behavior. The former would slow down all non-id cases for querySelectorAll, the latter would break a bunch of web pages.</description>
		<content:encoded><![CDATA[<p>It&#8217;s more complex than that; In order to do the return-one optimization for querySelectorAll, we would need to either special-case it (i.e. pre-parse the selector enough to determine if it&#8217;s an id selector alone), or make the regular CSS parser change its behavior. The former would slow down all non-id cases for querySelectorAll, the latter would break a bunch of web pages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas Shanks</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23912</link>
		<dc:creator>Nicholas Shanks</dc:creator>
		<pubDate>Fri, 15 Feb 2008 15:09:06 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23912</guid>
		<description>David, you should submit a request that the specifications be changed. Having invalid documents on the web, namely ones with multiple identical IDs, hurts browser vendors and as a consequence, web developers and users. If querySelectorAll(&quot;#someid&quot;) was required to only return one result, and all major browsers obeyed this, then web developers wouldn&#039;t be able to treat IDs as if they were classes and get away with it.</description>
		<content:encoded><![CDATA[<p>David, you should submit a request that the specifications be changed. Having invalid documents on the web, namely ones with multiple identical IDs, hurts browser vendors and as a consequence, web developers and users. If querySelectorAll(&#8221;#someid&#8221;) was required to only return one result, and all major browsers obeyed this, then web developers wouldn&#8217;t be able to treat IDs as if they were classes and get away with it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Smith</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23910</link>
		<dc:creator>David Smith</dc:creator>
		<pubDate>Mon, 11 Feb 2008 15:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23910</guid>
		<description>Unfortunately, my understanding of the spec indicates that despite the invalidity of multiple elements having the same id, we&#039;re required to return all elements with a given id. That one blemish on the benchmark has been annoying me as well, but I see no way around it at the moment. :(</description>
		<content:encoded><![CDATA[<p>Unfortunately, my understanding of the spec indicates that despite the invalidity of multiple elements having the same id, we&#8217;re required to return all elements with a given id. That one blemish on the benchmark has been annoying me as well, but I see no way around it at the moment. <img src='http://webkit.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: solidgoldpig</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23909</link>
		<dc:creator>solidgoldpig</dc:creator>
		<pubDate>Mon, 11 Feb 2008 14:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23909</guid>
		<description>Obviously this is excellent news, made doubly so by the recent completion of all the CSS3 selectors.

However, I can&#039;t help but point out one strange anomaly that I noticed when running the slickspeed benchmark - namely that while the native implementation blows away the js libraries, there is *one* test where it actually limps in in third place (on my MacBook 1.83GHz Core Duo, 2GB RAM, OS X 10.4.11)

Namely, #speech5

Webkit (r30123) consistently clocks in at 13ms as opposed to Ext at around 7ms and kQuery at 4ms.

I note that * is the fastest test at 12ms - does that reflect the overhead required for querySelector to kick into gear? Could querySelector not be tweaked to spot when an id is being requested by the document object and switch to getElementById?</description>
		<content:encoded><![CDATA[<p>Obviously this is excellent news, made doubly so by the recent completion of all the CSS3 selectors.</p>
<p>However, I can&#8217;t help but point out one strange anomaly that I noticed when running the slickspeed benchmark &#8211; namely that while the native implementation blows away the js libraries, there is *one* test where it actually limps in in third place (on my MacBook 1.83GHz Core Duo, 2GB RAM, OS X 10.4.11)</p>
<p>Namely, #speech5</p>
<p>Webkit (r30123) consistently clocks in at 13ms as opposed to Ext at around 7ms and kQuery at 4ms.</p>
<p>I note that * is the fastest test at 12ms &#8211; does that reflect the overhead required for querySelector to kick into gear? Could querySelector not be tweaked to spot when an id is being requested by the document object and switch to getElementById?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max_B</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23908</link>
		<dc:creator>Max_B</dc:creator>
		<pubDate>Sun, 10 Feb 2008 10:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23908</guid>
		<description>The SVN version and the Mootools one do different test sequences. Thats why the results differ so much. Anyway this Selector API is great.</description>
		<content:encoded><![CDATA[<p>The SVN version and the Mootools one do different test sequences. Thats why the results differ so much. Anyway this Selector API is great.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Smith</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23907</link>
		<dc:creator>David Smith</dc:creator>
		<pubDate>Sat, 09 Feb 2008 01:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23907</guid>
		<description>dtetto: the benchmark, as checked out of svn, doesn&#039;t have any libraries included. I just grabbed the first three I thought of.</description>
		<content:encoded><![CDATA[<p>dtetto: the benchmark, as checked out of svn, doesn&#8217;t have any libraries included. I just grabbed the first three I thought of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dtetto</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23905</link>
		<dc:creator>dtetto</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:38:01 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23905</guid>
		<description>Super awesome. Can&#039;t wait to start using this (and I really hope it&#039;s implemented into jQuery, my library of choice, soon).

Random question about the benchmark page: Why remove mootools? Just because ext is more popular and there was no room for a fifth column? As I said, I&#039;m a jQuery man myself but it seems weird that mootools (the creators of the test, after all) didn&#039;t make the cut to be included in the benchmarks.</description>
		<content:encoded><![CDATA[<p>Super awesome. Can&#8217;t wait to start using this (and I really hope it&#8217;s implemented into jQuery, my library of choice, soon).</p>
<p>Random question about the benchmark page: Why remove mootools? Just because ext is more popular and there was no room for a fifth column? As I said, I&#8217;m a jQuery man myself but it seems weird that mootools (the creators of the test, after all) didn&#8217;t make the cut to be included in the benchmarks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicholas C. Zakas</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23904</link>
		<dc:creator>Nicholas C. Zakas</dc:creator>
		<pubDate>Fri, 08 Feb 2008 20:05:58 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23904</guid>
		<description>This is excellent news. What version of WebKit begins supporting this? It would be helpful when features like this are introduced to also include the build number and WebKit version so we can be sure to play with the right version.</description>
		<content:encoded><![CDATA[<p>This is excellent news. What version of WebKit begins supporting this? It would be helpful when features like this are introduced to also include the build number and WebKit version so we can be sure to play with the right version.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Hughes</title>
		<link>http://webkit.org/blog/156/queryselector-and-queryselectorall/comment-page-1/#comment-23903</link>
		<dc:creator>Scott Hughes</dc:creator>
		<pubDate>Fri, 08 Feb 2008 19:04:45 +0000</pubDate>
		<guid isPermaLink="false">http://webkit.org/blog/156/queryselector-and-queryselectorall/#comment-23903</guid>
		<description>I just realised that support for the :hover pseudo-class is mostly useless. The example given, document.querySelector(&quot;:hover&quot;), will always return the root element (or null), whereas the example was intended to return the element directly beneath the cursor (in other words, event.target if a &quot;click&quot; event was triggered). But it&#039;s impossible to (reliably) discover this element because event.target is not necessarily the last element in the document.querySelectorAll(&quot;:hover&quot;) NodeList.</description>
		<content:encoded><![CDATA[<p>I just realised that support for the :hover pseudo-class is mostly useless. The example given, document.querySelector(&#8221;:hover&#8221;), will always return the root element (or null), whereas the example was intended to return the element directly beneath the cursor (in other words, event.target if a &#8220;click&#8221; event was triggered). But it&#8217;s impossible to (reliably) discover this element because event.target is not necessarily the last element in the document.querySelectorAll(&#8221;:hover&#8221;) NodeList.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
