-
-
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
Listening to event names containing a ':' #1273
Comments
From the repl above: <Nested on:event1=event1(event) on:event2:1=event21(event)/> results in the output: nested.on("event1", function(event) {
component.event1(event);
});
nested.on("event2", function(event) {
component.event21(event);
}); |
shouldn't this be a syntax error? |
If we're going to do something like #1088, we're going to need some sort of rules about what characters can be in event names. |
Could we allow a way to support literals in event names? Something like: <Nested on:"event2:1"=event21(event)></Nested> |
This seemed to be fixed on the latest svelte (3.12.1), repl |
Indeed! @tanhauhau Thank you for checking. Hopefully there's an automated test for this. |
It seems like the compiler strips the part of the event name from ':' onward.
https://svelte.technology/repl?version=1.58.0&gist=db70c440f307ed3de63da1de70da14cb
The text was updated successfully, but these errors were encountered: