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

Function canBeOverflowed

javascript/atoms/typescript/is-displayed.ts:252–267  ·  view source on GitHub ↗
(container: Element, position: string | null)

Source from the content-addressed store, hash-verified

250 var treatAsFixedPosition = false;
251
252 function canBeOverflowed(container: Element, position: string | null): boolean {
253 if (container === htmlElem) {
254 return true;
255 }
256
257 var display = getEffectiveStyle(container, 'display') || '';
258 if (display.indexOf('inline') === 0 || display === 'contents') {
259 return false;
260 }
261
262 if (position === 'absolute' && getEffectiveStyle(container, 'position') === 'static') {
263 return false;
264 }
265
266 return true;
267 }
268
269 function getOverflowParent(current: Element): Element | null {
270 var position = getEffectiveStyle(current, 'position');

Callers 1

getOverflowParentFunction · 0.70

Calls 1

getEffectiveStyleFunction · 0.85

Tested by

no test coverage detected