2 return function( elem ) {
3 // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
4 // IE throws on elements created in popups
5 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
6 if ( elem.ownerDocument.defaultView.opener ) {
7 return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
10 return window.getComputedStyle( elem, null );