diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes/attr.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/attributes/attr.js b/src/attributes/attr.js index 00b08489d..51bba773e 100644 --- a/src/attributes/attr.js +++ b/src/attributes/attr.js @@ -7,14 +7,7 @@ define( [ ], 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 ) { @@ -46,8 +39,7 @@ jQuery.extend( { // 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 ); } |