MCPcopy
hub / github.com/antonmedv/codejar / on

Function on

codejar.ts:102–105  ·  view source on GitHub ↗
(type: K, fn: (event: HTMLElementEventMap[K]) => void)

Source from the content-addressed store, hash-verified

100 }, 300)
101
102 const on = <K extends keyof HTMLElementEventMap>(type: K, fn: (event: HTMLElementEventMap[K]) => void) => {
103 listeners.push([type, fn])
104 editor.addEventListener(type, fn)
105 }
106
107 on('keydown', event => {
108 if (event.defaultPrevented) return

Callers 1

CodeJarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected