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

Function getOpacity

javascript/atoms/typescript/is-displayed.ts:104–109  ·  view source on GitHub ↗
(elem: Element)

Source from the content-addressed store, hash-verified

102 }
103
104 function getOpacity(elem: Element): number {
105 var opacityStyle = getEffectiveStyle(elem, 'opacity');
106 var opacity = opacityStyle ? Number(opacityStyle) : 1;
107 var parent = getParentElement(elem);
108 return parent ? opacity * getOpacity(parent) : opacity;
109 }
110
111 function getParentNodeInComposedDom(node: Node): Node | null {
112 var parent = node.parentNode;

Callers 1

isShownInternalFunction · 0.85

Calls 2

getEffectiveStyleFunction · 0.85
getParentElementFunction · 0.85

Tested by

no test coverage detected