W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] getElementsByIdPart

From: Jim Ley <jim.ley@gmail.com>
Date: Sun, 22 Aug 2004 22:46:16 +0200
Message-ID: <851c8d3104082213462243af1e@mail.gmail.com>
On Sat, 21 Aug 2004 19:03:03 +0000 (UTC), Ian Hickson <ian at hixie.ch> wrote:
> You could loop over all the elements and make their class attributes equal
> their ID attributes with underscores changed to spaces quite easily, which
> would then allow you to use the method mentioned above, as well as letting
> you use CSS and other class-based mechanisms.

not really, since class is not a single thing, so it won't map cleanly to ID.
> Does this help, or do you really think a getElementByIdPart() method
> would be better? 

DOM 3 XPath (suitably mangled for HTML) would be much better than
inventing lots of extra DOM methods.  especially ones that rely on
regexp matching to degrade in older UA's.

Received on Sunday, 22 August 2004 13:46:16 UTC

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