-
Notifications
You must be signed in to change notification settings - Fork 23k
Clarify that scrollTo() is an alias of scroll() #42223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Clarify that scrollTo() is an alias of scroll() #42223
Conversation
| The **`scrollTo()`** method of the {{domxref("Element")}} | ||
| interface scrolls to a particular set of coordinates inside a given element. | ||
|
|
||
| > **Note:** `Element.scrollTo()` is an alias for `Element.scroll()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
| > **Note:** `Element.scrollTo()` is an alias for `Element.scroll()`. | |
| > **Note:** `Element.scrollTo()` is an alias for `Element.scroll()`. |
| > **Note:** `Element.scrollTo()` is an alias for `Element.scroll()`. | ||
| > Invoking `scrollTo()` has the same effect as calling `scroll()` with the same arguments. | ||
| See also: [Element.scroll()](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mdn-linter] reported by reviewdog 🐶
| See also: [Element.scroll()](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll) | |
| See also: [Element.scroll()](/en-US/docs/Web/API/Element/scroll) |
| The **`scrollTo()`** method of the {{domxref("Element")}} | ||
| interface scrolls to a particular set of coordinates inside a given element. | ||
|
|
||
| > **Note:** `Element.scrollTo()` is an alias for `Element.scroll()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[markdownlint] reported by reviewdog 🐶
error search-replace Custom rule [gfm-alert: Use the GFM syntax: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Howto/Markdown_in_MDN#notes_warnings_and_callouts] [Context: "column: 1 text:'> Note:'"]
|
Preview URLs (comment last updated: 2025-12-04 04:59:58) |
Description
This PR updates the Element.scrollTo() page to clarify that:
scrollTo()is an alias forElement.scroll().scrollTo()behaves identically toscroll().Motivation
Additional details
Related issues and pull requests
Fixes #42222