MCPcopy
hub / github.com/ajaxorg/ace / setOption

Method setOption

src/ext/options.js:404–418  ·  view source on GitHub ↗

* @param {string | number | Object} option * @param {string | number | boolean} value

(option, value)

Source from the content-addressed store, hash-verified

402 * @param {string | number | boolean} value
403 */
404 setOption(option, value) {
405 if (typeof option == "string")
406 option = this.options[option];
407 if (value == "false") value = false;
408 if (value == "true") value = true;
409 if (value == "null") value = null;
410 if (value == "undefined") value = undefined;
411 if (typeof value == "string" && parseFloat(value).toString() == value)
412 value = parseFloat(value);
413 if (option.onchange)
414 option.onchange(value);
415 else if (option.path)
416 this.editor.setOption(option.path, value);
417 this._signal("setOption", {name: option.path, value: value});
418 }
419
420 getOption(option) {
421 if (option.getValue)

Callers 15

config_test.jsFile · 0.80
setFontSizeMethod · 0.80
setScrollSpeedMethod · 0.80
setDragDelayMethod · 0.80
setSelectionStyleMethod · 0.80
setReadOnlyMethod · 0.80
setBehavioursEnabledMethod · 0.80
setShowFoldWidgetsMethod · 0.80

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected