MCPcopy
hub / github.com/witheve/Eve / signalLater

Function signalLater

src/codemirror.js:8223–8238  ·  view source on GitHub ↗
(emitter, type /*, values...*/)

Source from the content-addressed store, hash-verified

8221 // them to be executed when the last operation ends, or, if no
8222 // operation is active, when a timeout fires.
8223 function signalLater(emitter, type /*, values...*/) {
8224 var arr = getHandlers(emitter, type, false)
8225 if (!arr.length) return;
8226 var args = Array.prototype.slice.call(arguments, 2), list;
8227 if (operationGroup) {
8228 list = operationGroup.delayedCallbacks;
8229 } else if (orphanDelayedCallbacks) {
8230 list = orphanDelayedCallbacks;
8231 } else {
8232 list = orphanDelayedCallbacks = [];
8233 setTimeout(fireOrphanDelayed, 0);
8234 }
8235 function bnd(f) {return function(){f.apply(null, args);};};
8236 for (var i = 0; i < arr.length; ++i)
8237 list.push(bnd(arr[i]));
8238 }
8239
8240 function fireOrphanDelayed() {
8241 var delayed = orphanDelayedCallbacks;

Callers 10

insertLineWidgetsForFunction · 0.85
applyTextInputFunction · 0.85
triggerElectricFunction · 0.85
setSelectionInnerFunction · 0.85
dispatchKeyFunction · 0.85
codemirror.jsFile · 0.85
markTextFunction · 0.85
updateFunction · 0.85
updateDocFunction · 0.85

Calls 2

getHandlersFunction · 0.85
bndFunction · 0.85

Tested by

no test coverage detected