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

Method destroy

src/editors/array.js:269–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

267 }
268
269 destroy () {
270 this.empty(true)
271 if (this.checkParent(this.title)) this.title.parentNode.removeChild(this.title)
272 if (this.checkParent(this.description)) this.description.parentNode.removeChild(this.description)
273 if (this.checkParent(this.row_holder)) this.row_holder.parentNode.removeChild(this.row_holder)
274 if (this.checkParent(this.controls)) this.controls.parentNode.removeChild(this.controls)
275 if (this.checkParent(this.panel)) this.panel.parentNode.removeChild(this.panel)
276
277 this.rows = this.row_cache = this.title = this.description = this.row_holder = this.panel = this.controls = null
278
279 super.destroy()
280 }
281
282 empty (hard) {
283 if (this.rows === null) return

Callers 1

destroyRowMethod · 0.45

Calls 2

emptyMethod · 0.95
checkParentMethod · 0.95

Tested by

no test coverage detected