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

Function methodOp

tools/pythonauto/static/codemirrorepl/codemirror.js:1973–1980  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

1971 // Used to add methods to editor and doc instances, wrapping them in
1972 // operations.
1973 function methodOp(f) {
1974 return function() {
1975 if (this.curOp) return f.apply(this, arguments);
1976 startOperation(this);
1977 try { return f.apply(this, arguments); }
1978 finally { endOperation(this); }
1979 };
1980 }
1981 function docMethodOp(f) {
1982 return function() {
1983 var cm = this.cm;

Callers 1

codemirror.jsFile · 0.85

Calls 2

startOperationFunction · 0.70
endOperationFunction · 0.70

Tested by

no test coverage detected