Skip to content

Custom events with underscores do not work, right? #3023

Answered by sshd911
pohlt asked this question in 1. Help
Discussion options

You must be logged in to vote

You cannot add event handler in HTML with underscores _ as it will not compile.
However, you can do it through JS of parent component:
If you want to handle an event in HTML of parent, you should directly add prefix in attribute on event.

I would recommend not to create event-types with underscores as it may not even be supported from javascript in future releases

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@pohlt
Comment options

@SimoTod
Comment options

@gbaggaley
Comment options

@ekwoka
Comment options

Answer selected by pohlt
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants