Is there a browser which implements scrollY/X but doesn't support pageY/XOffset
I guess what you want to know is whether you can fully trust pageY/XOffset
and leave scrollY/X
out of the game. The answer is yes. pageY/XOffset
is working in Firefox, Chrome, Opera, and IE 9!
I can't test scrollX/Y
on IE9 currently, but it is not listed on MSDN properties so there is a good chance it answers your question. So there may be browsers implementing pageY/XOffset
but not scrollY/X
.
Why were window.scrollY and window.scrollX introduced?
As scrollY
is only an alias, I'm sure it is only for better readability.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…