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

[whatwg] getElementsByIdPart

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 26 Aug 2004 17:13:20 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0408261707500.21191@dhalsim.dreamhost.com>
On Sat, 21 Aug 2004, Doron Rosenberg wrote:
>
> Wouldn't a getElementsByAttribute be a more flexiable solution?

It depends, what exactly did you have in mind?

Note that the "." selector in CSS can't be directly emulated even with a 
single "[ =~ ]" selector.

I think for most uses, DOM Traversal is the way to go here. 
getElementsByClass is IMHO an exception, in that implementing it as a node 
filter is non-trivial.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 26 August 2004 10:13:20 UTC

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