MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / getParentElement

Function getParentElement

javascript/atoms/typescript/is-displayed.ts:77–88  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

75 }
76
77 function getParentElement(node: Node): Element | null {
78 var current = node.parentNode;
79 while (
80 current &&
81 current.nodeType !== Node.ELEMENT_NODE &&
82 current.nodeType !== Node.DOCUMENT_NODE &&
83 current.nodeType !== Node.DOCUMENT_FRAGMENT_NODE
84 ) {
85 current = current.parentNode;
86 }
87 return current && current.nodeType === 1 /* ELEMENT_NODE */ ? (current as Element) : null;
88 }
89
90 function getEffectiveStyle(elem: Element, propertyName: string): string | null {
91 var computed = computedStyleCache.get(elem);

Callers 2

getOpacityFunction · 0.85
getOverflowParentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected