UNPKG

782 BJavaScriptView Raw
1import { window } from './facade/browser';
2export var Utils = (function () {
3 function Utils() {
4 }
5 Utils.reflow = function (element) {
6 (function (bs) { return bs; })(element.offsetHeight);
7 };
8 // source: https://github.com/jquery/jquery/blob/master/src/css/var/getStyles.js
9 Utils.getStyles = function (elem) {
10 // Support: IE <=11 only, Firefox <=30 (#15098, #14150)
11 // IE throws on elements created in popups
12 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
13 var view = elem.ownerDocument.defaultView;
14 if (!view || !view.opener) {
15 view = window;
16 }
17 return view.getComputedStyle(elem);
18 };
19 return Utils;
20}());
21//# sourceMappingURL=utils.class.js.map
\No newline at end of file