xwt
2025-08-21 bfffb0306f8e37ea39624499c55306837bf23ecf
1
2
3
4
5
6
7
8
9
export 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;
}