MCPcopy Create free account
hub / github.com/Comfy-Org/litegraph.js / onRemoved

Method onRemoved

src/subgraph/SubgraphNode.ts:371–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

369 }
370
371 override onRemoved(): void {
372 // Clean up all subgraph event listeners
373 this.#eventAbortController.abort()
374
375 // Clean up all promoted widgets
376 for (const widget of this.widgets) {
377 this.subgraph.events.dispatch("widget-demoted", { widget, subgraphNode: this })
378 }
379
380 for (const input of this.inputs) {
381 input._listenerController?.abort()
382 }
383 }
384}

Callers 5

clearMethod · 0.80
removeMethod · 0.80

Calls 1

dispatchMethod · 0.65

Tested by

no test coverage detected