- 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>
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
routines.
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
reasonable.
--
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