-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Svelte 5: The on
of svelte/events
is restricted to use with Element
only
#12045
Labels
Milestone
Comments
on
of svelte/events is restricted to use with Element onlyon
of svelte/events
is restricted to use with Element
only
@dummdidumm It still doesn't work. I have the following code that I am trying to rewrite using
It goes like this:
![]() |
https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/internal/client/dom/elements/events.js#L69-L102 - the issue seems to be in the description of the |
@dummdidumm Maybe I should create a separate issue? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the problem
Let's say I want to create a handler with
matchMedia
:The
Element
type of theon
function will prevent me from using something likeDescribe the proposed solution
If this is a deliberate limitation, it's worth mentioning it in the documentation.
Otherwise, it should be possible to use
on
with objects other thanElement
.Importance
nice to have
The text was updated successfully, but these errors were encountered: