NotebookDocumentWillSaveEvent

An event that is fired when a notebook document will be saved.

To make modifications to the document before it is being saved, call the {@linkcode NotebookDocumentWillSaveEvent.waitUntil waitUntil}-function with a thenable that resolves to a workspace edit.

Online Documentation

Properties

Link copied to clipboard

The notebook document that will be saved.

Link copied to clipboard

The reason why save was triggered.

Link copied to clipboard
abstract val token: CancellationToken

A cancellation token.

Functions

Link copied to clipboard
abstract fun waitUntil(thenable: PromiseLike<JsAny?>)

Allows to pause the event loop until the provided thenable resolved.

abstract fun waitUntil(thenable: PromiseLike<WorkspaceEdit>)

Allows to pause the event loop and to apply workspace edit. Edits of subsequent calls to this function will be applied in order. The edits will be ignored if concurrent modifications of the notebook document happened.