Move the webviewResourceRoot property to be set on each webview instead of as a global property

For #72155

This allows  us to potentially change the resource root per webview
This commit is contained in:
Matt Bierner
2019-06-24 15:42:14 -07:00
parent 1083123758
commit 8119b4aee7
14 changed files with 57 additions and 38 deletions

View File

@@ -251,7 +251,7 @@ suite('Webview tests', () => {
});
</script>`);
const workspaceRootUri = vscode.env.webviewResourceRoot + vscode.Uri.file(vscode.workspace.rootPath!).path;
const workspaceRootUri = webview.webview.resourceRoot + vscode.Uri.file(vscode.workspace.rootPath!).path;
{
const imagePath = workspaceRootUri.toString() + '/image.png';