UNPKG

@lastboy/vue2

Version:

Fork of Vue 2.7.16 with patched CVE-2024-9506 (regex ReDoS vulnerability)

10 lines (8 loc) 330 B
import { warn } from 'core/util/index' import { ASTDirective, ASTElement } from 'types/compiler' export default function on(el: ASTElement, dir: ASTDirective) { if (__DEV__ && dir.modifiers) { warn(`v-on without argument does not support modifiers.`) } el.wrapListeners = (code: string) => `_g(${code},${dir.value})` }