src/vs/workbench/contrib/notebook/browser/view/renderers/cellOutput.ts/CellOutputElement/detach
class CellOutputElement:	detach() {
		if (this.renderedOutputContainer) {
			this.renderedOutputContainer.parentElement?.removeChild(this.renderedOutputContainer);
		}

		let count = 0;
		if (this.innerContainer) {
			for (let i = 0; i < this.innerContainer.childNodes.length; i++) {
				if ((this.innerContainer.childNodes[i] as HTMLElement).className === 'rendered-output') {
					count++;
				}

				if (count > 1) {
					break;
				}
			}

			if (count === 0) {
				this.innerContainer.parentElement?.removeChild(this.innerContainer);
			}
		}

		this.notebookEditor.removeInset(this.output);

		if (this.renderResult && this.renderResult.type === RenderOutputType.Mainframe) {
			this.renderResult.disposable?.dispose();
		}
	}