[csswg-drafts] [cssom-view] Possible typo in scroll() method (#8700)

johannesodland has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Possible typo in scroll() method ==

Is there a typo in the description of the [dom element `scroll()` method](https://drafts.csswg.org/cssom-view/#dom-element-scroll)? 

>8.  If the element is the [root element](https://w3c.github.io/csswg-drafts/css-display-4/#root-element) invoke [scroll()](https://drafts.csswg.org/cssom-view/#dom-window-scroll) on window with [scrollX](https://drafts.csswg.org/cssom-view/#dom-window-scrollx) on window as first argument and y as second argument, and terminate these steps.

According to this definition `x` is ignored and replaced with `window.scrollX` when running `scroll()` on the root element.
I doubt that that is the intended behavior. 

It seems as if this is a copy paste error, as this is the exact same text as for [step 8 for setting scrollTop](https://drafts.csswg.org/cssom-view/#dom-element-scrolltop), where this would be the correct behavior. 

Should the definition be rewritten to pass both `x` and `y` to scroll() on window?
>8.  If the element is the [root element](https://w3c.github.io/csswg-drafts/css-display-4/#root-element) invoke [scroll()](https://drafts.csswg.org/cssom-view/#dom-window-scroll) on window with x as first argument and y as second argument, and terminate these steps.



Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8700 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 April 2023 09:42:52 UTC