core/dom.js
function documentScrollY(targetElement) {
  if (targetElement && (targetElement !== window)) {
    return targetElement.scrollTop;
  }

  if (detectedIE10_ && (window.pageYOffset != document.documentElement.scrollTop)) {
    return document.documentElement.scrollTop;
  }

  return window.pageYOffset || document.documentElement.scrollTop;
}
function documentScrollY(targetElement) {
  if (targetElement && (targetElement !== window)) {
    return targetElement.scrollTop;
  }

  if (detectedIE10_ && (window.pageYOffset != document.documentElement.scrollTop)) {
    return document.documentElement.scrollTop;
  }

  return window.pageYOffset || document.documentElement.scrollTop;
}
function documentScrollY ( targetElement ) { if ( targetElement && ( targetElement !== window ) ) { return targetElement . scrollTop ; } if ( detectedIE10_ && ( window . pageYOffset != document . documentElement . scrollTop ) ) { return document . documentElement . scrollTop ; } return window . pageYOffset || document . documentElement . scrollTop ; }
Get the document scroll.
@param {Element} targetElement - Optional target element.
@return {number}
Get the document scroll .