Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[cssom-view] Should the associated element to window.scroll() be the scrollingElement? #2977
The associated element is used to determine the scroll behavior when the one in ScrollOptions is auto ( https://drafts.csswg.org/cssom-view/#perform-a-scroll ). For window.scroll(), it is defined as the document’s root element ( https://drafts.csswg.org/cssom-view/#dom-window-scroll ):
However, window.scroll() is also executed when scroll() for two cases, essentially when it is called on the scrollingElement ( https://drafts.csswg.org/cssom-view/#dom-element-scroll ):
One could expect that the CSS scroll-behavior is taken from the element on which scroll() is called, which is not the true in the latter case. Should window.scroll() use the scrollingElement as an associated element instead?
Note: Other places where document’s root element is used are: