Window.pageYOffset vs window.scrollY in IE11
Window.scrollY does not show the correct top scroll value in IE11, but Window.pageYOffset, alias Window.scrollY, works as expected. I am confusing the fact that the alias works better than the original property. Can anyone help me understand why ?: [
Note. I am not interested in finding a cross-browser compatible version. The point is, I want to know why the IE11 alias is not working the same as the value being "tracked". I'm not sure if I should focus deeply on some of the "aliases" on IE ...
source to share
Window.scrollY is not supported in IE (11 or below). Window.pageYOffset works with "all" browsers, including IE9-11. Window.scrollY works with "all" browsers except IE.
IE9 and below should (in most cases) no longer be supported because using them means no security updates for the browser or OS, but IE8, an alternative to window.scrollY? explains what you can use document.documentElement.scrollTop
for lower versions of IE.
source to share