Question - What are the different event modifiers Vue.js provides?
Answer -
Normally, JavaScript provides event.preventDefault() or event.stopPropagation() inside event handlers. We can use Vue.js methods, but these methods are meant for data logic instead of dealing with DOM events.
Vue.js provides the following event modifiers for v-on and these modifiers are directive postfixes denoted by a dot symbol.
- .stop
- .prevent
- .capture
- .self
- .once
- .passive
See the following example of stop modifier:
Example of chain modifiers as follows: