mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Add vscode.env.webviewResourceRoot api
Fixes #72155 Adds a constant to the api that tracks the root path for resources inside of webviews. This is required because we will not be able to use `vscode-resource:` uris on the web. Our current approach is to rewrite the html we are given but there are almost certainly going to be cases where we don't get this quite right. Adopts the new api for the markdown preview
This commit is contained in:
@@ -251,7 +251,7 @@ suite('Webview tests', () => {
|
||||
});
|
||||
</script>`);
|
||||
|
||||
const workspaceRootUri = vscode.Uri.file(vscode.workspace.rootPath!).with({ scheme: 'vscode-resource' });
|
||||
const workspaceRootUri = vscode.env.webviewResourceRoot + vscode.Uri.file(vscode.workspace.rootPath!).path;
|
||||
|
||||
{
|
||||
const imagePath = workspaceRootUri.toString() + '/image.png';
|
||||
|
||||
Reference in New Issue
Block a user