MCPcopy Create free account
hub / github.com/breck7/scroll / pageScrollX

Function pageScrollX

external/.scrollLibs.js:3890–3898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3888 }
3889
3890 function pageScrollX() {
3891 // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
3892 // which causes page_Offset and bounding client rects to use
3893 // different reference viewports and invalidate our calculations.
3894 if (chrome && android) {
3895 return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft))
3896 }
3897 return window.pageXOffset || (document.documentElement || document.body).scrollLeft
3898 }
3899 function pageScrollY() {
3900 if (chrome && android) {
3901 return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop))

Callers 2

intoCoordSystemFunction · 0.85
fromCoordSystemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected