Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/browserElements/common/browserElements.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { CancellationToken } from '../../../base/common/cancellation.js';
7
import { createDecorator } from '../../instantiation/common/instantiation.js';
8
import { IRectangle } from '../../window/common/window.js';
9
10
export const INativeBrowserElementsService = createDecorator<INativeBrowserElementsService>('nativeBrowserElementsService');
11
12
export interface IElementData {
13
readonly outerHTML: string;
14
readonly computedStyle: string;
15
readonly bounds: IRectangle;
16
}
17
18
export enum BrowserType {
19
SimpleBrowser = 'simpleBrowser',
20
LiveServer = 'liveServer',
21
}
22
23
24
export interface INativeBrowserElementsService {
25
26
readonly _serviceBrand: undefined;
27
28
// Properties
29
readonly windowId: number;
30
31
getElementData(rect: IRectangle, token: CancellationToken, browserType: BrowserType, cancellationId?: number): Promise<IElementData | undefined>;
32
33
startDebugSession(token: CancellationToken, browserType: BrowserType, cancelAndDetachId?: number): Promise<void>;
34
}
35
36