src/vs/workbench/api/common/extHostWebviewPanels.ts/ExtHostWebviewPanels/createWebviewPanel
class ExtHostWebviewPanels:	public createWebviewPanel(
		extension: IExtensionDescription,
		viewType: string,
		title: string,
		showOptions: vscode.ViewColumn | { viewColumn: vscode.ViewColumn, preserveFocus?: boolean },
		options: (vscode.WebviewPanelOptions & vscode.WebviewOptions) = {},
	): vscode.WebviewPanel {
		const viewColumn = typeof showOptions === 'object' ? showOptions.viewColumn : showOptions;
		const webviewShowOptions = {
			viewColumn: typeConverters.ViewColumn.from(viewColumn),
			preserveFocus: typeof showOptions === 'object' && !!showOptions.preserveFocus
		};

		const serializeBuffersForPostMessage = shouldSerializeBuffersForPostMessage(extension);
		const handle = ExtHostWebviewPanels.newHandle();
		this._proxy.$createWebviewPanel(toExtensionData(extension), handle, viewType, {
			title,
			panelOptions: serializeWebviewPanelOptions(options),
			webviewOptions: serializeWebviewOptions(extension, this.workspace, options),
			serializeBuffersForPostMessage,
		}, webviewShowOptions);

		const webview = this.webviews.createNewWebview(handle, options, extension);
		const panel = this.createNewWebviewPanel(handle, viewType, title, viewColumn, options, webview);

		return panel;
	}