mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Streamline getComputedStyle per @JustinDrake's observation.
This commit is contained in:
parent
f35ba5e699
commit
262c32a70e
@ -268,11 +268,8 @@ if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
||||
|
||||
name = name.replace( rupper, "-$1" ).toLowerCase();
|
||||
|
||||
if ( !(defaultView = elem.ownerDocument.defaultView) ) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
|
||||
if ( (defaultView = elem.ownerDocument.defaultView) &&
|
||||
(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
|
||||
ret = computedStyle.getPropertyValue( name );
|
||||
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
||||
ret = jQuery.style( elem, name );
|
||||
|
Loading…
Reference in New Issue
Block a user