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

Yes, I think this would result in no change to the way errors are thrown if the scrolling APIs returned an object from which you could get the finished promise. The reason the Web Animation API has this is because the Animation object (returned from element.animate) itself has a lot of useful API surface - whereas in this case we would likely just have finished on that intermediate object for now. Not to say that we couldn't do that, just pointing out that the resolved solution does align with other APIs like fetch.

I have separately thought that Element.scrolled should allow you to get the scroll promise for a scroll container that is currently scrolling, I filed #13760 for that.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1562#issuecomment-4179570081 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 18:08:39 UTC