mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
@@ -682,6 +682,7 @@ export interface IWebviewPortMapping {
|
||||
|
||||
export interface IWebviewOptions {
|
||||
readonly enableScripts?: boolean;
|
||||
readonly enableForms?: boolean;
|
||||
readonly enableCommandUris?: boolean;
|
||||
readonly localResourceRoots?: ReadonlyArray<UriComponents>;
|
||||
readonly portMapping?: ReadonlyArray<IWebviewPortMapping>;
|
||||
|
||||
@@ -194,6 +194,7 @@ export function serializeWebviewOptions(
|
||||
return {
|
||||
enableCommandUris: options.enableCommandUris,
|
||||
enableScripts: options.enableScripts,
|
||||
enableForms: options.enableForms,
|
||||
portMapping: options.portMapping,
|
||||
localResourceRoots: options.localResourceRoots || getDefaultLocalResourceRoots(extension, workspace)
|
||||
};
|
||||
@@ -203,6 +204,7 @@ export function reviveOptions(options: extHostProtocol.IWebviewOptions): vscode.
|
||||
return {
|
||||
enableCommandUris: options.enableCommandUris,
|
||||
enableScripts: options.enableScripts,
|
||||
enableForms: options.enableForms,
|
||||
portMapping: options.portMapping,
|
||||
localResourceRoots: options.localResourceRoots?.map(components => URI.from(components)),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user