Commit 1e9b3ef3 authored by timmywil's avatar timmywil

Move the check for the name attribute out of attr and down to the formHook definition

parent fa4373c1
...@@ -301,7 +301,7 @@ jQuery.extend({ ...@@ -301,7 +301,7 @@ jQuery.extend({
// Get the appropriate hook, or the formHook // Get the appropriate hook, or the formHook
// if getSetAttribute is not supported and we have form objects in IE6/7 // if getSetAttribute is not supported and we have form objects in IE6/7
hooks = jQuery.attrHooks[ name ] || ( ( name === "name" || elem.nodeName === "FORM" ) && formHook ); hooks = jQuery.attrHooks[ name ] || ( elem.nodeName === "FORM" && formHook );
if ( value !== undefined ) { if ( value !== undefined ) {
...@@ -426,7 +426,7 @@ if ( !jQuery.support.getSetAttribute ) { ...@@ -426,7 +426,7 @@ if ( !jQuery.support.getSetAttribute ) {
// Use this for any attribute on a form in IE6/7 // Use this for any attribute on a form in IE6/7
// And the name attribute // And the name attribute
formHook = { formHook = jQuery.attrHooks.name = {
get: function( elem, name ) { get: function( elem, name ) {
var ret = elem.getAttributeNode( name ); var ret = elem.getAttributeNode( name );
// Return undefined if not specified instead of empty string // Return undefined if not specified instead of empty string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment