Scroll snap events

Experimental Reference ↗

scrollsnapchanging reports the pending snap target; scrollsnapchange fires after a new target is selected. They remove much of the guesswork from synchronizing UI with a snap container.

scroller.addEventListener('scrollsnapchange', (event) => {
  event.snapTargetInline?.classList.add('selected');
});  

These events are not Baseline yet. Treat them as an enhancement and keep scrolling and content usable when they never fire.