MCPcopy Create free account
hub / github.com/UI5/webcomponents / isElementHidden

Function isElementHidden

packages/base/src/util/isElementHidden.ts:1–9  ·  view source on GitHub ↗
(el: HTMLElement)

Source from the content-addressed store, hash-verified

1const isElementHidden = (el: HTMLElement) => {
2 if (el.nodeName === "SLOT") {
3 return false;
4 }
5
6 const computedStyle = window.getComputedStyle(el);
7
8 return (computedStyle.display !== "contents" && (el.offsetWidth <= 0 && el.offsetHeight <= 0)) || (computedStyle.visibility === "hidden");
9};
10
11export default isElementHidden;

Callers 6

isElementTabbableFunction · 0.85
getFirstFocusableElementFunction · 0.85
getLastFocusableElementFunction · 0.85
isElemFocusableFunction · 0.85
findFocusableElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…