@kkdev92/vscode-ext-kit - v4.1.1
    Preparing search index...

    Interface WebviewPanelSurface

    A webview in its own editor tab.

    interface WebviewPanelSurface {
        cspSource: string;
        asWebviewUri(extensionRelativePath: string): string;
        dispose(): void;
        onDidChangeVisibility(
            listener: (visible: boolean) => void,
        ): PlatformRegistration;
        onDidDispose(listener: () => void): PlatformRegistration;
        onDidReceiveMessage(
            listener: (message: unknown) => void,
        ): PlatformRegistration;
        postMessage(message: unknown): Promise<boolean>;
        reveal(column?: number): void;
        setHtml(html: string): void;
    }

    Hierarchy

    • WebviewSurface
      • WebviewPanelSurface
    Index
    cspSource: string

    The source a content security policy has to allow for this webview.

    • Rewrites a path inside the extension into a uri the content may load.

      Takes a path rather than a uri so nothing above the port has to construct one — building a uri is exactly the sort of thing only the platform can do correctly for remote and virtual file systems.

      Parameters

      • extensionRelativePath: string

      Returns string

    • Sends a raw message to the content.

      Parameters

      • message: unknown

      Returns Promise<boolean>

    • Brings the panel to the front, optionally in a specific column.

      Parameters

      • Optionalcolumn: number

      Returns void