UNPKG

788 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7var _default = exports.default = function _default(element) {
8 if (!element) {
9 return false;
10 }
11 if (element instanceof Element) {
12 if (element.offsetParent) {
13 return true;
14 }
15 if (element.getBBox) {
16 var _getBBox = element.getBBox(),
17 width = _getBBox.width,
18 height = _getBBox.height;
19 if (width || height) {
20 return true;
21 }
22 }
23 if (element.getBoundingClientRect) {
24 var _element$getBoundingC = element.getBoundingClientRect(),
25 _width = _element$getBoundingC.width,
26 _height = _element$getBoundingC.height;
27 if (_width || _height) {
28 return true;
29 }
30 }
31 }
32 return false;
33};
\No newline at end of file