MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / getScroll

Function getScroll

javascript/atoms/typescript/is-displayed.ts:306–315  ·  view source on GitHub ↗
(current: Element)

Source from the content-addressed store, hash-verified

304 }
305
306 function getScroll(current: Element): Coordinate {
307 if (current === htmlElem) {
308 return {
309 x: ownerDoc.defaultView ? ownerDoc.defaultView.pageXOffset : 0,
310 y: ownerDoc.defaultView ? ownerDoc.defaultView.pageYOffset : 0,
311 };
312 }
313
314 return { x: current.scrollLeft, y: current.scrollTop };
315 }
316
317 for (var container = getOverflowParent(elem); container; container = getOverflowParent(container)) {
318 var containerOverflow = getOverflowStyles(container);

Callers 1

getOverflowStateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected