I am trying to process some code based on the \'document.documentElement.scrollTop\' value. It returns \'348\' in FF and IE but in Chrome it return
document.documentElement.scrollTop
348
You can use this function document.body.getBoundingClientRect() and it returns this object {x: 0, y: 0, width: 1903, height: 2691.5625, top: 0, …}; in this object you can access body top document.body.getBoundingClientRect().top
{x: 0, y: 0, width: 1903, height: 2691.5625, top: 0, …};
document.body.getBoundingClientRect().top