Skip to content

View.close method

View › close

Closes the view, as WorkspaceLeaf.open does when another view replaces this one. Detaches the view's element, unloads the component and awaits View.onClose, exactly as Obsidian does.

Signature:

close(): Promise<void>

Returns: Promise<void>