Merge from vscode 6e530127a1bb8ffbd1bfb77dc680c321dc0d71f5 (#6844)

This commit is contained in:
Anthony Dresser
2019-08-20 21:07:47 -07:00
committed by GitHub
parent 1f00249646
commit ecb80f14f0
221 changed files with 3140 additions and 1552 deletions

24
src/vs/vscode.d.ts vendored
View File

@@ -5923,6 +5923,30 @@ declare module 'vscode' {
* @param message Body of the message.
*/
postMessage(message: any): Thenable<boolean>;
/**
* Convert a uri for the local file system to one that can be used inside webviews.
*
* Webviews cannot directly load resoruces from the workspace or local file system using `file:` uris. The
* `asWebviewUri` function takes a local `file:` uri and converts it into a uri that can be used inside of
* a webview to load the same resource:
*
* ```ts
* webview.html = `<img src="${webview.asWebviewUri(vscode.Uri.file('/Users/codey/workspace/cat.gif'))}">`
* ```
*/
asWebviewUri(localResource: Uri): Uri;
/**
* Content security policy source for webview resources.
*
* This is the origin that should be used in a content security policy rule:
*
* ```
* img-src https: ${webview.cspSource} ...;
* ```
*/
readonly cspSource: string;
}
/**