You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
489 B
14 lines
489 B
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports.isHidden = isHidden;
|
|
|
|
function isHidden(el) {
|
|
var style = window.getComputedStyle(el);
|
|
var hidden = style.display === 'none'; // offsetParent returns null in the following situations:
|
|
// 1. The element or its parent element has the display property set to none.
|
|
// 2. The element has the position property set to fixed
|
|
|
|
var parentHidden = el.offsetParent === null && style.position !== 'fixed';
|
|
return hidden || parentHidden;
|
|
} |