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

Function cb

lib/web/CodeMirror/test/vim_test.js:4502–4518  ·  view source on GitHub ↗
(val, cm, cfg)

Source from the content-addressed store, hash-verified

4500 var global;
4501
4502 function cb(val, cm, cfg) {
4503 if (val === undefined) {
4504 // Getter
4505 if (cm) {
4506 return cm._local;
4507 } else {
4508 return global;
4509 }
4510 } else {
4511 // Setter
4512 if (cm) {
4513 cm._local = val;
4514 } else {
4515 global = val;
4516 }
4517 }
4518 }
4519
4520 CodeMirror.Vim.defineOption('testopt', 'a', 'string', cb);
4521 // Test default value is set.

Callers 2

notifyFunction · 0.85
emacs_test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected