[whatwg] getElementsByIdPart

Ian Hickson ian at hixie.ch
Thu Aug 26 10:13:20 PDT 2004


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.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list