Commit bf282ea8 authored by Thomas Tortorini's avatar Thomas Tortorini Committed by Michał Gołębiowski

CSS: make the getStyles function more readable

(cherry-picked from 3a0d582cf63b6e8f77150d9c38d2bf34d0c7790e)

Closes gh-2393
parent f2bcf87c
...@@ -15,11 +15,13 @@ if ( window.getComputedStyle ) { ...@@ -15,11 +15,13 @@ if ( window.getComputedStyle ) {
// Support: IE<=11+, Firefox<=30+ (#15098, #14150) // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
// IE throws on elements created in popups // IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle" // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
if ( elem.ownerDocument.defaultView.opener ) { var view = elem.ownerDocument.defaultView;
return elem.ownerDocument.defaultView.getComputedStyle( elem );
if ( !view.opener ) {
view = window;
} }
return window.getComputedStyle( elem ); return view.getComputedStyle( elem );
}; };
curCSS = function( elem, name, computed ) { curCSS = function( elem, name, computed ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment