mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
Use extension location instead of remote for asWebviewUri
This commit is contained in:
@@ -12,6 +12,7 @@ import type * as vscode from 'vscode';
|
||||
import { ExtHostEditorInsetsShape, MainThreadEditorInsetsShape } from './extHost.protocol';
|
||||
import { asWebviewUri, webviewGenericCspSource, WebviewInitData } from 'vs/workbench/api/common/shared/webview';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
|
||||
export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
|
||||
|
||||
@@ -66,7 +67,10 @@ export class ExtHostEditorInsets implements ExtHostEditorInsetsShape {
|
||||
private _options: vscode.WebviewOptions = Object.create(null);
|
||||
|
||||
asWebviewUri(resource: vscode.Uri): vscode.Uri {
|
||||
return asWebviewUri(this._uuid, resource, that._initData.remote.authority);
|
||||
const remoteAuthority = extension.extensionLocation.scheme === Schemas.vscodeRemote
|
||||
? that._initData.remote.authority
|
||||
: undefined;
|
||||
return asWebviewUri(this._uuid, resource, remoteAuthority);
|
||||
}
|
||||
|
||||
get cspSource(): string {
|
||||
|
||||
Reference in New Issue
Block a user