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

Function canBeOverflowed

javascript/atoms/dom.js:690–708  ·  view source on GitHub ↗
(container)

Source from the content-addressed store, hash-verified

688 }
689
690 function canBeOverflowed(container) {
691 // The HTML element can always be overflowed.
692 if (container == htmlElem) {
693 return true;
694 }
695 // An element cannot overflow an element with an inline or contents display style.
696 var containerDisplay = /** @type {string} */ (
697 bot.dom.getEffectiveStyle(container, 'display'));
698 if (goog.string.startsWith(containerDisplay, 'inline') ||
699 (containerDisplay == 'contents')) {
700 return false;
701 }
702 // An absolute-positioned element cannot overflow a static-positioned one.
703 if (position == 'absolute' &&
704 bot.dom.getEffectiveStyle(container, 'position') == 'static') {
705 return false;
706 }
707 return true;
708 }
709 }
710
711 // Return the x and y overflow styles for the given element.

Callers 1

getOverflowParentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected