W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] getElementsByCSSSelector

From: Jim Ley <jim.ley@gmail.com>
Date: Sat, 14 Jan 2006 18:07:30 +0000
Message-ID: <851c8d310601141007v35fb8385yed61e577c18cd847@mail.gmail.com>
On 1/14/06, liorean <liorean at gmail.com> wrote:
> On 14/01/06, Jim Ley <jim.ley at gmail.com> wrote:
> > Could you explain some use cases?
> For the very same reason you might want DOM to provide an XPATH
> engine, TreeWalkers or NodeIterators - To get efficient host-native
> filtering of the node tree. In this case, filtering based on a scheme
> used in related technologies. Preferably returning a DOMCollection
> instead of a static array or matches.

The use case for Regular Expressions are clear - I want to detect if a
string is something that is probably a date in a particular format
etc.  The equivalent for a DOM is not clear - if your argument is
purely efficiency - which could be a good one certainly - then you
still need use cases that justify the underlying technique - I want a
nodelist of all things in a document which match a particular CSS
class is not an obvious one to me - every use case I can see for it is
better to simply change the CSS class itself.

Received on Saturday, 14 January 2006 10:07:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC