UNPKG

316 BJavaScriptView Raw
1/* @flow */
2
3import { warn } from 'core/util/index'
4
5export default function on (el: ASTElement, dir: ASTDirective) {
6 if (process.env.NODE_ENV !== 'production' && dir.modifiers) {
7 warn(`v-on without argument does not support modifiers.`)
8 }
9 el.wrapListeners = (code: string) => `_g(${code},${dir.value})`
10}