4 comments

[ 2.7 ms ] story [ 17.7 ms ] thread
While I like the split between attr() and prop() conceptually, the difficulty of updating was much higher. This is probably the right way to go about this for now.
I'm glad they backed out the changes to attr(). Backward compatibility is critical for any popular library, often more important than having completely "correct" behaviour.

Without any kind of type-safety or compilation in JavaScript, it's even more important for jQuery to preserve compatibility than libraries in other languages. You probably wouldn't discover some obscure breakages until the software using it is in production.

I'm not quite sure I see why you would use

  element.prop('property', value);
instead of

  element.property = value;
You probably wouldn't, it's just a convenience method (and patches over some of the cross-browser inconsistencies and naming-convention weirdness).