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

Function docOperation

static/js/codemirror/codemirror.js:1296–1304  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

1294 };
1295 }
1296 function docOperation(f) {
1297 return function() {
1298 var withOp = this.cm && !this.cm.curOp, result;
1299 if (withOp) startOperation(this.cm);
1300 try { result = f.apply(this, arguments); }
1301 finally { if (withOp) endOperation(this.cm); }
1302 return result;
1303 };
1304 }
1305 function runInOp(cm, f) {
1306 var withOp = !cm.curOp, result;
1307 if (withOp) startOperation(cm);

Callers 1

codemirror.jsFile · 0.85

Calls 3

startOperationFunction · 0.85
endOperationFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected