mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Make sure that missing attributes return undefined in Blackberry 4.7. Fixes #6938.
This commit is contained in:
parent
1bdcffba8e
commit
cb40495b21
@ -325,6 +325,12 @@ jQuery.extend({
|
||||
elem.setAttribute( name, "" + value );
|
||||
}
|
||||
|
||||
// Ensure that missing attributes return undefined
|
||||
// Blackberry 4.7 returns "" from getAttribute #6938
|
||||
if ( !elem.attributes[ name ] && !elem.hasAttribute( name ) ) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var attr = !jQuery.support.hrefNormalized && notxml && special ?
|
||||
// Some attributes require a special call on IE
|
||||
elem.getAttribute( name, 2 ) :
|
||||
|
Loading…
Reference in New Issue
Block a user