edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: edbrowse-dev@edbrowse.org
Subject: root element
Date: Wed, 20 Oct 2021 08:00:52 -0400	[thread overview]
Message-ID: <20210920080052.eklhad@comcast.net> (raw)
In-Reply-To: <a4c374fd-2b48-4b44-9aad-3fd99865cc91@www.fastmail.com>

Speaking of getElementsByClassName, here's something I didn't quite get from the documentation.
Is the root node included or not?
And for any or all of the Elements methods.
This example is for Class, but you know what I mean.
We want to get this right so poor Kevin doesn't have to spend a week tracking it down.
Here is an example and note the inconsistency.
I do remember reading docs about querySelectorAll so I'm pretty sure that one is right.

test1=document.createElement("div"),test2=document.createElement("div"),test1.appendChild(test2);

test1.classList.add("snork"),test2.classList.add("snork")

test1.getElementsByClassName("snork").length

test1.querySelectorAll(".snork").length

Karl Dahlke


      parent reply	other threads:[~2021-10-20 12:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 10:31 possible root cause in gebcn for a recaptcha issue Kevin Carhart
2021-10-20 11:33 ` Karl Dahlke
2021-10-20 12:31   ` Kevin Carhart
2021-10-20 12:59     ` Karl Dahlke
2021-10-20 12:00 ` Karl Dahlke [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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210920080052.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=edbrowse-dev@edbrowse.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).