], function( jQuery, access, support, rnotwhite ) {
var boolHook,
- attrHandle = jQuery.expr.attrHandle,
-
- // Exclusively lowercase A-Z in attribute names (gh-2730)
- // https://dom.spec.whatwg.org/#converted-to-ascii-lowercase
- raz = /[A-Z]+/g,
- lowercase = function( ch ) {
- return ch.toLowerCase();
- };
+ attrHandle = jQuery.expr.attrHandle;
jQuery.fn.extend( {
attr: function( name, value ) {
// All attributes are lowercase
// Grab necessary hook if one is defined
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.replace( raz, lowercase );
- hooks = jQuery.attrHooks[ name ] ||
+ hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
}