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

Function widgetOperation

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

Source from the content-addressed store, hash-verified

3772 this.node = node;
3773 };
3774 function widgetOperation(f) {
3775 return function() {
3776 var withOp = !this.cm.curOp;
3777 if (withOp) startOperation(this.cm);
3778 try {var result = f.apply(this, arguments);}
3779 finally {if (withOp) endOperation(this.cm);}
3780 return result;
3781 };
3782 }
3783 LineWidget.prototype.clear = widgetOperation(function() {
3784 var ws = this.line.widgets, no = lineNo(this.line);
3785 if (no == null || !ws) return;

Callers 1

codemirror.jsFile · 0.85

Calls 3

startOperationFunction · 0.85
endOperationFunction · 0.85
applyMethod · 0.45

Tested by

no test coverage detected