mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
parent
4dc2d399c7
commit
21fca08c97
|
@ -110,13 +110,12 @@ export class IFrameWebview extends BaseWebview<HTMLIFrameElement> implements Web
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions) {
|
protected initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions, extraParams?: object) {
|
||||||
const params = {
|
const params = {
|
||||||
id: this.id,
|
id: this.id,
|
||||||
|
extensionId: extension?.id.value ?? '', // The extensionId and purpose in the URL are used for filtering in js-debug:
|
||||||
// The extensionId and purpose in the URL are used for filtering in js-debug:
|
|
||||||
extensionId: extension?.id.value ?? '',
|
|
||||||
purpose: options.purpose,
|
purpose: options.purpose,
|
||||||
|
...extraParams
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const queryString = (Object.keys(params) as Array<keyof typeof params>)
|
const queryString = (Object.keys(params) as Array<keyof typeof params>)
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { Schemas } from 'vs/base/common/network';
|
|
||||||
import { URI } from 'vs/base/common/uri';
|
import { URI } from 'vs/base/common/uri';
|
||||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
import { IFileService } from 'vs/platform/files/common/files';
|
import { IFileService } from 'vs/platform/files/common/files';
|
||||||
|
@ -81,8 +80,7 @@ export class ElectronIframeWebview extends IFrameWebview {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions) {
|
protected initElement(extension: WebviewExtensionDescription | undefined, options: WebviewOptions) {
|
||||||
// The extensionId and purpose in the URL are used for filtering in js-debug:
|
super.initElement(extension, options, { platform: 'electron' });
|
||||||
this.element!.setAttribute('src', `${Schemas.vscodeWebview}://${this.id}/index.html?id=${this.id}&platform=electron&extensionId=${extension?.id.value ?? ''}&purpose=${options.purpose}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public set contentOptions(options: WebviewContentOptions) {
|
public set contentOptions(options: WebviewContentOptions) {
|
||||||
|
|
|
@ -69,11 +69,7 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment
|
||||||
get extHostLogsPath(): URI { return URI.file(join(this.logsPath, `exthost${this.configuration.windowId}`)); }
|
get extHostLogsPath(): URI { return URI.file(join(this.logsPath, `exthost${this.configuration.windowId}`)); }
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
get webviewExternalEndpoint(): string {
|
get webviewExternalEndpoint(): string { return `${Schemas.vscodeWebview}://{{uuid}}`; }
|
||||||
const baseEndpoint = 'https://{{uuid}}.vscode-webview-test.com/{{commit}}';
|
|
||||||
|
|
||||||
return baseEndpoint.replace('{{commit}}', this.productService.commit || '0d728c31ebdf03869d2687d9be0b017667c9ff37');
|
|
||||||
}
|
|
||||||
|
|
||||||
@memoize
|
@memoize
|
||||||
get webviewResourceRoot(): string { return `${Schemas.vscodeWebviewResource}://{{uuid}}/{{resource}}`; }
|
get webviewResourceRoot(): string { return `${Schemas.vscodeWebviewResource}://{{uuid}}/{{resource}}`; }
|
||||||
|
|
Loading…
Reference in a new issue