I'm pretty sure I read, in multiple places, that the id=foo attribute was 
suppose to be unique across the document.
<div id=foo>
In support of this notion, there is the function document.getElementById("foo") 
which returns that node.
It's not elementsById, like getElementsByTagName and the others, this one is 
the only one that is singular in the group, because there is one node per id.
However ... here we go ...
www.ibm.com has many overloads, which show up with db3.
There are 4 <h2 id=ibm-section-h2> headings.
edbrowse currently returns the last one via getElementById("ibm-section-h2"),
while document["ibm-section-h2"] points to the first one.
Inconsistent, yes, but I didn't thing this was suppose to happen at all so I 
didn't plan for it.
More fallout: when I was trying to process all the css descriptors, and 
building hash tables etc,
I optimized #foo to grab the one and only node returned by getElemenById(). 
That's wrong.
That code isn't being used right now, so querySelectorAll("#ibm-section-h2") 
returns all 4 nodes, which is correct.
If I move forward and process at least some of the css at document load time, I 
need to bear this in mind.
Not really saying theres a bug or problem here, just thinking out loud.

Karl Dahlke
Edbrowse-dev mailing list

Reply via email to