From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:558:fe21:29:69:252:207:42; helo=resqmta-ch2-10v.sys.comcast.net; envelope-from=eklhad@comcast.net; receiver= Received: from resqmta-ch2-10v.sys.comcast.net (resqmta-ch2-10v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:42]) by hurricane.the-brannons.com (Postfix) with ESMTPS id BC84E77AAF for ; Thu, 22 Feb 2018 23:35:54 -0800 (PST) Received: from resomta-ch2-13v.sys.comcast.net ([69.252.207.109]) by resqmta-ch2-10v.sys.comcast.net with ESMTP id p7ubeY4WAuRinp7ubemVRp; Fri, 23 Feb 2018 07:36:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1519371417; bh=+QdFm0TNyGn2Qn1uwaw8dJP8ywi5X9l/EXyi8CMqA2g=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=gQ+VzZRqCh+TzKyAMBWck+c6vur5hzMuephIjRBLeypx7KqwLKvEMc0etP0V14QOQ II/2u7IbX1Vb1Lgu4AbIdNwsf5C0/oO4bnALSzDagU4J4dKbkYZ0gp0QXVGWOUqMs8 F+M0CzOEMFZCTsjBzqenRZowT6fCpxS27OPsIVTpOtwYv3Kklp6TdXcLqYH+M+2QUO oxDClB5PFC62BwhtqsdxvfpdgIOPTQkarlG7vgCgT4C+BmUgkloavKmxzDqvr1zLFh smOsVmXyG4J7DEnxRvgl+lXHU1R2pEB4FEIUxXTMRmpvhF7LsceEwl0n0F7r+33FD4 EcLlS2Ph7hVrA== Received: from unknown ([IPv6:2601:408:c300:8f09:21e:4fff:fec2:a0f1]) by resomta-ch2-13v.sys.comcast.net with SMTP id p7uaeXMTUVkTEp7uaesFub; Fri, 23 Feb 2018 07:36:56 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke User-Agent: edbrowse/3.7.2 Date: Fri, 23 Feb 2018 02:36:56 -0500 Message-ID: <20180123023656.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfDZyb1wFdwzxIL/2R4C9Vq1NL9HdtNbGyDFJdJy4i/ey/gMkJSNOEeoOvVX/h4jd2j1Le1hzvcFToUYCveDayvDI+CZg0OfX8SJy0znM705zlw+mYuVF Gigr9efqtvolax+yU/ZmkJc0/xMhjI427qyQhV7s7uue2z5Fst8Vc0lw Subject: [Edbrowse-dev] id not unique X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.25 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2018 07:35:55 -0000 I'm pretty sure I read, in multiple places, that the id=foo attribute was suppose to be unique across the document.
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 singular, 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

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