MCPcopy
hub / github.com/nhn/tui.chart / on

Method on

apps/chart/src/eventEmitter.ts:24–29  ·  view source on GitHub ↗
(type: EventType, handler: EventListener)

Source from the content-addressed store, hash-verified

22 handlers: EventListener[] = [];
23
24 on(type: EventType, handler: EventListener) {
25 if (!this.handlers[type]) {
26 this.handlers[type] = [];
27 }
28 this.handlers[type].push(handler);
29 }
30
31 emit(type: EventType, ...args) {
32 this.handlers[type]?.forEach((handler) => handler(...args));

Callers 15

renderMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45
initializeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected