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

Method onNodeAdd

packages/core/src/document/document.ts:427–433  ·  view source on GitHub ↗
(listener: (node: Node) => void)

Source from the content-addressed store, hash-verified

425 }
426
427 onNodeAdd(listener: (node: Node) => void) {
428 const dispose = this.designer.onEvent(NODE_EVENT.ADD, listener)
429
430 return () => {
431 dispose()
432 }
433 }
434
435 onNodeRemove(listener: (id: string) => void) {
436 const dispose = this.designer.onEvent(NODE_EVENT.REMOVE, listener)

Callers

nothing calls this directly

Calls 1

onEventMethod · 0.80

Tested by

no test coverage detected