hasFormContent function
Last updated: 2026-03-04T23:21:38.393Z
Location
Metrics
LOC: 24
Complexity: 9
Params: 1
Signature
hasFormContent(el: HTMLElement): : boolean
Summary
Checks if an element contains or is a form-related element
Source Code
function hasFormContent(el: HTMLElement): boolean {
if (
el.tagName === "INPUT" ||
el.tagName === "SELECT" ||
el.tagName === "TEXTAREA" ||
el.tagName === "FORM"
) {
return true;
}
if (
el.classList.contains("ant-select") ||
el.classList.contains("ant-form-item") ||
el.className.includes("MuiFormControl") ||
el.className.includes("react-select")
) {
return true;
}
return (
el.querySelector("input, select, textarea, .ant-select, .ant-form-item") !==
null
);
}
No outgoing dependencies.
Impact (Incoming)
| Source | Type |
|---|---|
| handleMutations | calls |