Re: [csswg-drafts] [cssom-view-1] Scroll methods in Element and Window return Promises (#12355)

> In the discussion we talked about the argument to the promise being an object which would tell the developer the result of the scroll, e.g. to know if it was cancelled / interrupted as was brought up a few times as a common thing to need to know.

That's correct.  The problem is that it not yet defined how the promise would be resolved to mark scroll completion vs interruption.  I can update this PR to resolve with a `true` to mark completion and `false` "otherwise" but I am hesitant because of a few reasons:

1. It is perhaps not okay to add normative things w/o discussion, right?  E.g. we don't know if we should use a Boolean here vs an enum.

2. What does that "otherwise" mean to be precise?  Does one programmatic scroll request interrupt all pending promises?  Or only the pending ones for the same scroller?

3. We _may_ need additional text in the current scroll algorithms to "collect" pending scrolling requests.  To me a follow-up PR after this one seems cleaner.

I am proposing to land this PR as "closing" #1562, staring a new spec issue to discuss 1+2 above, and then hash out 3 in the PR for that new issue.

-- 
GitHub Notification of comment by mustaqahmed
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/12355#issuecomment-3057902380 using your GitHub account


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

Received on Thursday, 10 July 2025 15:20:20 UTC