Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

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

@@ -4975,10 +4975,11 @@ declare module 'vscode' {
color: string | ThemeColor | undefined;
/**
* The identifier of a command to run on click. The command must be
* [known](#commands.getCommands).
* [`Command`](#Command) or identifier of a command to run on click.
*
* The command must be [known](#commands.getCommands).
*/
command: string | undefined;
command: string | Command | undefined;
/**
* Shows the entry in the status bar.
@@ -6324,7 +6325,7 @@ declare module 'vscode' {
}
/**
* A webview displays html content, like an iframe.
* Displays html content, similarly to an iframe.
*/
export interface Webview {
/**
@@ -6333,9 +6334,29 @@ declare module 'vscode' {
options: WebviewOptions;
/**
* Contents of the webview.
* HTML contents of the webview.
*
* Should be a complete html document.
* This should be a complete, valid html document. Changing this property causes the webview to be reloaded.
*
* Webviews are sandboxed from normal extension process, so all communication with the webview must use
* message passing. To send a message from the extension to the webview, use [`postMessage`](#Webview.postMessage).
* To send message from the webview back to an extension, use the `acquireVsCodeApi` function inside the webview
* to get a handle to VS Code's api and then call `.postMessage()`:
*
* ```html
* <script>
* const vscode = acquireVsCodeApi(); // acquireVsCodeApi can only be invoked once
* vscode.postMessage({ message: 'hello!' });
* </script>
* ```
*
* To load a resources from the workspace inside a webview, use the `[asWebviewUri](#Webview.asWebviewUri)` method
* and ensure the resource's directory is listed in [`WebviewOptions.localResourceRoots`](#WebviewOptions.localResourceRoots).
*
* Keep in mind that even though webviews are sandboxed, they still allow running scripts and loading arbitrary content,
* so extensions must follow all standard web security best practices when working with webviews. This includes
* properly sanitizing all untrusted input (including content from the workspace) and
* setting a [content security policy](https://aka.ms/vscode-api-webview-csp).
*/
html: string;
@@ -6433,7 +6454,7 @@ declare module 'vscode' {
iconPath?: Uri | { light: Uri; dark: Uri };
/**
* Webview belonging to the panel.
* [`Webview`](#Webview) belonging to the panel.
*/
readonly webview: Webview;