MCPcopy
hub / github.com/csev/py4e / signalLater

Function signalLater

tools/pythonauto/static/codemirror/codemirror.js:5533–5545  ·  view source on GitHub ↗
(emitter, type /*, values...*/)

Source from the content-addressed store, hash-verified

5531
5532 var delayedCallbacks, delayedCallbackDepth = 0;
5533 function signalLater(emitter, type /*, values...*/) {
5534 var arr = emitter._handlers && emitter._handlers[type];
5535 if (!arr) return;
5536 var args = Array.prototype.slice.call(arguments, 2);
5537 if (!delayedCallbacks) {
5538 ++delayedCallbackDepth;
5539 delayedCallbacks = [];
5540 setTimeout(fireDelayed, 0);
5541 }
5542 function bnd(f) {return function(){f.apply(null, args);};};
5543 for (var i = 0; i < arr.length; ++i)
5544 delayedCallbacks.push(bnd(arr[i]));
5545 }
5546
5547 function signalDOMEvent(cm, e, override) {
5548 signal(cm, override || e.type, cm, e);

Callers 9

updateDisplayFunction · 0.70
buildLineElementFunction · 0.70
readInputFunction · 0.70
handleKeyBindingFunction · 0.70
handleCharBindingFunction · 0.70
setSelectionFunction · 0.70
codemirror.jsFile · 0.70
updateFunction · 0.70
updateDocFunction · 0.70

Calls 1

bndFunction · 0.70

Tested by

no test coverage detected