Re: [csswg-drafts] [cssom-view] Consider making scroll methods return promises (#1562)

I am super mega late to the party since I saw this on social media (sorry for the noise). But I cam to leave a comment that pretty much matches this one: https://github.com/w3c/csswg-drafts/issues/1562#issuecomment-2997993316

I wonder why the pattern used for the Web Animation API wasn't considered:

```js
const elem = document.getElementById('test');
await elem.scroll(0, 400).finished;
```

Besides matching APIs we already know, wouldn't that add `Promise` support without introducing the way errors are thrown?

-- 
GitHub Notification of comment by jeremenichelli
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1562#issuecomment-4177761738 using your GitHub account


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

Received on Thursday, 2 April 2026 13:09:07 UTC