// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !jQuery.support.hrefNormalized ) {
jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
}
});
});
+
+ // link's href property should get the full normalized URL (#10299)
+ jQuery.propHooks.href = {
+ get: function( elem, name ) {
+ return elem.getAttribute( name, 4 );
+ }
+ };
}
if ( !jQuery.support.style ) {
});
test( "attr(String)", function() {
- expect( 46 );
+ expect( 47 );
equal( jQuery("#text1").attr("type"), "text", "Check for type attribute" );
equal( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" );
"href": "#5"
}).appendTo("#qunit-fixture");
equal( jQuery("#tAnchor5").attr("href"), "#5", "Check for non-absolute href (an anchor)" );
+ jQuery("<a id='tAnchor6' href='#5' />").appendTo("#qunit-fixture");
+ equal( jQuery("#tAnchor5").prop("href"), jQuery("#tAnchor6").prop("href"), "Check for absolute href prop on an anchor" );
// list attribute is readonly by default in browsers that support it
jQuery("#list-test").attr( "list", "datalist" );