Javascript getelementbyid lookups - hash map or recursive tree traversal?

Posted by sash on Stack Overflow See other posts from Stack Overflow or by sash
Published on 2010-04-26T05:34:47Z Indexed on 2010/04/26 5:43 UTC
Read the original article Hit count: 293

Filed under:
|
|

Does the DOM have a hashtable of elements whose keys are the elements' ids? I want to know if document.getelementbyid() looks up a hash table or traverses the entire tree. Is this behavior different across browsers?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about dom