Interface NotebookRendererMessaging

Renderer messaging is used to communicate with a single renderer. It's returned from notebooks.createRendererMessaging.

interface NotebookRendererMessaging {
    onDidReceiveMessage: Event<{
        editor: NotebookEditor;
        message: any;
    }>;
    postMessage(message, editor?): Thenable<boolean>;
}

Properties

onDidReceiveMessage: Event<{
    editor: NotebookEditor;
    message: any;
}>

An event that fires when a message is received from a renderer.

Type declaration

Methods

  • Send a message to one or all renderer.

    Parameters

    • message: any

      Message to send

    • Optional editor: NotebookEditor

      Editor to target with the message. If not provided, the message is sent to all renderers.

    Returns Thenable<boolean>

    a boolean indicating whether the message was successfully delivered to any renderer.