Subscribe on changes!

Event names for Custom Elements should be automatically transformed

avatar
Feb 8th 2022

Version

3.2.30

Reproduction link

stackblitz.com

Steps to reproduce

Click the button to fire the custom event on the custom element

What is expected?

The myTemplateEventListener method should be called

What is actually happening?

The myTemplateEventListener method is not called


I would expect the event to be automatically transformed to kebab-case to follow the documentation: https://vuejs.org/guide/components/events.html#emitting-and-listening-to-events

Like components and props, event names provide an automatic case transformation. Notice we emitted a camelCase event, but can listen for it using a kebab-cased listener in the parent. As with props casing, we recommend using kebab-cased event listeners in templates.