MCPcopy
hub / github.com/xaboy/form-create / emitEvent

Function emitEvent

packages/core/src/handler/lifecycle.js:26–33  ·  view source on GitHub ↗
(name, ...args)

Source from the content-addressed store, hash-verified

24 this.emitEvent(name, this.api);
25 },
26 emitEvent(name, ...args) {
27 const _fn = this.options[name] || this.options[toCase('on-' + name)];
28 if (_fn) {
29 const fn = parseFn(_fn);
30 is.Function(fn) && invoke(() => fn(...args));
31 }
32 this.bus.$emit(name, ...args);
33 },
34 targetHook(ctx, name, args) {
35 let hook = ctx.prop?.hook?.[name];
36

Callers

nothing calls this directly

Calls 4

parseFnFunction · 0.90
invokeFunction · 0.90
toCaseFunction · 0.85
fnFunction · 0.70

Tested by

no test coverage detected