* Re: [Edbrowse-dev] Failure of the g command with V3.6.0 (fwd)
@ 2015-12-16 3:08 Kevin Carhart
0 siblings, 0 replies; only message in thread
From: Kevin Carhart @ 2015-12-16 3:08 UTC (permalink / raw)
To: Edbrowse-dev
Congratulations on v3.6.0!
I have some notes on Chuck's georgehowe issue.
I think it may have something to do with getElementsByClassName.
The georgehowe developers use the jquery syntax for selecting by class, which
is to put a leading period before your string:
var loginlogout_link = $('.login-logout');
Maybe this is actually a standard CSS syntax for class. I'm not sure.
The reason why I think our getElementsByClassName is involved is that the
jquery code for these things usually ties back to the DOM (or invariably
does.)
So in other words, blah = $('.class') is a wrapper around
getElementsByClassName, with maybe some extra optimization so that the
selector runs more quickly than the DOM function would, or that's the idea.
And this is returning nothing when I try it, yet I know the jquery itself is
OK because this unrelated selector by tag type does return several elements:
var test1 = $("INPUT")
I am still trying to track this down but it may have something to do with what
happens if you have a class string like:
class="login-logout top-menu-link"
If you test for the presence of just "login-logout", it would fail if you are
requiring an exact string match, but it should succeed if "login-logout
top-menu-link" is treated as a space-delimited list, and a match on any of the
given class names is considered a match.
But I think there is something else wrong, because I also can't get a result
back when I try:
var test2 = $(".login-logout top-menu-link")
Which ought to succeed even if you ARE requiring an exact match on the entire
thing. So I could be wrong about getElementsByClassName being relevant.
Kevin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-16 3:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-16 3:08 [Edbrowse-dev] Failure of the g command with V3.6.0 (fwd) Kevin Carhart
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).