The scrollParent attribute on HTMLElement returns the nearest scroll container containing block of the element's. In particular this is the nearest scroll container whose scroll offset affects the element's position. This can be useful to jump to elements to scroll or to elements on which to add scroll listeners to detect when the user scrolls.
Developers have to check a number of conditions to determine if an element is a scroll container and correctly walking the containing block chain can be tricky to get correct. Having scrollParent will allow developers to jump right to the correct container on which to add scroll event listeners and/or call scrolling API's in order to effect the target element's scroll position or use those scrolling offsets on other elements.
None
It is possible to write a reasonable polyfill for this API and start using it immediately with a fallback implementation.
There are no known security risks to this API.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
This doesn't need any debugging support, and in fact is helpful for developers to debug their content when using CSS features which rely on the nearest scrolling container such as position sticky.
No milestones specified