mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: rename reuseController to debugController (#17520)
This commit is contained in:
parent
f17d345ac9
commit
cb10ef3c71
@ -26,7 +26,7 @@ import { IpcTransport, PipeTransport } from '../protocol/transport';
|
||||
import { PlaywrightServer } from '../remote/playwrightServer';
|
||||
import { gracefullyCloseAll } from '../utils/processLauncher';
|
||||
import type { Mode } from '@recorder/recorderTypes';
|
||||
import { ReuseController } from '../server/reuseController';
|
||||
import { DebugController } from '../server/debugController';
|
||||
|
||||
export function printApiJson() {
|
||||
// Note: this file is generated by build-playwright-driver.sh
|
||||
@ -80,17 +80,17 @@ function selfDestruct() {
|
||||
}
|
||||
|
||||
class ProtocolHandler {
|
||||
private _controller: ReuseController;
|
||||
private _controller: DebugController;
|
||||
|
||||
constructor(playwright: Playwright) {
|
||||
this._controller = playwright.reuseController;
|
||||
this._controller = playwright.debugController;
|
||||
this._controller.setAutoCloseAllowed(true);
|
||||
this._controller.setTrackHierarcy(true);
|
||||
this._controller.setReuseBrowser(true);
|
||||
this._controller.on(ReuseController.Events.BrowsersChanged, browsers => {
|
||||
this._controller.on(DebugController.Events.BrowsersChanged, browsers => {
|
||||
process.send!({ method: 'browsersChanged', params: { browsers } });
|
||||
});
|
||||
this._controller.on(ReuseController.Events.InspectRequested, selector => {
|
||||
this._controller.on(DebugController.Events.InspectRequested, selector => {
|
||||
process.send!({ method: 'inspectRequested', params: { selector } });
|
||||
});
|
||||
}
|
||||
|
@ -321,54 +321,50 @@ scheme.RecorderSource = tObject({
|
||||
revealLine: tOptional(tNumber),
|
||||
group: tOptional(tString),
|
||||
});
|
||||
scheme.ReuseControllerInitializer = tOptional(tObject({}));
|
||||
scheme.ReuseControllerInspectRequestedEvent = tObject({
|
||||
scheme.DebugControllerInitializer = tOptional(tObject({}));
|
||||
scheme.DebugControllerInspectRequestedEvent = tObject({
|
||||
selector: tString,
|
||||
});
|
||||
scheme.ReuseControllerBrowsersChangedEvent = tObject({
|
||||
scheme.DebugControllerBrowsersChangedEvent = tObject({
|
||||
browsers: tArray(tObject({
|
||||
contexts: tArray(tObject({
|
||||
pages: tArray(tString),
|
||||
})),
|
||||
})),
|
||||
});
|
||||
scheme.ReuseControllerSourcesChangedEvent = tObject({
|
||||
scheme.DebugControllerSourcesChangedEvent = tObject({
|
||||
sources: tArray(tType('RecorderSource')),
|
||||
});
|
||||
scheme.ReuseControllerSetTrackHierarchyParams = tObject({
|
||||
scheme.DebugControllerSetTrackHierarchyParams = tObject({
|
||||
enabled: tBoolean,
|
||||
});
|
||||
scheme.ReuseControllerSetTrackHierarchyResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerSetReuseBrowserParams = tObject({
|
||||
scheme.DebugControllerSetTrackHierarchyResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerSetReuseBrowserParams = tObject({
|
||||
enabled: tBoolean,
|
||||
});
|
||||
scheme.ReuseControllerSetReuseBrowserResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerResetForReuseParams = tOptional(tObject({}));
|
||||
scheme.ReuseControllerResetForReuseResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerNavigateAllParams = tObject({
|
||||
scheme.DebugControllerSetReuseBrowserResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerResetForReuseParams = tOptional(tObject({}));
|
||||
scheme.DebugControllerResetForReuseResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerNavigateAllParams = tObject({
|
||||
url: tString,
|
||||
});
|
||||
scheme.ReuseControllerNavigateAllResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerSetRecorderModeParams = tObject({
|
||||
scheme.DebugControllerNavigateAllResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerSetRecorderModeParams = tObject({
|
||||
mode: tEnum(['inspecting', 'recording', 'none']),
|
||||
language: tOptional(tString),
|
||||
file: tOptional(tString),
|
||||
});
|
||||
scheme.ReuseControllerSetRecorderModeResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerSetAutoCloseParams = tObject({
|
||||
enabled: tBoolean,
|
||||
});
|
||||
scheme.ReuseControllerSetAutoCloseResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerHighlightAllParams = tObject({
|
||||
scheme.DebugControllerSetRecorderModeResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerHighlightAllParams = tObject({
|
||||
selector: tString,
|
||||
});
|
||||
scheme.ReuseControllerHighlightAllResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerHideHighlightAllParams = tOptional(tObject({}));
|
||||
scheme.ReuseControllerHideHighlightAllResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerKillParams = tOptional(tObject({}));
|
||||
scheme.ReuseControllerKillResult = tOptional(tObject({}));
|
||||
scheme.ReuseControllerCloseAllBrowsersParams = tOptional(tObject({}));
|
||||
scheme.ReuseControllerCloseAllBrowsersResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerHighlightAllResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerHideHighlightAllParams = tOptional(tObject({}));
|
||||
scheme.DebugControllerHideHighlightAllResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerKillParams = tOptional(tObject({}));
|
||||
scheme.DebugControllerKillResult = tOptional(tObject({}));
|
||||
scheme.DebugControllerCloseAllBrowsersParams = tOptional(tObject({}));
|
||||
scheme.DebugControllerCloseAllBrowsersResult = tOptional(tObject({}));
|
||||
scheme.SocksSupportInitializer = tOptional(tObject({}));
|
||||
scheme.SocksSupportSocksRequestedEvent = tObject({
|
||||
uid: tString,
|
||||
|
@ -24,7 +24,7 @@ import { SocksProxy } from '../common/socksProxy';
|
||||
import type { Mode } from './playwrightServer';
|
||||
import { assert } from '../utils';
|
||||
import type { LaunchOptions } from '../server/types';
|
||||
import { ReuseControllerDispatcher } from '../server/dispatchers/reuseControllerDispatcher';
|
||||
import { DebugControllerDispatcher } from '../server/dispatchers/debugControllerDispatcher';
|
||||
|
||||
type Options = {
|
||||
enableSocksProxy: boolean,
|
||||
@ -48,7 +48,7 @@ export class PlaywrightConnection {
|
||||
private _options: Options;
|
||||
private _root: DispatcherScope;
|
||||
|
||||
constructor(lock: Promise<void>, mode: Mode, ws: WebSocket, isReuseControllerClient: boolean, options: Options, preLaunched: PreLaunched, log: (m: string) => void, onClose: () => void) {
|
||||
constructor(lock: Promise<void>, mode: Mode, ws: WebSocket, isDebugControllerClient: boolean, options: Options, preLaunched: PreLaunched, log: (m: string) => void, onClose: () => void) {
|
||||
this._ws = ws;
|
||||
this._preLaunched = preLaunched;
|
||||
this._options = options;
|
||||
@ -73,8 +73,8 @@ export class PlaywrightConnection {
|
||||
ws.on('close', () => this._onDisconnect());
|
||||
ws.on('error', error => this._onDisconnect(error));
|
||||
|
||||
if (isReuseControllerClient) {
|
||||
this._root = this._initReuseControllerMode();
|
||||
if (isDebugControllerClient) {
|
||||
this._root = this._initDebugControllerMode();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -136,12 +136,12 @@ export class PlaywrightConnection {
|
||||
return playwrightDispatcher;
|
||||
}
|
||||
|
||||
private _initReuseControllerMode(): ReuseControllerDispatcher {
|
||||
private _initDebugControllerMode(): DebugControllerDispatcher {
|
||||
this._debugLog(`engaged reuse controller mode`);
|
||||
const playwright = this._preLaunched.playwright!;
|
||||
this._cleanups.push(() => gracefullyCloseAll());
|
||||
// Always create new instance based on the reused Playwright instance.
|
||||
return new ReuseControllerDispatcher(this._dispatcherConnection, playwright.reuseController);
|
||||
return new DebugControllerDispatcher(this._dispatcherConnection, playwright.debugController);
|
||||
}
|
||||
|
||||
private async _initReuseBrowsersMode(scope: RootDispatcher) {
|
||||
|
@ -111,17 +111,17 @@ export class PlaywrightServer {
|
||||
|
||||
const log = newLogger();
|
||||
log(`serving connection: ${request.url}`);
|
||||
const isReuseControllerClient = !!request.headers['x-playwright-reuse-controller'];
|
||||
const semaphore = isReuseControllerClient ? controllerSemaphore : browserSemaphore;
|
||||
const isDebugControllerClient = !!request.headers['x-playwright-debug-controller'];
|
||||
const semaphore = isDebugControllerClient ? controllerSemaphore : browserSemaphore;
|
||||
|
||||
// If we started in the legacy reuse-browser mode, create this._preLaunchedPlaywright.
|
||||
// If we get a reuse-controller request, create this._preLaunchedPlaywright.
|
||||
if (isReuseControllerClient || (this._mode === 'reuse-browser') && !this._preLaunchedPlaywright)
|
||||
if (isDebugControllerClient || (this._mode === 'reuse-browser') && !this._preLaunchedPlaywright)
|
||||
this.preLaunchedPlaywright();
|
||||
|
||||
// If we have a playwright to reuse, consult controller for reuse mode.
|
||||
let mode = this._mode;
|
||||
if (mode === 'auto' && this._preLaunchedPlaywright?.reuseController.reuseBrowser())
|
||||
if (mode === 'auto' && this._preLaunchedPlaywright?.debugController.reuseBrowser())
|
||||
mode = 'reuse-browser';
|
||||
|
||||
if (mode === 'reuse-browser')
|
||||
@ -131,7 +131,7 @@ export class PlaywrightServer {
|
||||
|
||||
const connection = new PlaywrightConnection(
|
||||
semaphore.aquire(),
|
||||
mode, ws, isReuseControllerClient,
|
||||
mode, ws, isDebugControllerClient,
|
||||
{ enableSocksProxy, browserName, launchOptions },
|
||||
{ playwright: this._preLaunchedPlaywright, browser: this._options.preLaunchedBrowser || null },
|
||||
log, () => semaphore.release());
|
||||
|
@ -26,7 +26,7 @@ import { EmptyRecorderApp } from './recorder/recorderApp';
|
||||
|
||||
const internalMetadata = serverSideCallMetadata();
|
||||
|
||||
export class ReuseController extends SdkObject {
|
||||
export class DebugController extends SdkObject {
|
||||
static Events = {
|
||||
BrowsersChanged: 'browsersChanged',
|
||||
InspectRequested: 'inspectRequested',
|
||||
@ -41,7 +41,7 @@ export class ReuseController extends SdkObject {
|
||||
private _reuseBrowser = false;
|
||||
|
||||
constructor(playwright: Playwright) {
|
||||
super({ attribution: { isInternalPlaywright: true }, instrumentation: createInstrumentation() } as any, undefined, 'ReuseController');
|
||||
super({ attribution: { isInternalPlaywright: true }, instrumentation: createInstrumentation() } as any, undefined, 'DebugController');
|
||||
this._playwright = playwright;
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ export class ReuseController extends SdkObject {
|
||||
c.pages.push(page.mainFrame().url());
|
||||
}
|
||||
}
|
||||
this.emit(ReuseController.Events.BrowsersChanged, browsers);
|
||||
this.emit(DebugController.Events.BrowsersChanged, browsers);
|
||||
}
|
||||
|
||||
private async _allRecorders(): Promise<Recorder[]> {
|
||||
@ -207,18 +207,18 @@ function selfDestruct() {
|
||||
}
|
||||
|
||||
class InspectingRecorderApp extends EmptyRecorderApp {
|
||||
private _reuseController: ReuseController;
|
||||
private _debugController: DebugController;
|
||||
|
||||
constructor(reuseController: ReuseController) {
|
||||
constructor(debugController: DebugController) {
|
||||
super();
|
||||
this._reuseController = reuseController;
|
||||
this._debugController = debugController;
|
||||
}
|
||||
|
||||
override async setSelector(selector: string): Promise<void> {
|
||||
this._reuseController.emit(ReuseController.Events.InspectRequested, selector);
|
||||
this._debugController.emit(DebugController.Events.InspectRequested, selector);
|
||||
}
|
||||
|
||||
override async setSources(sources: Source[]): Promise<void> {
|
||||
this._reuseController.emit(ReuseController.Events.SourcesChanged, sources);
|
||||
this._debugController.emit(DebugController.Events.SourcesChanged, sources);
|
||||
}
|
||||
}
|
@ -15,32 +15,32 @@
|
||||
*/
|
||||
|
||||
import type * as channels from '@protocol/channels';
|
||||
import { ReuseController } from '../reuseController';
|
||||
import { DebugController } from '../debugController';
|
||||
import type { DispatcherConnection, RootDispatcher } from './dispatcher';
|
||||
import { Dispatcher } from './dispatcher';
|
||||
|
||||
export class ReuseControllerDispatcher extends Dispatcher<ReuseController, channels.ReuseControllerChannel, RootDispatcher> implements channels.ReuseControllerChannel {
|
||||
_type_ReuseController;
|
||||
export class DebugControllerDispatcher extends Dispatcher<DebugController, channels.DebugControllerChannel, RootDispatcher> implements channels.DebugControllerChannel {
|
||||
_type_DebugController;
|
||||
|
||||
constructor(connection: DispatcherConnection, reuseController: ReuseController) {
|
||||
super(connection, reuseController, 'ReuseController', {});
|
||||
this._type_ReuseController = true;
|
||||
this._object.on(ReuseController.Events.BrowsersChanged, browsers => {
|
||||
constructor(connection: DispatcherConnection, debugController: DebugController) {
|
||||
super(connection, debugController, 'DebugController', {});
|
||||
this._type_DebugController = true;
|
||||
this._object.on(DebugController.Events.BrowsersChanged, browsers => {
|
||||
this._dispatchEvent('browsersChanged', { browsers });
|
||||
});
|
||||
this._object.on(ReuseController.Events.InspectRequested, selector => {
|
||||
this._object.on(DebugController.Events.InspectRequested, selector => {
|
||||
this._dispatchEvent('inspectRequested', { selector });
|
||||
});
|
||||
this._object.on(ReuseController.Events.SourcesChanged, sources => {
|
||||
this._object.on(DebugController.Events.SourcesChanged, sources => {
|
||||
this._dispatchEvent('sourcesChanged', { sources });
|
||||
});
|
||||
}
|
||||
|
||||
async setTrackHierarchy(params: channels.ReuseControllerSetTrackHierarchyParams) {
|
||||
async setTrackHierarchy(params: channels.DebugControllerSetTrackHierarchyParams) {
|
||||
this._object.setTrackHierarcy(params.enabled);
|
||||
}
|
||||
|
||||
async setReuseBrowser(params: channels.ReuseControllerSetReuseBrowserParams) {
|
||||
async setReuseBrowser(params: channels.DebugControllerSetReuseBrowserParams) {
|
||||
this._object.setReuseBrowser(params.enabled);
|
||||
}
|
||||
|
||||
@ -48,19 +48,15 @@ export class ReuseControllerDispatcher extends Dispatcher<ReuseController, chann
|
||||
await this._object.resetForReuse();
|
||||
}
|
||||
|
||||
async navigateAll(params: channels.ReuseControllerNavigateAllParams) {
|
||||
async navigateAll(params: channels.DebugControllerNavigateAllParams) {
|
||||
await this._object.navigateAll(params.url);
|
||||
}
|
||||
|
||||
async setRecorderMode(params: channels.ReuseControllerSetRecorderModeParams) {
|
||||
async setRecorderMode(params: channels.DebugControllerSetRecorderModeParams) {
|
||||
await this._object.setRecorderMode(params);
|
||||
}
|
||||
|
||||
async setAutoClose(params: channels.ReuseControllerSetAutoCloseParams) {
|
||||
await this._object.setAutoCloseEnabled(params.enabled);
|
||||
}
|
||||
|
||||
async highlightAll(params: channels.ReuseControllerHighlightAllParams) {
|
||||
async highlightAll(params: channels.DebugControllerHighlightAllParams) {
|
||||
await this._object.highlightAll(params.selector);
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import type { CallMetadata } from './instrumentation';
|
||||
import { createInstrumentation, SdkObject } from './instrumentation';
|
||||
import { debugLogger } from '../common/debugLogger';
|
||||
import type { Page } from './page';
|
||||
import { ReuseController } from './reuseController';
|
||||
import { DebugController } from './debugController';
|
||||
|
||||
export class Playwright extends SdkObject {
|
||||
readonly selectors: Selectors;
|
||||
@ -36,7 +36,7 @@ export class Playwright extends SdkObject {
|
||||
readonly firefox: Firefox;
|
||||
readonly webkit: WebKit;
|
||||
readonly options: PlaywrightOptions;
|
||||
readonly reuseController: ReuseController;
|
||||
readonly debugController: DebugController;
|
||||
private _allPages = new Set<Page>();
|
||||
private _allBrowsers = new Set<Browser>();
|
||||
|
||||
@ -62,7 +62,7 @@ export class Playwright extends SdkObject {
|
||||
this.electron = new Electron(this.options);
|
||||
this.android = new Android(new AdbBackend(), this.options);
|
||||
this.selectors = this.options.selectors;
|
||||
this.reuseController = new ReuseController(this);
|
||||
this.debugController = new DebugController(this);
|
||||
}
|
||||
|
||||
async hideHighlight() {
|
||||
|
@ -52,7 +52,7 @@ export type InitializerTraits<T> =
|
||||
T extends BrowserTypeChannel ? BrowserTypeInitializer :
|
||||
T extends SelectorsChannel ? SelectorsInitializer :
|
||||
T extends SocksSupportChannel ? SocksSupportInitializer :
|
||||
T extends ReuseControllerChannel ? ReuseControllerInitializer :
|
||||
T extends DebugControllerChannel ? DebugControllerInitializer :
|
||||
T extends PlaywrightChannel ? PlaywrightInitializer :
|
||||
T extends RootChannel ? RootInitializer :
|
||||
T extends LocalUtilsChannel ? LocalUtilsInitializer :
|
||||
@ -90,7 +90,7 @@ export type EventsTraits<T> =
|
||||
T extends BrowserTypeChannel ? BrowserTypeEvents :
|
||||
T extends SelectorsChannel ? SelectorsEvents :
|
||||
T extends SocksSupportChannel ? SocksSupportEvents :
|
||||
T extends ReuseControllerChannel ? ReuseControllerEvents :
|
||||
T extends DebugControllerChannel ? DebugControllerEvents :
|
||||
T extends PlaywrightChannel ? PlaywrightEvents :
|
||||
T extends RootChannel ? RootEvents :
|
||||
T extends LocalUtilsChannel ? LocalUtilsEvents :
|
||||
@ -128,7 +128,7 @@ export type EventTargetTraits<T> =
|
||||
T extends BrowserTypeChannel ? BrowserTypeEventTarget :
|
||||
T extends SelectorsChannel ? SelectorsEventTarget :
|
||||
T extends SocksSupportChannel ? SocksSupportEventTarget :
|
||||
T extends ReuseControllerChannel ? ReuseControllerEventTarget :
|
||||
T extends DebugControllerChannel ? DebugControllerEventTarget :
|
||||
T extends PlaywrightChannel ? PlaywrightEventTarget :
|
||||
T extends RootChannel ? RootEventTarget :
|
||||
T extends LocalUtilsChannel ? LocalUtilsEventTarget :
|
||||
@ -572,101 +572,93 @@ export type RecorderSource = {
|
||||
group?: string,
|
||||
};
|
||||
|
||||
// ----------- ReuseController -----------
|
||||
export type ReuseControllerInitializer = {};
|
||||
export interface ReuseControllerEventTarget {
|
||||
on(event: 'inspectRequested', callback: (params: ReuseControllerInspectRequestedEvent) => void): this;
|
||||
on(event: 'browsersChanged', callback: (params: ReuseControllerBrowsersChangedEvent) => void): this;
|
||||
on(event: 'sourcesChanged', callback: (params: ReuseControllerSourcesChangedEvent) => void): this;
|
||||
// ----------- DebugController -----------
|
||||
export type DebugControllerInitializer = {};
|
||||
export interface DebugControllerEventTarget {
|
||||
on(event: 'inspectRequested', callback: (params: DebugControllerInspectRequestedEvent) => void): this;
|
||||
on(event: 'browsersChanged', callback: (params: DebugControllerBrowsersChangedEvent) => void): this;
|
||||
on(event: 'sourcesChanged', callback: (params: DebugControllerSourcesChangedEvent) => void): this;
|
||||
}
|
||||
export interface ReuseControllerChannel extends ReuseControllerEventTarget, Channel {
|
||||
_type_ReuseController: boolean;
|
||||
setTrackHierarchy(params: ReuseControllerSetTrackHierarchyParams, metadata?: Metadata): Promise<ReuseControllerSetTrackHierarchyResult>;
|
||||
setReuseBrowser(params: ReuseControllerSetReuseBrowserParams, metadata?: Metadata): Promise<ReuseControllerSetReuseBrowserResult>;
|
||||
resetForReuse(params?: ReuseControllerResetForReuseParams, metadata?: Metadata): Promise<ReuseControllerResetForReuseResult>;
|
||||
navigateAll(params: ReuseControllerNavigateAllParams, metadata?: Metadata): Promise<ReuseControllerNavigateAllResult>;
|
||||
setRecorderMode(params: ReuseControllerSetRecorderModeParams, metadata?: Metadata): Promise<ReuseControllerSetRecorderModeResult>;
|
||||
setAutoClose(params: ReuseControllerSetAutoCloseParams, metadata?: Metadata): Promise<ReuseControllerSetAutoCloseResult>;
|
||||
highlightAll(params: ReuseControllerHighlightAllParams, metadata?: Metadata): Promise<ReuseControllerHighlightAllResult>;
|
||||
hideHighlightAll(params?: ReuseControllerHideHighlightAllParams, metadata?: Metadata): Promise<ReuseControllerHideHighlightAllResult>;
|
||||
kill(params?: ReuseControllerKillParams, metadata?: Metadata): Promise<ReuseControllerKillResult>;
|
||||
closeAllBrowsers(params?: ReuseControllerCloseAllBrowsersParams, metadata?: Metadata): Promise<ReuseControllerCloseAllBrowsersResult>;
|
||||
export interface DebugControllerChannel extends DebugControllerEventTarget, Channel {
|
||||
_type_DebugController: boolean;
|
||||
setTrackHierarchy(params: DebugControllerSetTrackHierarchyParams, metadata?: Metadata): Promise<DebugControllerSetTrackHierarchyResult>;
|
||||
setReuseBrowser(params: DebugControllerSetReuseBrowserParams, metadata?: Metadata): Promise<DebugControllerSetReuseBrowserResult>;
|
||||
resetForReuse(params?: DebugControllerResetForReuseParams, metadata?: Metadata): Promise<DebugControllerResetForReuseResult>;
|
||||
navigateAll(params: DebugControllerNavigateAllParams, metadata?: Metadata): Promise<DebugControllerNavigateAllResult>;
|
||||
setRecorderMode(params: DebugControllerSetRecorderModeParams, metadata?: Metadata): Promise<DebugControllerSetRecorderModeResult>;
|
||||
highlightAll(params: DebugControllerHighlightAllParams, metadata?: Metadata): Promise<DebugControllerHighlightAllResult>;
|
||||
hideHighlightAll(params?: DebugControllerHideHighlightAllParams, metadata?: Metadata): Promise<DebugControllerHideHighlightAllResult>;
|
||||
kill(params?: DebugControllerKillParams, metadata?: Metadata): Promise<DebugControllerKillResult>;
|
||||
closeAllBrowsers(params?: DebugControllerCloseAllBrowsersParams, metadata?: Metadata): Promise<DebugControllerCloseAllBrowsersResult>;
|
||||
}
|
||||
export type ReuseControllerInspectRequestedEvent = {
|
||||
export type DebugControllerInspectRequestedEvent = {
|
||||
selector: string,
|
||||
};
|
||||
export type ReuseControllerBrowsersChangedEvent = {
|
||||
export type DebugControllerBrowsersChangedEvent = {
|
||||
browsers: {
|
||||
contexts: {
|
||||
pages: string[],
|
||||
}[],
|
||||
}[],
|
||||
};
|
||||
export type ReuseControllerSourcesChangedEvent = {
|
||||
export type DebugControllerSourcesChangedEvent = {
|
||||
sources: RecorderSource[],
|
||||
};
|
||||
export type ReuseControllerSetTrackHierarchyParams = {
|
||||
export type DebugControllerSetTrackHierarchyParams = {
|
||||
enabled: boolean,
|
||||
};
|
||||
export type ReuseControllerSetTrackHierarchyOptions = {
|
||||
export type DebugControllerSetTrackHierarchyOptions = {
|
||||
|
||||
};
|
||||
export type ReuseControllerSetTrackHierarchyResult = void;
|
||||
export type ReuseControllerSetReuseBrowserParams = {
|
||||
export type DebugControllerSetTrackHierarchyResult = void;
|
||||
export type DebugControllerSetReuseBrowserParams = {
|
||||
enabled: boolean,
|
||||
};
|
||||
export type ReuseControllerSetReuseBrowserOptions = {
|
||||
export type DebugControllerSetReuseBrowserOptions = {
|
||||
|
||||
};
|
||||
export type ReuseControllerSetReuseBrowserResult = void;
|
||||
export type ReuseControllerResetForReuseParams = {};
|
||||
export type ReuseControllerResetForReuseOptions = {};
|
||||
export type ReuseControllerResetForReuseResult = void;
|
||||
export type ReuseControllerNavigateAllParams = {
|
||||
export type DebugControllerSetReuseBrowserResult = void;
|
||||
export type DebugControllerResetForReuseParams = {};
|
||||
export type DebugControllerResetForReuseOptions = {};
|
||||
export type DebugControllerResetForReuseResult = void;
|
||||
export type DebugControllerNavigateAllParams = {
|
||||
url: string,
|
||||
};
|
||||
export type ReuseControllerNavigateAllOptions = {
|
||||
export type DebugControllerNavigateAllOptions = {
|
||||
|
||||
};
|
||||
export type ReuseControllerNavigateAllResult = void;
|
||||
export type ReuseControllerSetRecorderModeParams = {
|
||||
export type DebugControllerNavigateAllResult = void;
|
||||
export type DebugControllerSetRecorderModeParams = {
|
||||
mode: 'inspecting' | 'recording' | 'none',
|
||||
language?: string,
|
||||
file?: string,
|
||||
};
|
||||
export type ReuseControllerSetRecorderModeOptions = {
|
||||
export type DebugControllerSetRecorderModeOptions = {
|
||||
language?: string,
|
||||
file?: string,
|
||||
};
|
||||
export type ReuseControllerSetRecorderModeResult = void;
|
||||
export type ReuseControllerSetAutoCloseParams = {
|
||||
enabled: boolean,
|
||||
};
|
||||
export type ReuseControllerSetAutoCloseOptions = {
|
||||
|
||||
};
|
||||
export type ReuseControllerSetAutoCloseResult = void;
|
||||
export type ReuseControllerHighlightAllParams = {
|
||||
export type DebugControllerSetRecorderModeResult = void;
|
||||
export type DebugControllerHighlightAllParams = {
|
||||
selector: string,
|
||||
};
|
||||
export type ReuseControllerHighlightAllOptions = {
|
||||
export type DebugControllerHighlightAllOptions = {
|
||||
|
||||
};
|
||||
export type ReuseControllerHighlightAllResult = void;
|
||||
export type ReuseControllerHideHighlightAllParams = {};
|
||||
export type ReuseControllerHideHighlightAllOptions = {};
|
||||
export type ReuseControllerHideHighlightAllResult = void;
|
||||
export type ReuseControllerKillParams = {};
|
||||
export type ReuseControllerKillOptions = {};
|
||||
export type ReuseControllerKillResult = void;
|
||||
export type ReuseControllerCloseAllBrowsersParams = {};
|
||||
export type ReuseControllerCloseAllBrowsersOptions = {};
|
||||
export type ReuseControllerCloseAllBrowsersResult = void;
|
||||
export type DebugControllerHighlightAllResult = void;
|
||||
export type DebugControllerHideHighlightAllParams = {};
|
||||
export type DebugControllerHideHighlightAllOptions = {};
|
||||
export type DebugControllerHideHighlightAllResult = void;
|
||||
export type DebugControllerKillParams = {};
|
||||
export type DebugControllerKillOptions = {};
|
||||
export type DebugControllerKillResult = void;
|
||||
export type DebugControllerCloseAllBrowsersParams = {};
|
||||
export type DebugControllerCloseAllBrowsersOptions = {};
|
||||
export type DebugControllerCloseAllBrowsersResult = void;
|
||||
|
||||
export interface ReuseControllerEvents {
|
||||
'inspectRequested': ReuseControllerInspectRequestedEvent;
|
||||
'browsersChanged': ReuseControllerBrowsersChangedEvent;
|
||||
'sourcesChanged': ReuseControllerSourcesChangedEvent;
|
||||
export interface DebugControllerEvents {
|
||||
'inspectRequested': DebugControllerInspectRequestedEvent;
|
||||
'browsersChanged': DebugControllerBrowsersChangedEvent;
|
||||
'sourcesChanged': DebugControllerSourcesChangedEvent;
|
||||
}
|
||||
|
||||
// ----------- SocksSupport -----------
|
||||
|
@ -640,7 +640,7 @@ RecorderSource:
|
||||
revealLine: number?
|
||||
group: string?
|
||||
|
||||
ReuseController:
|
||||
DebugController:
|
||||
type: interface
|
||||
|
||||
commands:
|
||||
@ -669,10 +669,6 @@ ReuseController:
|
||||
language: string?
|
||||
file: string?
|
||||
|
||||
setAutoClose:
|
||||
parameters:
|
||||
enabled: boolean
|
||||
|
||||
highlightAll:
|
||||
parameters:
|
||||
selector: string
|
||||
|
Loading…
x
Reference in New Issue
Block a user