← All notes

Vue listens to DOM events with v-on or the @ shortcut

Answer: Vue listens to DOM events with the v-on directive, usually shortened to @. The usage would be v-on:click="handler" or with the shortcut, @click="handler".

Handlers

An inline handler is JavaScript to run when the event fires. A method handler is a property name or path that points to a method on the component.

Runtime

patchEvent stores vue event invokers on the element. If nextValue and existingInvoker are set, patch the value on existingInvoker. If nextValue is set with no invoker, createInvoker is used. addEventListener forwards event, handler, and options to the element's addEventListener method.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vue.js docs, Event Handling, CC BY 4.0, text only (vuejs/docs); Vue.js core, runtime-dom events, MIT (vuejs/core). Notices: Vue.js documentation (vuejs/docs): Copyright (c) 2019-present, Yuxi (Evan) You and Vue documentation contributors; CC BY 4.0, text only (https://raw.githubusercontent.com/vuejs/docs/main/LICENSE). Vue.js core (vuejs/core): Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors; MIT (https://raw.githubusercontent.com/vuejs/core/main/LICENSE).

Cite this

Permanent ID: iil:note:m63357cs

iinventedlight. 2026. "Vue listens to DOM events with v-on or the @ shortcut." iinventedlight Library, iil:note:m63357cs, version of 2026-11-10. https://iinventedlight.com/library/notes/vue-event-handling/. License: CC-BY-4.0.

@misc{iil_note_m63357cs,
  author = {{iinventedlight}},
  title = {{Vue listens to DOM events with v-on or the @ shortcut}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-10},
  url = {https://iinventedlight.com/library/notes/vue-event-handling/},
  note = {Permanent ID iil:note:m63357cs. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vue-event-handling.md.