mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-09 17:52:34 -05:00
Merge from vscode 6e530127a1bb8ffbd1bfb77dc680c321dc0d71f5 (#6844)
This commit is contained in:
24
src/vs/vscode.d.ts
vendored
24
src/vs/vscode.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user