Re:A Shocking Truth About CSS
by robin_reala on Tuesday March 09, 2010 @10:20AM
(#1178418)
id attributes are unique in well formed pages, but then a lot of HTML is not well formed. Browsers do maintain a hashmap (or equiv) of id to node though, so in that case you’re right, that should be faster. Maybe the overhead of parsing and choosing multiple code paths is slower than just walking the tree?
[ Parent
| on HN ]
There are no comments on this comment yet.