Skip to content

Commit bcbd339

Browse files
author
Matt Bierner
committed
Remove old way of changing an html preview's input options
The `options` argument of `_workbench.previewHtml` was never properly documented and never offically supported.
1 parent 966aeb0 commit bcbd339

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

src/vs/workbench/parts/html/browser/html.contribution.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,11 @@ function getActivePreviewsForResource(accessor: ServicesAccessor, resource: URI
3838

3939
// --- Register Commands
4040

41-
const defaultPreviewHtmlOptions: HtmlInputOptions = {
42-
allowScripts: true,
43-
allowSvgs: true
44-
};
45-
4641
CommandsRegistry.registerCommand('_workbench.previewHtml', function (
4742
accessor: ServicesAccessor,
4843
resource: URI | string,
4944
position?: EditorPosition,
50-
label?: string,
51-
options?: HtmlInputOptions
45+
label?: string
5246
) {
5347
const uri = resource instanceof URI ? resource : URI.parse(resource);
5448
label = label || uri.fsPath;
@@ -65,9 +59,13 @@ CommandsRegistry.registerCommand('_workbench.previewHtml', function (
6559
}
6660
}
6761

68-
const inputOptions = (Object as any).assign({}, options || defaultPreviewHtmlOptions);
6962
const extensionsWorkbenchService = accessor.get(IExtensionsWorkbenchService);
70-
inputOptions.svgWhiteList = extensionsWorkbenchService.allowedBadgeProviders;
63+
64+
const inputOptions: HtmlInputOptions = {
65+
allowScripts: true,
66+
allowSvgs: true,
67+
svgWhiteList: extensionsWorkbenchService.allowedBadgeProviders
68+
};
7169

7270
// Otherwise, create new input and open it
7371
if (!input) {

0 commit comments

Comments
 (0)