D
David Mark
[snip]I'll pass. Better things to do.
I'm unclear about what exactly it intends to do.
I don't use it. I'm pretty sure I said that.
Set or get DOM properties/node attributes, I presume. Apparently it
doesn't do this well, which is one of the reasons I don't use it. That
and the fact that I have never found a need for it.
Very interesting.
http://markmail.org/message/ldgy4rawlddcisyy
It starts out:
"I took a look at the 'attr' function today and here are my comments."
So you have gone over this code, apparently in response to my
criticism posted in the fall of 2007. Unfortunately, your analysis
was myopic in that it focused only on the browser sniffing. Again, we
are not talking about an expansive piece of code. So, your claims of
helping this effort aren't confidence inducing.
Here's part of one of the responses, which defended the browser
sniffing:
"This one is easy to answer: consistent behaviour. Suppose I develop
in Firefox, only to find out during testing that it doesn't work in
IE. Due to the nature of this feature, I might have to redesign my
approach to the problem. Lots of lost time, for the dubious gain that
it works for no-IE use cases. If it cannot be made to work at one
place, it should fail everywhere. A consistency layer is not only
about emulating missing or broken functionality."
So other collaborators were inspecting this function back then as
well. Unfortunately, they were prone to techno-babble, rather than
debate.
Another threw in an anecdote about Sun Microsystems:
"Case study: Sun Microsystems de-facto in-house browser is Firefox.
Almost 100% of Sun employees have Firefox and use it as their primary
browser from what I hear."
Resig himself chimed in with this:
"I posted the following reply to comp.lang.javascript:"
Yeah, that was it. Just a self-congratulatory regurgitation of his
post to this group, which didn't address any problems, but did reveal
his inability to read for comprehension. IIRC, he quoted the typeof
xyz == 'array' blunder, but didn't seem to consider it a problem.
There was this endorsement from a clearly disturbed "XML centric"
developer. Gut-wrenching considering the topic at hand.
"I choose jQuery over other javascript libraries because of it's
ability to perform, the clarity of the docs, the talented community,
and most of all for it's elegance. I am an XML centric developer and
have always found the different treatment of 'The DOM' and 'any other
xml' very frustrating."
A vote of confidence:
"John I don't think I have smiled so much throughout such a long
thread in a very long time. Thanks for that. I know it must have been
tiring to justify (so well) all the reasons you have. Hopefully people
like the original complainer will just back off and leave ya alone for
a bit. You should post the replies to this somewhere on a blog so you
can refer back to it whenever someone complains like that again."
Oh brother. Don't think Resig will be posting *that* to a blog any
time soon.
This is clearly your "elegant" workaround for attr:
"Not stuck, just need to step out of jQuery for a ms. $('input#pwd')
[0].type = 'text';"
Another vote for browser sniffing:
"Feature-detect fails when a browser implements a feature, but
incorrectly. As a result, browser-specific workarounds are sometimes
necessary. Case closed.
Sent from my iPhone"
Send it back. I'll leave you with this self-referential time-wasting:
"Overall, I have to say I'm really impressed with the jQuery
Development team and the rest of us on the discussion list (if I can
say that in a way without complimenting myself). This thread had all
the right energy to snowball into a flame war / pissing contest and I
think you all have done a good job of keeping yourselves logical and
supportive."
And still completely in the dark. Good night.