Re: [selectors-api] Introduction with more background

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 UTC