MCPcopy Index your code
hub / github.com/DHTMLX/gantt / signalLater

Function signalLater

samples/common/codehighlight/codemirror.js:2063–2081  ·  view source on GitHub ↗
(emitter, type /*, values...*/)

Source from the content-addressed store, hash-verified

2061 // them to be executed when the last operation ends, or, if no
2062 // operation is active, when a timeout fires.
2063 function signalLater(emitter, type /*, values...*/) {
2064 var arr = getHandlers(emitter, type);
2065 if (!arr.length) { return }
2066 var args = Array.prototype.slice.call(arguments, 2), list;
2067 if (operationGroup) {
2068 list = operationGroup.delayedCallbacks;
2069 } else if (orphanDelayedCallbacks) {
2070 list = orphanDelayedCallbacks;
2071 } else {
2072 list = orphanDelayedCallbacks = [];
2073 setTimeout(fireOrphanDelayed, 0);
2074 }
2075 var loop = function ( i ) {
2076 list.push(function () { return arr[i].apply(null, args); });
2077 };
2078
2079 for (var i = 0; i < arr.length; ++i)
2080 loop( i );
2081 }
2082
2083 function fireOrphanDelayed() {
2084 var delayed = orphanDelayedCallbacks;

Callers 13

insertLineWidgetsForFunction · 0.85
updateGutterSpaceFunction · 0.85
updateFunction · 0.85
updateDocFunction · 0.85
setSelectionInnerFunction · 0.85
codemirror.jsFile · 0.85
addLineWidgetFunction · 0.85
markTextFunction · 0.85
dispatchKeyInnerFunction · 0.85
applyTextInputFunction · 0.85
triggerElectricFunction · 0.85

Calls 2

getHandlersFunction · 0.85
loopFunction · 0.85

Tested by

no test coverage detected