ITADN

Programmatic scroll promise

#639Openmustaqahmed 创建于 2026-03-24
topic: cssvenue: W3C CSS WGfrom: Googletopic: scrolling
M
mustaqahmedcommented
### WebKittens @smfr ### Title of the proposal Programmatic scroll promise ### URL to the spec https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface ### URL to the spec's repository https://github.com/w3c/csswg-drafts/tree/main/cssom-view-1 ### Issue Tracker URL _No response_ ### Explainer URL https://github.com/explainers-by-googlers/promisify-scroll/blob/main/README.md ### TAG Design Review URL https://github.com/w3ctag/design-reviews/issues/1210 ### Mozilla standards-positions issue URL https://github.com/mozilla/standards-positions/issues/1379 ### WebKit Bugzilla URL _No response_ ### Radar URL _No response_ ### Description Web developers currently have no way to know when a programmatic [smooth-scroll](https://drafts.csswg.org/cssom-view/#concept-smooth-scroll) has completed. A solution to the problem that has already been resolved in the CSS WG: make the programmatic scroll methods return Promise objects that get resolved on scroll completion.
1 条评论