Scrolling APIs should return a promise |
||
Issue descriptionCSSWG agreed [1] to change all scrolling APIs (e.g., scrollTo, scrollIntoView, ...) to return a promise instead of void. The promise is resolved when the scrolling operations is deemed complete (finished, aborted). The promise will be resolved with an argument that has details about the final position and perhaps other important information. This is very useful to enable actions that need to occur after scripted scroll e.g., scroll the element into view (smoothly) and then do X. The exact details remain to be specified but once those are agreed upon we should consider implementing this. [1] https://github.com/w3c/csswg-drafts/issues/1562#issuecomment-389586317
,
Oct 17
,
Nov 2
FYI: I've written a proposal on how to solve this that should work for both scrolling APIs and tests: https://docs.google.com/document/d/1BX8V3ciUs8fV-x8dBI6rdz5_2dAmewgrUxIcWILXvGA/edit# |
||
►
Sign in to add a comment |
||
Comment 1 by bokan@chromium.org
, Aug 8