blob: 0b893acf0b2a2736979cbf0d11d0dbf44497a65c [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001define( function() {
2 "use strict";
3
4 return function( elem ) {
5
6 // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
7 // IE throws on elements created in popups
8 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
9 var view = elem.ownerDocument.defaultView;
10
11 if ( !view || !view.opener ) {
12 view = window;
13 }
14
15 return view.getComputedStyle( elem );
16 };
17} );