From d8be8b03275a5f40be9be6a9659cecd4c3a8405a Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Thu, 15 Apr 2021 09:45:19 +0300 Subject: [PATCH] Add scrollX/scrollY --- 2-ui/1-document/10-size-and-scroll-window/article.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/2-ui/1-document/10-size-and-scroll-window/article.md b/2-ui/1-document/10-size-and-scroll-window/article.md index 95a5cd48..08a2f657 100644 --- a/2-ui/1-document/10-size-and-scroll-window/article.md +++ b/2-ui/1-document/10-size-and-scroll-window/article.md @@ -73,6 +73,12 @@ alert('Current scroll from the left: ' + window.pageXOffset); These properties are read-only. +```smart header="Also available as `window` properties `scrollX` and `scrollY`" +For historical reasons, both properties exist, but they are the same: +- `window.pageXOffset` is an alias of `window.scrollX`. +- `window.pageYOffset` is an alias of `window.scrollY`. +``` + ## Scrolling: scrollTo, scrollBy, scrollIntoView [#window-scroll] ```warn