-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Mechanism for bubbling all events #4599
Conversation
Rebased off master. @Conduitry Any chance this can be looked at soon? I don't believe there's anything controversial about this one. |
This comment has been minimized.
This comment has been minimized.
This is conflicting now with the work from #4860. I briefly tried to resolve it but was unable to. |
92f1b48
to
3d6b990
Compare
@Conduitry Should be good now |
I've rebased this again on the current master so it should cleanly merge now. |
Is this feature still being considered for inclusion? |
This PR looks like it needs only a tiny bit more attention to get merged. |
This comment has been minimized.
This comment has been minimized.
I hope this will be merged soon <3 |
Some thoughts from the other maintainers: Having a dedicated |
Id be an advocate of providing the bindings as Would: |
The merge-conflicts are really small, I also made a fork and fixed them, but would be silly to do a new PR for this, as it is @RedHatter's work. |
Here is an RFC that I wrote which proposes another possible solution: sveltejs/rfcs#60 |
Seems like @RedHatter has not been active on GitHub for a while |
It needs more work. It breaks a lot of the tests but in actual use, Ive not found a single problem using it. Maybe in SSR it presents problems. Ive since done some updates to it so once Ive revisited this (Im using this in a production system) Ill push these changes and see if I can get it to pass the tests. |
Looks like that issue was closed. Is this PR still relevant? |
Closing as outdated - Svelte 5 event attributes will solve this |
This PR enables the use of the
on:*
directive to bubble all events to the parent. See #2837. I removed the bubble utility function and instead theComponent.$on
function delegates toFragment.b
which connects the appropriate listeners directly or does so after the component mounts. This has an advantage over the previous approach as it doesn't require adding an event listener to the element when no bubbled events are listened to.