edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] id not unique
Date: Fri, 23 Feb 2018 02:10:01 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1802230205440.30617@carhart.net> (raw)
In-Reply-To: <20180123023656.eklhad@comcast.net>

edbrowse is on fire, seriously.  At this point in the story of the 
inventor who discovers antigravity or cold fusion, someone pays them a 
visit in an unmarked car.  What ensues is either not very pleasant, or 
they are offered a million dollars.  (Or both.)

On Fri, 23 Feb 2018, Karl Dahlke wrote:

> 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 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 <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
> Edbrowse-dev@lists.the-brannons.com
> http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev


      reply	other threads:[~2018-02-23 10:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  7:36 Karl Dahlke
2018-02-23 10:10 ` Kevin Carhart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1802230205440.30617@carhart.net \
    --to=kevin@carhart.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).