(eventData)
| 235 | } |
| 236 | |
| 237 | onChange (eventData) { |
| 238 | if (!this.ready) return |
| 239 | |
| 240 | if (eventData) { |
| 241 | this.trigger(eventData.event, eventData.data) |
| 242 | } |
| 243 | |
| 244 | if (this.firing_change) return |
| 245 | this.firing_change = true |
| 246 | |
| 247 | window.requestAnimationFrame(() => { |
| 248 | this.firing_change = false |
| 249 | if (!this.ready) return |
| 250 | |
| 251 | /* Validate and cache results */ |
| 252 | this.validation_results = this.validator.validate(this.root.getValue()) |
| 253 | |
| 254 | if (this.options.show_errors !== 'never') { |
| 255 | this.root.showValidationErrors(this.validation_results) |
| 256 | } else { |
| 257 | this.root.showValidationErrors([]) |
| 258 | } |
| 259 | |
| 260 | /* Fire change event */ |
| 261 | this.trigger('change') |
| 262 | }) |
| 263 | |
| 264 | return this |
| 265 | } |
| 266 | |
| 267 | compileTemplate (template, name = JSONEditor.defaults.template) { |
| 268 | let engine |
no test coverage detected