aboutsummaryrefslogtreecommitdiffstats
path: root/src/css/var/getStyles.js
blob: 02a4b8194ee9d03e47c923b99e1c7be533fd1182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
define( function() {
	return function( elem ) {

		// Support: IE<=11+, Firefox<=30+ (#15098, #14150)
		// IE throws on elements created in popups
		// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
		var view = elem.ownerDocument.defaultView;

		if ( !view || !view.opener ) {
			view = window;
		}

		return view.getComputedStyle( elem );
	};
} );