Added back support.js test for getSetAttribute and removed some duplicate code that crept into attributes.js

This commit is contained in:
timmywil 2011-04-10 17:08:18 -04:00
parent c10a76ec71
commit 215c507f79
2 changed files with 3 additions and 16 deletions

View file

@ -24,20 +24,6 @@ jQuery.fn.extend({
return jQuery.access( this, name, value, true, jQuery.prop ); return jQuery.access( this, name, value, true, jQuery.prop );
}, },
removeProp: function( name ) {
return this.each(function() {
// try/catch handles cases where IE balks (such as removing a property on window)
try {
this[ name ] = undefined;
delete this[ name ];
} catch( e ) {}
});
},
prop: function( name, value ) {
return jQuery.access( this, name, value, true, jQuery.prop );
},
removeProp: function( name ) { removeProp: function( name ) {
return this.each(function() { return this.each(function() {
// try/catch handles cases where IE balks (such as removing a property on window) // try/catch handles cases where IE balks (such as removing a property on window)

View file

@ -19,7 +19,8 @@ jQuery.support = (function() {
isSupported; isSupported;
// Preliminary tests // Preliminary tests
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; div.setAttribute("className", "t");
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
all = div.getElementsByTagName( "*" ); all = div.getElementsByTagName( "*" );
a = div.getElementsByTagName( "a" )[ 0 ]; a = div.getElementsByTagName( "a" )[ 0 ];
@ -48,7 +49,7 @@ jQuery.support = (function() {
// Get the style information from getAttribute // Get the style information from getAttribute
// (IE uses .cssText instead) // (IE uses .cssText instead)
style: /red/.test( a.getAttribute("style") ), style: /top/.test( a.getAttribute("style") ),
// Make sure that URLs aren't manipulated // Make sure that URLs aren't manipulated
// (IE normalizes it by default) // (IE normalizes it by default)