W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Selectors API updates

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 09 Jan 2007 23:08:01 +0100
To: "Web API WG (public)" <public-webapi@w3.org>
Message-ID: <op.tlwqfnma64w2qv@id-c0020>

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

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
Received on Tuesday, 9 January 2007 22:08:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:22 UTC