MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / off

Function off

static/js/codemirror/codemirror.js:4860–4871  ·  view source on GitHub ↗
(emitter, type, f)

Source from the content-addressed store, hash-verified

4858 }
4859
4860 function off(emitter, type, f) {
4861 if (emitter.removeEventListener)
4862 emitter.removeEventListener(type, f, false);
4863 else if (emitter.detachEvent)
4864 emitter.detachEvent("on" + type, f);
4865 else {
4866 var arr = emitter._handlers && emitter._handlers[type];
4867 if (!arr) return;
4868 for (var i = 0; i < arr.length; ++i)
4869 if (arr[i] == f) { arr.splice(i, 1); break; }
4870 }
4871 }
4872
4873 function signal(emitter, type /*, values...*/) {
4874 var arr = emitter._handlers && emitter._handlers[type];

Callers 5

unregisterFunction · 0.85
onMouseDownFunction · 0.85
doneFunction · 0.85
mouseupFunction · 0.85
codemirror.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected