Datalayer VS Code Extension - v0.0.4
    Preparing search index...

    Interface NotebookDocumentDelegate

    Delegate interface that provides document persistence and webview access capabilities.

    Implements the delegate pattern to allow the document model to interact with the webview for content retrieval and panel management without tight coupling.

    const delegate: NotebookDocumentDelegate = {
    async getFileData() {
    // Retrieve current notebook content from webview
    const notebook = await webview.getNotebookContent();
    return new TextEncoder().encode(JSON.stringify(notebook));
    },
    getWebviewPanel() {
    return currentWebviewPanel;
    }
    };
    interface NotebookDocumentDelegate {
        getWebviewPanel?: () => WebviewPanel;
        getFileData(): Promise<Uint8Array<ArrayBufferLike>>;
    }
    Index

    Properties

    Methods

    Properties

    getWebviewPanel?: () => WebviewPanel

    Optional method to access the associated webview panel. Used for webview lifecycle management and communication.

    Type Declaration

      • (): WebviewPanel
      • Returns WebviewPanel

        The webview panel instance or undefined if not available

    Methods

    • Retrieves current notebook content from the webview in binary format. Used during save operations to get the latest notebook state.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      Binary representation of the current notebook content