MCPcopy Index your code
hub / github.com/json-editor/json-editor / setOption

Method setOption

src/core.js:200–210  ·  view source on GitHub ↗
(option, value)

Source from the content-addressed store, hash-verified

198 }
199
200 setOption (option, value) {
201 if (option === 'show_errors') {
202 this.options.show_errors = value
203 this.onChange()
204 } else {
205 /* Only the `show_errors` option is supported for now */
206 throw new Error(`Option ${option} must be set during instantiation and cannot be changed later`)
207 }
208
209 return this
210 }
211
212 getEditorsRules () {
213 const extendRule = (rules, editorClass) => editorClass.rules ? extend(rules, editorClass.rules) : rules

Callers

nothing calls this directly

Calls 1

onChangeMethod · 0.95

Tested by

no test coverage detected