MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / remove

Method remove

packages/core/src/document/node/node.ts:540–548  ·  view source on GitHub ↗
(purge = true, useMutator = true)

Source from the content-addressed store, hash-verified

538
539 @action
540 remove(purge = true, useMutator = true) {
541 if (this.parent) {
542 this.document.designer.postEvent(DESIGNER_EVENT.NODE_REMOVE, {
543 node: this,
544 index: this.index,
545 })
546 this.parent.children?.internalDelete(this, purge, useMutator)
547 }
548 }
549
550 removeChild(node: Node) {
551 this.children?.delete(node)

Callers 1

replaceChildMethod · 0.45

Calls 2

internalDeleteMethod · 0.80
postEventMethod · 0.45

Tested by

no test coverage detected