Selectors API updates

I updated the Selectors API specification today and added equivalent  
methods for element nodes. It didn't make much sense to me to postpone  
this.

I resolved the naming debate by going for:

* Document.get()
* Document.getAll()
* Element.get()
* Element.getAll()

These names are short, don't clash with autocomplete and provide a  
superset of the functionality given by the other get* methods.


Now I'm wondering whether we need Element.matchesSelector(). Basically you  
pass it a group of selectors and it returns true or false depending on  
whether or not the element would've been matched. The use case so far  
given is that this would make it possible to implement constructs like XBL  
<content includes=""> in JavaScript. I assume there are others, but I'm  
wondering whether it's really worth it.


When that last issue is resolved I think the specification is ready for  
Last Call (again).


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Tuesday, 9 January 2007 22:08:18 UTC