提交 79bf9fd2 编写于 作者: M Matt Bierner

Make sure we use a consistent name for portMappings field

上级 fb810784
......@@ -90,7 +90,7 @@ export function areWebviewInputOptionsEqual(a: WebviewInputOptions, b: WebviewIn
&& a.retainContextWhenHidden === b.retainContextWhenHidden
&& a.tryRestoreScrollPosition === b.tryRestoreScrollPosition
&& (a.localResourceRoots === b.localResourceRoots || (Array.isArray(a.localResourceRoots) && Array.isArray(b.localResourceRoots) && equals(a.localResourceRoots, b.localResourceRoots, (a, b) => a.toString() === b.toString())))
&& (a.portMappings === b.portMappings || (Array.isArray(a.portMappings) && Array.isArray(b.portMappings) && equals(a.portMappings, b.portMappings, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort)));
&& (a.portMapping === b.portMapping || (Array.isArray(a.portMapping) && Array.isArray(b.portMapping) && equals(a.portMapping, b.portMapping, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort)));
}
function canRevive(reviver: WebviewReviver, webview: WebviewEditorInput): boolean {
......
......@@ -53,7 +53,7 @@ export class IFrameWebview extends Disposable implements Webview {
this._portMappingManager = this._register(new WebviewPortMappingManager(
this._options.extension ? this._options.extension.location : undefined,
() => this.content.options.portMappings || [],
() => this.content.options.portMapping || [],
tunnelService
));
......
......@@ -55,7 +55,7 @@ export interface WebviewContentOptions {
readonly allowScripts?: boolean;
readonly svgWhiteList?: string[];
readonly localResourceRoots?: ReadonlyArray<URI>;
readonly portMappings?: ReadonlyArray<modes.IWebviewPortMapping>;
readonly portMapping?: ReadonlyArray<modes.IWebviewPortMapping>;
readonly enableCommandUris?: boolean;
}
......
......@@ -327,7 +327,7 @@ export class ElectronWebviewBasedWebview extends Disposable implements Webview {
this._register(new WebviewPortMappingProvider(
session,
_options.extension ? _options.extension.location : undefined,
() => (this.content.options.portMappings || []),
() => (this.content.options.portMapping || []),
tunnelService,
));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册