> The benchmark is getElementById().getElementsByTagName() - why not
> inlcude that in the test?

But it's not that simple (it never is). That code doesn't take into
account browsers, like IE, returning element that have a name equal to
the ID, not does it take into account the element (with the ID) not
existing, nor does it return a static list of elements - it returns a
live NodeSet (which is a constant source of misconceptions for
developers).

If you want to play the cross-browser roulette, make sure you go all the way in.

--John

Reply via email to