mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 14:01:38 +01:00
Use viewType instead of uri for webviews
As discussed in #45994, move from using a uri to using a viewType. The view type is shared among all webviews of a given type, such as all markdown previews Fixes #44575
This commit is contained in:
@@ -46,8 +46,15 @@ export class MainThreadWebviews implements MainThreadWebviewsShape {
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
}
|
||||
|
||||
$createWebview(handle: WebviewHandle, uri: URI, title: string, column: Position, options: vscode.WebviewOptions, extensionFolderPath: string): void {
|
||||
const webviewInput = new WebviewInput(URI.revive(uri), title, options, '', {
|
||||
$createWebview(
|
||||
handle: WebviewHandle,
|
||||
viewType: string,
|
||||
title: string,
|
||||
column: Position,
|
||||
options: vscode.WebviewOptions,
|
||||
extensionFolderPath: string
|
||||
): void {
|
||||
const webviewInput = new WebviewInput(URI.parse('webview://' + handle), title, options, '', {
|
||||
onMessage: message => this._proxy.$onMessage(handle, message),
|
||||
onDidChangePosition: position => this._proxy.$onDidChangePosition(handle, position),
|
||||
onDispose: () => {
|
||||
|
||||
Reference in New Issue
Block a user