Skip to content

Commit

Permalink
Use value rather than nodeValue in attributes (it's the string versio…
Browse files Browse the repository at this point in the history
…n). Update sizzle: default attribute handling.
  • Loading branch information
timmywil committed Jul 3, 2012
1 parent 6e36cbf commit b414fe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/attributes.js
Expand Up @@ -536,8 +536,8 @@ if ( !getSetAttribute ) {
get: function( elem, name ) { get: function( elem, name ) {
var ret; var ret;
ret = elem.getAttributeNode( name ); ret = elem.getAttributeNode( name );
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
ret.nodeValue : ret.value :
undefined; undefined;
}, },
set: function( elem, value, name ) { set: function( elem, value, name ) {
Expand All @@ -547,7 +547,7 @@ if ( !getSetAttribute ) {
ret = document.createAttribute( name ); ret = document.createAttribute( name );
elem.setAttributeNode( ret ); elem.setAttributeNode( ret );
} }
return ( ret.nodeValue = value + "" ); return ( ret.value = value + "" );
} }
}; };


Expand Down
2 changes: 1 addition & 1 deletion src/sizzle
Submodule sizzle updated 2 files
+8 −4 sizzle.js
+15 −12 test/unit/selector.js

0 comments on commit b414fe1

Please sign in to comment.