- Having fixed this automatically with the use of removeAttribute in browsers that support it, this will fix it for IE6/7 as well.
- This has no effect on width/height styles set elsewhere( test added to removeAttr )
- With this addition, I need to call attr in removeAttr for IE6/7, which means boolean calls like .attr("checked", "") will no longer remove the attribute, which I think is fine. .attr("checked", false) will still remove. If I had left it, it would have gone in an infinite loop since setting to empty string is the only way to remove it in these browsers.
- The hrefNormalized hooks were returning null if they weren't present. Added the null check to the getter.
- Now that the style support fails in IE8 as well due to uppercasing everything, no need to have style included with the hrefNormalized hooks
- Style is now a special case in IE6/7 to set cssText. My goal is to avoid calling attr again for the performance benefit, and at this point it would also cause an infinite loop for the boolean attributes hooks such as selected & checked. Nevertheless, style seems to be the only one requiring a special call.
- Normalize set value to string to synchronize return type cross-browser
- Add style attrHook to propHooks to support style getting in all browsers for both attr and prop
- Extend the selected propHook instead of overriding a possible set function
- Remove selected propHook TODO since there is no selected content attribute and it should return null
- Forms with an input that has either name="action" or name="some-other-attr-on-the-form" caused problems in IE6/7. This is fixed.
- Changed check in $.attr for ret === null to typeof ret === "object" to catch any inputs that are accidentally retrieved in IE6/7, since attributes cannot be set to objects and typeof null === "object"
- removeAttr now only uses setAttribute if camelCase setAttribute is not supported
+ Might want to rename jQuery.support.getSetAttribute
- tabIndex is a special case now for hooks where undefined should be returned.
+ Should we be checking if hooks returns undefined? undefined might be the desired return value in future hooks.
As of now, tabIndex is the only one that needs it, but the test suite will still pass if we don't check if hooks are undefined.
+ Added hooks for selected, checked, readonly, disabled to removeAttr if set to falsey
+ Removed all attrs from attrFix, these aren't needed for setAttribute
+ If prop is used for class, do we want a propFix for class?
- We could just assume the user should know to use className with prop. I've done the latter for now.
+ Created tests for $.fn.prop and $.fn.removeProp
- Actually all I did was change broken attr tests to prop where it made sense.
- The main difference is that this does not allow arbitrarily adding hooks to any collection of elements.
- Modularizes val into a set of easily maintainable and conditional hooks.
- valHooks is placed at jQuery.valHooks
+ This could technically be extended, but I do not see it being used except in very rare cases since you can only apply valHooks to nodeNames and input types, and not a collection of elements as before. We could theoretically privatize valHooks taking it off of jQuery and only use it internally for our own convenience, but again, I do not believe this patch carries with it the dangers of the first proposal.
- Slightly improved performance of val on radios and checkboxes for browsers that support checkOn, given the conditional attachment of its hook.