diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 1c9fb3974c8afc7f467913333ff671e0517de2b0..46b57f913c20da86277b2596bac68087f1b5728e 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1292,11 +1292,25 @@ declare module 'vscode' { export interface Webview { /** * 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 + * `toWebviewResource` 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 = `` + * ``` */ toWebviewResource(localResource: Uri): Uri; /** - * Content security policy rule for webview resources. + * Content security policy source for webview resources. + * + * This is origin used in a content security policy rule: + * + * ``` + * img-src https: ${webview.cspSource} ...; + * ```` */ readonly cspSource: string; }