MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / off

Function off

lib/web/CodeMirror/src/util/event.js:26–39  ·  view source on GitHub ↗
(emitter, type, f)

Source from the content-addressed store, hash-verified

24}
25
26export function off(emitter, type, f) {
27 if (emitter.removeEventListener) {
28 emitter.removeEventListener(type, f, false)
29 } else if (emitter.detachEvent) {
30 emitter.detachEvent("on" + type, f)
31 } else {
32 let map = emitter._handlers, arr = map && map[type]
33 if (arr) {
34 let index = indexOf(arr, f)
35 if (index > -1)
36 map[type] = arr.slice(0, index).concat(arr.slice(index + 1))
37 }
38 }
39}
40
41export function signal(emitter, type /*, values...*/) {
42 let handlers = getHandlers(emitter, type)

Callers 6

mouseupMethod · 0.90
leftButtonStartDragFunction · 0.90
doneFunction · 0.90
upFunction · 0.90
fromTextAreaFunction · 0.90
eventMixinFunction · 0.70

Calls 1

indexOfFunction · 0.90

Tested by

no test coverage detected