Skip to content

Add support for onscrollsnapchanging and onscrollsnapchange events #16082

@korywka

Description

@korywka

Describe the problem

https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollsnapchange_event
https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollsnapchanging_event

Describe the proposed solution

Add to types:

export interface DOMAttributes<T extends EventTarget> {

Importance

nice to have

Activity

Conduitry

Conduitry commented on Jun 4, 2025

@Conduitry
Member

I don't know whether we have an official stance on this, but adding types for an experimental feature that's only available in one of the three big browser engines feels iffy to me.

korywka

korywka commented on Jun 4, 2025

@korywka
Author

Can this issue remain open while we wait for Firefox or Safari support? I believe the wait won't be too long.

dummdidumm

dummdidumm commented on Jun 4, 2025

@dummdidumm
Member

We have not added experimental types in the past and we should keep it that way. If you want to you can extend the types yourself as explained here https://svelte.dev/docs/svelte/typescript#Enhancing-built-in-DOM-types

Keeping this open so we can revisit once it's stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @korywka@dummdidumm@Conduitry

        Issue actions

          Add support for `onscrollsnapchanging` and `onscrollsnapchange` events · Issue #16082 · sveltejs/svelte