W3C home > Mailing lists > Public > public-webapi@w3.org > September 2006

Re: [selectors-api] Introduction with more background

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 19 Sep 2006 10:55:25 -0000
To: "Karl Dubost" <karl@w3.org>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.tf263o0r64w2qv@id-c0020.emi.ac.ma>

On Wed, 26 Jul 2006 07:30:05 -0000, <karl@w3.org> wrote:
> About http://www.w3.org/TR/2006/WD-selectors-api-20060525/#introduction
>
> 	[[[
> 	It is often desirable to perform script and or
> 	DOM operations on a specific set of elements in a document.
> 	]]]
>
> What are the benefits?
> Why is it important?
> How it makes the life of developers easier?

It makes it easier to select a set of elements based on certain criteria  
(for example all <div> elements with a class of example) in a way that's  
consistent with how people are matching elements in CSS for instance.

So instead of having to filter what getElementsByTagName returns you can  
directly filter it in the query. And given that implementations of  
Selectors are claimed to be pretty efficient it's expected this will be  
pretty efficient as well and most likely faster than a custom  
implementation of it.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Tuesday, 19 September 2006 10:56:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:55 GMT