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

Method onDocumentAdd

packages/core/src/project/project.ts:300–306  ·  view source on GitHub ↗
(listener: (document: Document) => void)

Source from the content-addressed store, hash-verified

298 }
299
300 onDocumentAdd(listener: (document: Document) => void) {
301 const dispose = this.designer.onEvent(DOCUMENT_EVENT.ADD, listener)
302
303 return () => {
304 dispose()
305 }
306 }
307
308 onDocumentRemove(listener: (id: string) => void) {
309 const dispose = this.designer.onEvent(DOCUMENT_EVENT.REMOVE, listener)

Callers

nothing calls this directly

Calls 1

onEventMethod · 0.80

Tested by

no test coverage detected