A ✨first look✨ at `snapChanged` in Chrome Canary

```js
document.addEventListener('snapchanged', e => {
console.log('changed', e.snapTargets)
})
```

get notified when a snap scroller has changed the snap item, and access the node with `event.snapTargets` 🤓

Snap 2 CSS spec draft https://drafts.csswg.org/css-scroll-snap-2/#snap-events

CSS Scroll Snap Module Level 2

@argyleink Any word on the ability to configure snap curves/stop-points/strength/springback? Or the ability to use mouse for drag in scroll snap regions?

@slightlyoff Flacker has ideas for snap inertia's but not for mouse drag. i personally find mouse flinging coarse and clumsy, but it is a common feature of sliders or carousels, so could/should eventually make it's way in. maybe that'd be a good touch-action value?

also, hi Alex, hope you're well 🙂

@argyleink Yeah, it's bewildering that we don't have a touch-action value for it yet; forced folks to do a lot of extra work.

On snap spring/values, why isn't any of this hooked up to animation worklets yet? Every year I lose more hope.

@slightlyoff @argyleink

This is my current thinking on what the best way to handle the mouse panning use case is - https://github.com/w3c/pointerevents/issues/203#issuecomment-819693123

Enable direct pen and touch to have different touch-action behavior · Issue #203 · w3c/pointerevents

Today a stylus in Chrome Android behaves as a direct manipulation input device (with the implications on touch-action discussed in #202). This works well in practice except for one special case: In...

GitHub