src/vs/workbench/api/browser/mainThreadWebviewPanels.ts/MainThreadWebviewPanels/$createWebviewPanel
class MainThreadWebviewPanels:	public $createWebviewPanel(
		extensionData: extHostProtocol.WebviewExtensionDescription,
		handle: extHostProtocol.WebviewHandle,
		viewType: string,
		initData: extHostProtocol.IWebviewInitData,
		showOptions: extHostProtocol.WebviewPanelShowOptions,
	): void {
		const targetGroup = this.getTargetGroupFromShowOptions(showOptions);
		const mainThreadShowOptions: ICreateWebViewShowOptions = showOptions ? {
			preserveFocus: !!showOptions.preserveFocus,
			group: targetGroup
		} : {};

		const extension = reviveWebviewExtension(extensionData);

		const webview = this._webviewWorkbenchService.createWebview({
			id: handle,
			options: reviveWebviewOptions(initData.panelOptions),
			contentOptions: reviveWebviewContentOptions(initData.webviewOptions),
			extension
		}, this.webviewPanelViewType.fromExternal(viewType), initData.title, mainThreadShowOptions);

		this.addWebviewInput(handle, webview, { serializeBuffersForPostMessage: initData.serializeBuffersForPostMessage });

		const payload = {
			extensionId: extension.id.value,
			viewType
		} as const;

		type Classification = {
			extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the extension that created the webview panel' };
			viewType: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Id of the webview' };
			owner: 'mjbvz';
			comment: 'Triggered when a webview is created. Records the type of webview and the extension which created it';
		};

		this._telemetryService.publicLog2<typeof payload, Classification>('webviews:createWebviewPanel', payload);
	}