mirror of
https://github.com/jquery/jquery.git
synced 2024-10-05 11:34:18 +00:00
CSS: make the getStyles function more readable
(cherry-picked from 3a0d582cf6
)
Closes gh-2393
This commit is contained in:
parent
f2bcf87c25
commit
bf282ea8e2
@ -15,11 +15,13 @@ if ( window.getComputedStyle ) {
|
||||
// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
|
||||
// IE throws on elements created in popups
|
||||
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
|
||||
if ( elem.ownerDocument.defaultView.opener ) {
|
||||
return elem.ownerDocument.defaultView.getComputedStyle( elem );
|
||||
var view = elem.ownerDocument.defaultView;
|
||||
|
||||
if ( !view.opener ) {
|
||||
view = window;
|
||||
}
|
||||
|
||||
return window.getComputedStyle( elem );
|
||||
return view.getComputedStyle( elem );
|
||||
};
|
||||
|
||||
curCSS = function( elem, name, computed ) {
|
||||
|
Loading…
Reference in New Issue
Block a user