> I think this is a great approach, and I hope it goes somewhere. How
> exactly can I help with it?

Categorizing the "types" would be a great start. Types that should
"just work", Types that should return booleans, types that we
obviously don't care about (attributes of isindex, for example), and
attributes that we provide better alternatives for (Using .click()
instead of .attr("onclick", fn), for example).

After we tackle the attributes we should look at the most common
properties (like innerHTML, innerText, textContent, etc.) and at least
be able to tell users what to use instead or make sure that they're
supported by .attr() directly.

> Also, to further illustrate why I think calling jQuery methods when
> calling attr() is a bad idea, take a look at the example page our
> great friend David Mark has set up (ignore the insulting url):
> http://www.cinsoft.net/jquerysucks.html
>
> Because height() tries to do so much magic, it ends up that this:
>
> $o.attr('height',$o.attr('height'));

I was 100% serious about a ban concerning everything from CLJ. Please,
original ideas/concerns/bug reports/test cases only.

For example, writing up some tests that make sure that you can do:
var a = $(foo).attr(A);
$(foo).attr(A, a);
equals( a, $(foo).attr(A), "Attributes did a round-trip and are still equal." );

Would probably be fine.

On the whole though, I'd recommend to just stop reading the group as
who knows what they will try to pull next.

> actually gives wrong results. IMO, attr() should be reflexive in that
> calling attr() to set a property with a value retrieved from attr()
> should always maintain the same value. I just really think the whole
> idea of calling methods when getting/setting attributes is bad. What
> is the real basis for it?

I discussed this earlier in the thread with Robert Katić.

--John

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to