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

Re: ACTION-87: Selectors API

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 26 Feb 2006 21:33:02 +1100
To: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <20060226103302.GB4004@port.mcc.id.au>

Anne van Kesteren:
> One of the concerns with this is:
>  document.getElementsBySelector(':hover')
> Some other things are pretty inefficient as well:
>  document.getElementsBySelector('div div')
> Now if it turns out that implementors don't think these are real problems  
> I guess it could just be a NodeList instead of a StaticNodeList...

As for whether these are easy to implement or not, I guess it's a matter
of whether you are building on top of a CSS engine that you can't
modify.  The main advantage would be access to selector parsing

It shouldn't be too hard to handle a live node list by invalidating its
contents when a modification to the document is made that would change
the result.  This isn't the most optimal solution, but would be

 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org
Received on Sunday, 26 February 2006 10:33:11 UTC

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