scrollIntoView() container
Limited availability
The container option of the scrollIntoView() method sets which ancestor scroll container to scroll. The "nearest" value scrolls only the nearest ancestor, instead of the default "all".
Browser support
- Chrome 140 Released on 2025-09-02
- Chrome Android 140 Released on 2025-09-02
- Edge 140 Released on 2025-09-05
- Firefox Not supported
- Firefox for Android Not supported
- Safari Not supported
- Safari on iOS Not supported
Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.
MDN documentation
Specifications
Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist