MCPcopy Create free account
hub / github.com/TruthHun/BookStack / operation

Function operation

static/editor.md/lib/codemirror/lib/codemirror.js:3071–3078  ·  view source on GitHub ↗
(cm, f)

Source from the content-addressed store, hash-verified

3069 }
3070 // Wraps a function in an operation. Returns the wrapped function.
3071 function operation(cm, f) {
3072 return function() {
3073 if (cm.curOp) return f.apply(cm, arguments);
3074 startOperation(cm);
3075 try { return f.apply(cm, arguments); }
3076 finally { endOperation(cm); }
3077 };
3078 }
3079 // Used to add methods to editor and doc instances, wrapping them in
3080 // operations.
3081 function methodOp(f) {

Callers 11

barMouseDownFunction · 0.70
codemirror.jsFile · 0.70
pollFunction · 0.70
registerEventHandlersFunction · 0.70
leftButtonStartDragFunction · 0.70
extendFunction · 0.70
leftButtonSelectFunction · 0.70
loadFileFunction · 0.70
makeChangeFunction · 0.70
makeChangeSingleDocFunction · 0.70
markTextFunction · 0.70

Calls 2

startOperationFunction · 0.70
endOperationFunction · 0.70

Tested by

no test coverage detected