Re: [csswg-drafts] [cssom-view-1] Provide onAnimationEnd callback in scrollIntoView options (#3744)

Is there any chance of `element.scrollIntoView` and `window.scroll` returning a promise that resolves when the scroll animation has ended? Or is that going to break backwards compatibility?

Applied to `element.scrollIntoView`

```js
element.scrollIntoView({ behavior: 'smooth', block: 'start').then( scrollEvent => {
  console.log('The browser has finished scrolling')
})
```

Applied to `window.scroll`

```js
window.scroll({ top: 0, left: 0, behavior: 'smooth'}).then( scrollEvent => {
  console.log('The browser has finished scrolling')
})
```

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

Received on Thursday, 12 December 2019 02:28:04 UTC