Skip to content

Conversation

@SoundaryaKoutharapu
Copy link
Contributor

Description

This PR updates the Element.scrollTo() page to clarify that:

  • scrollTo() is an alias for Element.scroll().
  • Invoking scrollTo() behaves identically to scroll().
  • Added a cross-link to the scroll() page for clarity

Motivation

Additional details

Related issues and pull requests

Fixes #42222

@SoundaryaKoutharapu SoundaryaKoutharapu requested a review from a team as a code owner December 4, 2025 04:49
@SoundaryaKoutharapu SoundaryaKoutharapu requested review from wbamberg and removed request for a team December 4, 2025 04:49
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Dec 4, 2025
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()`.
Copy link
Contributor

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 🐶

Suggested change
> **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)
Copy link
Contributor

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 🐶

Suggested change
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()`.
Copy link
Contributor

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:'"]

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Preview URLs

(comment last updated: 2025-12-04 04:59:58)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make it clear that scroll and scrollTo are the same

1 participant