CodeMirrorEditor.operation method
CodeMirrorEditor › operation
Unofficial
Run a function as one batch of work, so the editor only reacts to what it did once it finishes. Nesting is allowed — only the outermost call ends the batch.Signature:
operation(fn: () => T, force?: boolean | undefined): TParameters:
| Parameter | Type | Description |
|---|---|---|
| fn | () => T | The function to run. |
| force? | boolean | undefined | Whether to start a batch even when one is already in progress. |
Returns: T — Whatever the function returned.
Unofficial
Execute a function as a single operation, batching view updates.Signature:
operation(fn: () => T): TParameters:
| Parameter | Type | Description |
|---|---|---|
| fn | () => T | The function to execute. |
Returns: T — The return value of the function.