MCPcopy Create free account
hub / github.com/IABTechLab/uid2docs / identifyClosestSiblingInput

Function identifyClosestSiblingInput

src/utils/index.ts:19–29  ·  view source on GitHub ↗
(
  node: Node,
)

Source from the content-addressed store, hash-verified

17};
18
19export const identifyClosestSiblingInput = (
20 node: Node,
21): HTMLInputElement | null => {
22 let currentElement: Node | null = node.nextSibling;
23
24 while (currentElement && !isInputElement(currentElement)) {
25 currentElement = currentElement.nextSibling;
26 }
27
28 return currentElement as HTMLInputElement | null;
29};

Callers 1

RequestDemoFunction · 0.90

Calls 1

isInputElementFunction · 0.85

Tested by

no test coverage detected