MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / methodOp

Function methodOp

lib/web/CodeMirror/src/display/operations.js:189–196  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

187// Used to add methods to editor and doc instances, wrapping them in
188// operations.
189export function methodOp(f) {
190 return function() {
191 if (this.curOp) return f.apply(this, arguments)
192 startOperation(this)
193 try { return f.apply(this, arguments) }
194 finally { endOperation(this) }
195 }
196}
197export function docMethodOp(f) {
198 return function() {
199 let cm = this.cm

Callers 1

methods.jsFile · 0.90

Calls 3

startOperationFunction · 0.70
endOperationFunction · 0.70
applyMethod · 0.65

Tested by

no test coverage detected