diff options
author | 2023-08-26 02:34:25 -0700 | |
---|---|---|
committer | 2023-08-26 02:34:25 -0700 | |
commit | 2a9e967fd1c766a718808d5a7fa779d74d44e62c (patch) | |
tree | 3bf4c059c03b9b561bc565ecf7cf21eaceae5353 /packages | |
parent | 910daeff27ead119e15f35f6c1e0aa09d2aa7562 (diff) | |
download | bun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.tar.gz bun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.tar.zst bun-2a9e967fd1c766a718808d5a7fa779d74d44e62c.zip |
More improvements to debugger support (#4345)
* More fixes for dap
* More changes
* More changes 2
* More fixes
* Fix debugger.ts
* Bun Terminal
Diffstat (limited to 'packages')
54 files changed, 35897 insertions, 505 deletions
diff --git a/packages/bun-debug-adapter-protocol/bun.lockb b/packages/bun-debug-adapter-protocol/bun.lockb Binary files differindex ccae05ab8..53d889ee4 100755 --- a/packages/bun-debug-adapter-protocol/bun.lockb +++ b/packages/bun-debug-adapter-protocol/bun.lockb diff --git a/packages/bun-debug-adapter-protocol/index.ts b/packages/bun-debug-adapter-protocol/index.ts index 567a57525..e1b6e900d 100644 --- a/packages/bun-debug-adapter-protocol/index.ts +++ b/packages/bun-debug-adapter-protocol/index.ts @@ -1,2 +1,2 @@ -export type * from "./protocol"; -export * from "./debugger/adapter"; +export type * from "./src/protocol"; +export * from "./src/debugger/adapter"; diff --git a/packages/bun-debug-adapter-protocol/package.json b/packages/bun-debug-adapter-protocol/package.json index 8bf68cf01..5c23c6fff 100644 --- a/packages/bun-debug-adapter-protocol/package.json +++ b/packages/bun-debug-adapter-protocol/package.json @@ -1,8 +1,8 @@ { "name": "bun-debug-adapter-protocol", + "version": "0.0.1", "dependencies": { "semver": "^7.5.4", - "ws": "^8.13.0", "source-map-js": "^1.0.2" } } diff --git a/packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts b/packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts index 724a48490..51b2765b5 100644 --- a/packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts +++ b/packages/bun-debug-adapter-protocol/scripts/generate-protocol.ts @@ -1,4 +1,4 @@ -import type { Protocol, Type } from "../protocol/schema.d.ts"; +import type { Protocol, Type } from "../src/protocol/schema"; import { writeFileSync } from "node:fs"; import { spawnSync } from "node:child_process"; diff --git a/packages/bun-debug-adapter-protocol/debugger/adapter.ts b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts index 9dc55fe38..33555dbb0 100644 --- a/packages/bun-debug-adapter-protocol/debugger/adapter.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts @@ -1,12 +1,11 @@ -import type { DAP } from ".."; -// @ts-ignore: FIXME - there is something wrong with the types -import type { JSC, InspectorListener } from "../../bun-inspector-protocol"; -import { WebSocketInspector } from "../../bun-inspector-protocol"; +import type { DAP } from "../protocol"; +// @ts-ignore +import type { JSC, InspectorListener, WebSocketInspectorOptions } from "../../../bun-inspector-protocol"; +import { UnixWebSocketInspector, remoteObjectToString } from "../../../bun-inspector-protocol/index"; import type { ChildProcess } from "node:child_process"; import { spawn, spawnSync } from "node:child_process"; import capabilities from "./capabilities"; import { Location, SourceMap } from "./sourcemap"; -import { remoteObjectToString } from "./preview"; import { compare, parse } from "semver"; type InitializeRequest = DAP.InitializeRequest & { @@ -21,6 +20,7 @@ type LaunchRequest = DAP.LaunchRequest & { env?: Record<string, string>; inheritEnv?: boolean; watch?: boolean | "hot"; + debug?: boolean; }; type AttachRequest = DAP.AttachRequest & { @@ -71,24 +71,31 @@ type Variable = DAP.Variable & { }; type IDebugAdapter = { - [E in keyof DAP.EventMap]?: (event: DAP.EventMap[E]) => void; + [E in keyof DAP.EventMap]?: (event: DAP.EventMap[E]) => void | Promise<void>; } & { [R in keyof DAP.RequestMap]?: ( request: DAP.RequestMap[R], - ) => void | DAP.ResponseMap[R] | Promise<void | DAP.ResponseMap[R]>; + ) => void | DAP.ResponseMap[R] | Promise<DAP.ResponseMap[R]> | Promise<void>; }; -export type DebugAdapterOptions = { - sendToAdapter(message: DAP.Request | DAP.Response | DAP.Event): Promise<void>; +export type DebugAdapterOptions = WebSocketInspectorOptions & { + url: string | URL; + send(message: DAP.Request | DAP.Response | DAP.Event): Promise<void>; + stdout?(message: string): void; + stderr?(message: string): void; }; // This adapter only support single-threaded debugging, // which means that there is only one thread at a time. const threadId = 1; +// @ts-ignore export class DebugAdapter implements IDebugAdapter, InspectorListener { - #sendToAdapter: DebugAdapterOptions["sendToAdapter"]; - #inspector: WebSocketInspector; + #url: URL; + #sendToAdapter: DebugAdapterOptions["send"]; + #stdout?: DebugAdapterOptions["stdout"]; + #stderr?: DebugAdapterOptions["stderr"]; + #inspector: UnixWebSocketInspector; #sourceId: number; #pendingSources: Map<string, ((source: Source) => void)[]>; #sources: Map<string | number, Source>; @@ -102,12 +109,14 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { #initialized?: InitializeRequest; #launched?: LaunchRequest; #connected?: boolean; - #terminated?: boolean; - #url?: URL; - constructor({ sendToAdapter }: DebugAdapterOptions) { - this.#inspector = new WebSocketInspector({ listener: this }); - this.#sendToAdapter = sendToAdapter; + constructor({ url, send, stdout, stderr, ...options }: DebugAdapterOptions) { + this.#url = new URL(url); + // @ts-ignore + this.#inspector = new UnixWebSocketInspector({ ...options, url, listener: this }); + this.#stdout = stdout; + this.#stderr = stderr; + this.#sendToAdapter = send; this.#sourceId = 1; this.#pendingSources = new Map(); this.#sources = new Map(); @@ -119,6 +128,10 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { this.#variables = [{ name: "", value: "", type: undefined, variablesReference: 0 }]; } + get inspector(): UnixWebSocketInspector { + return this.#inspector; + } + async accept(message: DAP.Request | DAP.Response | DAP.Event): Promise<void> { const { type } = message; @@ -140,7 +153,6 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { } response = await this[command as keyof this](args); } catch (error) { - console.error(error); const { message } = unknownToError(error); return this.#sendToAdapter({ type: "response", @@ -238,7 +250,7 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { throw new Error("Another program is already running. Did you terminate the last session?"); } - const { program, runtime = "bun", args = [], cwd, env = {}, inheritEnv = true, watch = true } = request; + const { program, runtime = "bun", args = [], cwd, env = {}, inheritEnv = true, watch = false } = request; if (!program) { throw new Error("No program specified. Did you set the 'program' property in your launch.json?"); } @@ -247,16 +259,39 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { throw new Error("Program must be a JavaScript or TypeScript file."); } - const argz = ["--inspect-wait=0", ...args]; + const finalArgs = [...args]; + const isTest = isTestJavaScript(program); + if (isTest) { + finalArgs.unshift("test"); + } + if (watch) { - argz.push(watch === "hot" ? "--hot" : "--watch"); + finalArgs.push(watch === "hot" ? "--hot" : "--watch"); + } + + const finalEnv = inheritEnv + ? { + ...process.env, + ...env, + } + : { + ...env, + }; + + finalEnv["BUN_INSPECT"] = `1${this.#url}`; + finalEnv["BUN_INSPECT_NOTIFY"] = `unix://${this.#inspector.unix}`; + + if (isTest) { + finalEnv["FORCE_COLOR"] = "1"; + } else { + // https://github.com/microsoft/vscode/issues/571 + finalEnv["NO_COLOR"] = "1"; } - console.log(argz); - const subprocess = spawn(runtime, [...argz, program], { - stdio: ["ignore", "pipe", "pipe", "pipe"], + const subprocess = spawn(runtime, [...finalArgs, program], { + stdio: ["ignore", "pipe", "pipe"], cwd, - env: inheritEnv ? { ...process.env, ...env } : env, + env: finalEnv, }); subprocess.on("spawn", () => { @@ -269,31 +304,40 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { }); }); - subprocess.on("exit", code => { + subprocess.on("exit", (code, signal) => { this.#emit("exited", { exitCode: code ?? -1, }); this.#process = undefined; }); - const stdout: string[] = []; subprocess.stdout!.on("data", data => { - if (!this.#url) { - const text = data.toString(); - stdout.push(text); - const url = (this.#url = parseUrlMaybe(text)); - this.#inspector.start(url); - } else if (stdout.length) { - stdout.length = 0; + const text = data.toString(); + this.#stdout?.(text); + + if (isTest) { + this.#emit("output", { + category: "stdout", + output: text, + source: { + path: program, + }, + }); } }); - const stderr: string[] = []; subprocess.stderr!.on("data", data => { - if (!this.#url) { - stderr.push(data.toString()); - } else if (stderr.length) { - stderr.length = 0; + const text = data.toString(); + this.#stderr?.(text); + + if (isTest) { + this.#emit("output", { + category: "stdout", // Not stderr, since VSCode will highlight it as red. + output: text, + source: { + path: program, + }, + }); } }); @@ -317,11 +361,7 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { throw new Error(`Program exited with code ${reason} before the debugger could attached.`); } - for (let retries = 0; !this.#url && retries < 10; retries++) { - await new Promise(resolve => setTimeout(resolve, 100 * retries)); - } - - if (this.#url) { + if (await this.#start()) { return; } @@ -334,42 +374,68 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { const { stdout: version } = spawnSync(runtime, ["--version"], { stdio: "pipe", encoding: "utf-8" }); - if (parse(version, true) && compare("0.8.0", version, true)) { - throw new Error( - `Bun v${version.trim()} does not have debugger support. Please upgrade to v0.8 or later by running: \`bun upgrade\``, - ); + const minVersion = "0.8.2"; + if (parse(version, true) && compare(minVersion, version, true)) { + throw new Error(`This extension requires Bun v${minVersion} or later. Please upgrade by running: bun upgrade`); } - for (const message of stderr) { + throw new Error("Program started, but the debugger could not be attached."); + } + + async #start(url?: string | URL): Promise<boolean> { + if (url) { + this.#url = new URL(url); + } + + for (let i = 0; i < 5; i++) { + const ok = await this.#inspector.start(url); + if (ok) { + return true; + } + + await new Promise(resolve => setTimeout(resolve, 100 * i)); + } + + return false; + } + + async attach(request: DAP.AttachRequest): Promise<void> { + try { + await this.#attach(request); + } catch (error) { + // Some clients, like VSCode, will show a system-level popup when a `launch` request fails. + // Instead, we want to show the error as a sidebar notification. + const { message } = unknownToError(error); this.#emit("output", { category: "stderr", - output: message, - source: { - path: program, - }, + output: `Failed to start debugger.\n${message}`, }); + this.#emit("terminated"); } + } + + async #attach(request: AttachRequest): Promise<void> { + const { url } = request; - for (const message of stdout) { + if (this.#url.href === url) { this.#emit("output", { - category: "stdout", - output: message, - source: { - path: program, - }, + category: "debug console", + output: "Debugger attached.\n", }); + + this.configurationDone(); + return; } - throw new Error("Program started, but the debugger could not be attached."); - } + if (await this.#start(url)) { + this.configurationDone(); + return; + } - attach(request: AttachRequest): void { - const { url } = request; - this.#inspector.start(parseUrl(url)); + throw new Error("Failed to attach to program."); } terminate(): void { - this.#terminated = true; this.#process?.kill(); } @@ -468,20 +534,20 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { if (!numberIsValid(line)) { return 0; } - if (this.#initialized?.linesStartAt1) { - return line - 1; + if (!this.#initialized?.linesStartAt1) { + return line; } - return line; + return line - 1; } #columnTo0BasedColumn(column?: number): number { if (!numberIsValid(column)) { return 0; } - if (this.#initialized?.columnsStartAt1) { - return column - 1; + if (!this.#initialized?.columnsStartAt1) { + return column; } - return column; + return column - 1; } #originalLocation( @@ -505,17 +571,17 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { } #lineFrom0BasedLine(line?: number): number { - if (this.#initialized?.linesStartAt1) { - return numberIsValid(line) ? line + 1 : 1; + if (!this.#initialized?.linesStartAt1) { + return numberIsValid(line) ? line : 0; } - return numberIsValid(line) ? line : 0; + return numberIsValid(line) ? line + 1 : 1; } #columnFrom0BasedColumn(column?: number): number { - if (this.#initialized?.columnsStartAt1) { - return numberIsValid(column) ? column + 1 : 1; + if (!this.#initialized?.columnsStartAt1) { + return numberIsValid(column) ? column : 0; } - return numberIsValid(column) ? column : 0; + return numberIsValid(column) ? column + 1 : 1; } async setBreakpoints(request: DAP.SetBreakpointsRequest): Promise<DAP.SetBreakpointsResponse> { @@ -788,9 +854,12 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { this.#emit("initialized"); } - ["Inspector.disconnected"](error?: Error): void { - if (this.#connected && this.#process?.exitCode === null) { - this.#url = undefined; + async ["Inspector.disconnected"](error?: Error): Promise<void> { + if (this.#connected && this.#process?.exitCode === null && (await this.#start())) { + return; + } + + if (!this.#connected) { return; } @@ -799,14 +868,6 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { output: "Debugger detached.\n", }); - if (error && !this.#terminated) { - const { message } = error; - this.#emit("output", { - category: "stderr", - output: `${message}\n`, - }); - } - this.#emit("terminated"); this.#reset(); } @@ -942,8 +1003,7 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { const variables = parameters.map((parameter, i) => { const variable = this.#addVariable(parameter, { name: `${i}` }); - const { value } = variable; - output += value + " "; + output += remoteObjectToString(parameter, true) + " "; return variable; }); @@ -1371,7 +1431,6 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { } close(): void { - this.#terminated = true; this.#process?.kill(); this.#inspector.close(); this.#reset(); @@ -1389,8 +1448,6 @@ export class DebugAdapter implements IDebugAdapter, InspectorListener { this.#launched = undefined; this.#initialized = undefined; this.#connected = undefined; - this.#terminated = undefined; - this.#url = undefined; } } @@ -1598,6 +1655,10 @@ function isJavaScript(path: string): boolean { return /\.(c|m)?(j|t)sx?$/.test(path); } +function isTestJavaScript(path: string): boolean { + return /\.(test|spec)\.(c|m)?(j|t)sx?$/.test(path); +} + function parseUrl(hostname?: string, port?: number): URL { hostname ||= "localhost"; port ||= 6499; @@ -1681,8 +1742,6 @@ function consoleLevelToAnsiColor(level: JSC.Console.ConsoleMessage["level"]): st return "\u001b[33m"; case "error": return "\u001b[31m"; - case "debug": - return "\u001b[36m"; } return undefined; } diff --git a/packages/bun-debug-adapter-protocol/debugger/capabilities.ts b/packages/bun-debug-adapter-protocol/src/debugger/capabilities.ts index 3ba968e86..7de639712 100644 --- a/packages/bun-debug-adapter-protocol/debugger/capabilities.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/capabilities.ts @@ -1,4 +1,4 @@ -import type { DAP } from ".."; +import type { DAP } from "../protocol"; const capabilities: DAP.Capabilities = { /** diff --git a/packages/bun-debug-adapter-protocol/debugger/fixtures/with-sourcemap.js b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/with-sourcemap.js index 6c16a1202..6c16a1202 100644 --- a/packages/bun-debug-adapter-protocol/debugger/fixtures/with-sourcemap.js +++ b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/with-sourcemap.js diff --git a/packages/bun-debug-adapter-protocol/debugger/fixtures/with-sourcemap.ts b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/with-sourcemap.ts index f245ebf76..f245ebf76 100644 --- a/packages/bun-debug-adapter-protocol/debugger/fixtures/with-sourcemap.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/with-sourcemap.ts diff --git a/packages/bun-debug-adapter-protocol/debugger/fixtures/without-sourcemap.js b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/without-sourcemap.js index 6a5d9a948..6a5d9a948 100644 --- a/packages/bun-debug-adapter-protocol/debugger/fixtures/without-sourcemap.js +++ b/packages/bun-debug-adapter-protocol/src/debugger/fixtures/without-sourcemap.js diff --git a/packages/bun-debug-adapter-protocol/debugger/sourcemap.test.ts b/packages/bun-debug-adapter-protocol/src/debugger/sourcemap.test.ts index 44d9ca362..44d9ca362 100644 --- a/packages/bun-debug-adapter-protocol/debugger/sourcemap.test.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/sourcemap.test.ts diff --git a/packages/bun-debug-adapter-protocol/debugger/sourcemap.ts b/packages/bun-debug-adapter-protocol/src/debugger/sourcemap.ts index adb6dc57d..3b3f05c6b 100644 --- a/packages/bun-debug-adapter-protocol/debugger/sourcemap.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/sourcemap.ts @@ -52,6 +52,7 @@ class ActualSourceMap implements SourceMap { generatedLocation(request: LocationRequest): Location { const { line, column, url } = request; + let lineRange: LineRange; try { const source = this.#getSource(url); @@ -68,6 +69,7 @@ class ActualSourceMap implements SourceMap { message: unknownToError(error), }; } + if (!locationIsValid(lineRange)) { return { line: lineToLine(line), @@ -75,6 +77,7 @@ class ActualSourceMap implements SourceMap { verified: false, }; } + const { line: gline, column: gcolumn } = lineRange; return { line: lineToLine(gline), @@ -85,6 +88,7 @@ class ActualSourceMap implements SourceMap { originalLocation(request: LocationRequest): Location { const { line, column } = request; + let mappedPosition: MappedPosition; try { mappedPosition = this.#sourceMap.originalPositionFor({ @@ -99,6 +103,7 @@ class ActualSourceMap implements SourceMap { message: unknownToError(error), }; } + if (!locationIsValid(mappedPosition)) { return { line: lineToLine(line), @@ -106,6 +111,7 @@ class ActualSourceMap implements SourceMap { verified: false, }; } + const { line: oline, column: ocolumn } = mappedPosition; return { line: lineTo0BasedLine(oline), diff --git a/packages/bun-debug-adapter-protocol/protocol/index.d.ts b/packages/bun-debug-adapter-protocol/src/protocol/index.d.ts index abf9ecdec..abf9ecdec 100644 --- a/packages/bun-debug-adapter-protocol/protocol/index.d.ts +++ b/packages/bun-debug-adapter-protocol/src/protocol/index.d.ts diff --git a/packages/bun-debug-adapter-protocol/src/protocol/protocol.json b/packages/bun-debug-adapter-protocol/src/protocol/protocol.json new file mode 100644 index 000000000..00a2ab014 --- /dev/null +++ b/packages/bun-debug-adapter-protocol/src/protocol/protocol.json @@ -0,0 +1,3761 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Debug Adapter Protocol", + "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", + "type": "object", + "definitions": { + "ProtocolMessage": { + "type": "object", + "title": "Base Protocol", + "description": "Base class of requests, responses, and events.", + "properties": { + "seq": { + "type": "integer", + "description": "Sequence number of the message (also known as message ID). The `seq` for the first message sent by a client or debug adapter is 1, and for each subsequent message is 1 greater than the previous message sent by that actor. `seq` can be used to order requests, responses, and events, and to associate requests with their corresponding responses. For protocol messages of type `request` the sequence number can be used to cancel the request." + }, + "type": { "type": "string", "description": "Message type.", "_enum": ["request", "response", "event"] } + }, + "required": ["seq", "type"] + }, + "Request": { + "allOf": [ + { "$ref": "#/definitions/ProtocolMessage" }, + { + "type": "object", + "description": "A client or debug adapter initiated request.", + "properties": { + "type": { "type": "string", "enum": ["request"] }, + "command": { "type": "string", "description": "The command to execute." }, + "arguments": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Object containing arguments for the command." + } + }, + "required": ["type", "command"] + } + ] + }, + "Event": { + "allOf": [ + { "$ref": "#/definitions/ProtocolMessage" }, + { + "type": "object", + "description": "A debug adapter initiated event.", + "properties": { + "type": { "type": "string", "enum": ["event"] }, + "event": { "type": "string", "description": "Type of event." }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Event-specific information." + } + }, + "required": ["type", "event"] + } + ] + }, + "Response": { + "allOf": [ + { "$ref": "#/definitions/ProtocolMessage" }, + { + "type": "object", + "description": "Response for a request.", + "properties": { + "type": { "type": "string", "enum": ["response"] }, + "request_seq": { "type": "integer", "description": "Sequence number of the corresponding request." }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf true, the request was successful and the `body` attribute may contain the result of the request.\nIf the value is false, the attribute `message` contains the error in short form and the `body` may contain additional information (see `ErrorResponse.body.error`)." + }, + "command": { "type": "string", "description": "The command requested." }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if `success` is false.\nThis raw error might be interpreted by the client and is not shown in the UI.\nSome predefined values exist.", + "_enum": ["cancelled", "notStopped"], + "enumDescriptions": [ + "the request was cancelled.", + "the request may be retried once the adapter is in a 'stopped' state." + ] + }, + "body": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Contains request result if success is true and error details if success is false." + } + }, + "required": ["type", "request_seq", "success", "command"] + } + ] + }, + "ErrorResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "On error (whenever `success` is false), the body can provide more details.", + "properties": { + "body": { + "type": "object", + "properties": { + "error": { "$ref": "#/definitions/Message", "description": "A structured error message." } + } + } + }, + "required": ["body"] + } + ] + }, + "CancelRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The `cancel` request is used by the client in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence. Clients should only call this request if the corresponding capability `supportsCancelRequest` is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honoring this request but there are no guarantees.\nThe `cancel` request may return an error if it could not cancel an operation but a client should refrain from presenting this error to end users.\nThe request that got cancelled still needs to send a response back. This can either be a normal result (`success` attribute true) or an error response (`success` attribute false and the `message` set to `cancelled`).\nReturning partial results from a cancelled request is possible but please note that a client has no generic way for detecting that a response is partial or not.\nThe progress that got cancelled still needs to send a `progressEnd` event back.\n A client should not assume that progress just got cancelled after sending the `cancel` request.", + "properties": { + "command": { "type": "string", "enum": ["cancel"] }, + "arguments": { "$ref": "#/definitions/CancelArguments" } + }, + "required": ["command"] + } + ] + }, + "CancelArguments": { + "type": "object", + "description": "Arguments for `cancel` request.", + "properties": { + "requestId": { + "type": "integer", + "description": "The ID (attribute `seq`) of the request to cancel. If missing no request is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + }, + "progressId": { + "type": "string", + "description": "The ID (attribute `progressId`) of the progress to cancel. If missing no progress is cancelled.\nBoth a `requestId` and a `progressId` can be specified in one request." + } + } + }, + "CancelResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `cancel` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "InitializedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "title": "Events", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. `setBreakpoints`, `setExceptionBreakpoints`).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the `initialize` request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends `initialized` event (after the `initialize` request has returned)\n- client sends zero or more `setBreakpoints` requests\n- client sends one `setFunctionBreakpoints` request (if corresponding capability `supportsFunctionBreakpoints` is true)\n- client sends a `setExceptionBreakpoints` request if one or more `exceptionBreakpointFilters` have been defined (or if `supportsConfigurationDoneRequest` is not true)\n- client sends other future configuration requests\n- client sends one `configurationDone` request to indicate the end of the configuration.", + "properties": { "event": { "type": "string", "enum": ["initialized"] } }, + "required": ["event"] + } + ] + }, + "StoppedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a breakpoint previously set, a stepping request has completed, by executing a debugger statement etc.", + "properties": { + "event": { "type": "string", "enum": ["stopped"] }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the `description` attribute is missing (but it must not be translated).", + "_enum": [ + "step", + "breakpoint", + "exception", + "pause", + "entry", + "goto", + "function breakpoint", + "data breakpoint", + "instruction breakpoint" + ] + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and can be translated." + }, + "threadId": { "type": "integer", "description": "The thread which was stopped." }, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of true hints to the client that this event should not change the focus." + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is `exception`, text contains the exception name. This string is shown in the UI." + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If `allThreadsStopped` is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given `threadId` can be expanded." + }, + "hitBreakpointIds": { + "type": "array", + "items": { "type": "integer" }, + "description": "Ids of the breakpoints that triggered the event. In most cases there is only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } + }, + "required": ["reason"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ContinuedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. `launch` or `continue`.\nIt is only necessary to send a `continued` event if there was no previous request that implied this.", + "properties": { + "event": { "type": "string", "enum": ["continued"] }, + "body": { + "type": "object", + "properties": { + "threadId": { "type": "integer", "description": "The thread which was continued." }, + "allThreadsContinued": { + "type": "boolean", + "description": "If `allThreadsContinued` is true, a debug adapter can announce that all threads have continued." + } + }, + "required": ["threadId"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ExitedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the debuggee has exited and returns its exit code.", + "properties": { + "event": { "type": "string", "enum": ["exited"] }, + "body": { + "type": "object", + "properties": { + "exitCode": { "type": "integer", "description": "The exit code returned from the debuggee." } + }, + "required": ["exitCode"] + } + }, + "required": ["event", "body"] + } + ] + }, + "TerminatedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", + "properties": { + "event": { "type": "string", "enum": ["terminated"] }, + "body": { + "type": "object", + "properties": { + "restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "A debug adapter may set `restart` to true (or to an arbitrary object) to request that the client restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute `__restart` to the `launch` and `attach` requests." + } + } + } + }, + "required": ["event"] + } + ] + }, + "ThreadEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that a thread has started or exited.", + "properties": { + "event": { "type": "string", "enum": ["thread"] }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": ["started", "exited"] + }, + "threadId": { "type": "integer", "description": "The identifier of the thread." } + }, + "required": ["reason", "threadId"] + } + }, + "required": ["event", "body"] + } + ] + }, + "OutputEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the target has produced some output.", + "properties": { + "event": { "type": "string", "enum": ["output"] }, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified or if the category is not understood by the client, `console` is assumed.", + "_enum": ["console", "important", "stdout", "stderr", "telemetry"], + "enumDescriptions": [ + "Show the output in the client's default message UI, e.g. a 'debug console'. This category should only be used for informational output from the debugger (as opposed to the debuggee).", + "A hint for the client to show the output in the client's UI for important and highly visible information, e.g. as a popup notification. This category should only be used for important messages from the debugger (as opposed to the debuggee). Since this category value is a hint, clients might ignore the hint and assume the `console` category.", + "Show the output as normal program output from the debuggee.", + "Show the output as error program output from the debuggee.", + "Send the output to telemetry instead of showing it to the user." + ] + }, + "output": { "type": "string", "description": "The output to report." }, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": ["start", "startCollapsed", "end"], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe `output` attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe `output` attribute becomes the name of the group and is not indented.", + "End the current group and decrease the indentation of subsequent output events.\nA non-empty `output` attribute is shown as the unindented end of the group." + ] + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute `variablesReference` exists and its value is > 0, the output contains objects which can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "The source location's line where the output was produced." + }, + "column": { + "type": "integer", + "description": "The position in `line` where the output was produced. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "data": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Additional data to report. For the `telemetry` category the data is sent to telemetry, for the other categories the data is shown in JSON format." + } + }, + "required": ["output"] + } + }, + "required": ["event", "body"] + } + ] + }, + "BreakpointEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that some information about a breakpoint has changed.", + "properties": { + "event": { "type": "string", "enum": ["breakpoint"] }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": ["changed", "new", "removed"] + }, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The `id` attribute is used to find the target breakpoint, the other attributes are used as the new values." + } + }, + "required": ["reason", "breakpoint"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ModuleEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that some information about a module has changed.", + "properties": { + "event": { "type": "string", "enum": ["module"] }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": ["new", "changed", "removed"] + }, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of `removed` only the module id is used." + } + }, + "required": ["reason", "module"] + } + }, + "required": ["event", "body"] + } + ] + }, + "LoadedSourceEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", + "properties": { + "event": { "type": "string", "enum": ["loadedSource"] }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": ["new", "changed", "removed"] + }, + "source": { "$ref": "#/definitions/Source", "description": "The new, changed, or removed source." } + }, + "required": ["reason", "source"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ProcessEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", + "properties": { + "event": { "type": "string", "enum": ["process"] }, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property is missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If true, the process is running on the same computer as the debug adapter." + }, + "startMethod": { + "type": "string", + "enum": ["launch", "attach", "attachForSuspendedLaunch"], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } + }, + "required": ["name"] + } + }, + "required": ["event", "body"] + } + ] + }, + "CapabilitiesEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the client and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a client can only be expected to make a 'best effort' in honoring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", + "properties": { + "event": { "type": "string", "enum": ["capabilities"] }, + "body": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": ["capabilities"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ProgressStartEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event signals that a long running operation is about to start and provides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { "type": "string", "enum": ["progressStart"] }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that can be used in subsequent `progressUpdate` and `progressEnd` events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." + }, + "title": { + "type": "string", + "description": "Short title of the progress reporting. Shown in the UI to describe the long running operation." + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit progress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." + }, + "cancellable": { + "type": "boolean", + "description": "If true, the request that reports progress may be cancelled with a `cancel` request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { "type": "string", "description": "More detailed progress message." }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": ["progressId", "title"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ProgressUpdateEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event signals that the progress reporting needs to be updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { "type": "string", "enum": ["progressUpdate"] }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `progressStart` event." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Progress percentage to display (value range: 0 to 100). If omitted no percentage is shown." + } + }, + "required": ["progressId"] + } + }, + "required": ["event", "body"] + } + ] + }, + "ProgressEndEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event signals the end of the progress reporting with a final message.\nThis event should only be sent if the corresponding capability `supportsProgressReporting` is true.", + "properties": { + "event": { "type": "string", "enum": ["progressEnd"] }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial `ProgressStartEvent`." + }, + "message": { + "type": "string", + "description": "More detailed progress message. If omitted, the previous message (if any) is used." + } + }, + "required": ["progressId"] + } + }, + "required": ["event", "body"] + } + ] + }, + "InvalidatedEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the corresponding capability `supportsInvalidatedEvent` is true.", + "properties": { + "event": { "type": "string", "enum": ["invalidated"] }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honoring the areas but there are no guarantees. If this property is missing, empty, or if values are not understood, the client should assume a single value `all`.", + "items": { "$ref": "#/definitions/InvalidatedAreas" } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the `threadId` is ignored)." + } + } + } + }, + "required": ["event", "body"] + } + ] + }, + "MemoryEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "This event indicates that some memory range has been updated. It should only be sent if the corresponding capability `supportsMemoryEvent` is true.\nClients typically react to the event by re-issuing a `readMemory` request if they show the memory identified by the `memoryReference` and if the updated memory range overlaps the displayed range. Clients should not make assumptions how individual memory references relate to each other, so they should not assume that they are part of a single continuous address range and might overlap.\nDebug adapters can use this event to indicate that the contents of a memory range has changed due to some other request like `setVariable` or `setExpression`. Debug adapters are not expected to emit this event for each and every memory change of a running program, because that information is typically not available from debuggers and it would flood clients with too many events.", + "properties": { + "event": { "type": "string", "enum": ["memory"] }, + "body": { + "type": "object", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference of a memory range that has been updated." + }, + "offset": { + "type": "integer", + "description": "Starting offset in bytes where memory has been updated. Can be negative." + }, + "count": { "type": "integer", "description": "Number of bytes updated." } + }, + "required": ["memoryReference", "offset", "count"] + } + }, + "required": ["event", "body"] + } + ] + }, + "RunInTerminalRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "title": "Reverse Requests", + "description": "This request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the corresponding client capability `supportsRunInTerminalRequest` is true.\nClient implementations of `runInTerminal` are free to run the command however they choose including issuing the command to a command line interpreter (aka 'shell'). Argument strings passed to the `runInTerminal` request must arrive verbatim in the command to be run. As a consequence, clients which use a shell are responsible for escaping any special shell characters in the argument strings to prevent them from being interpreted (and modified) by the shell.\nSome users may wish to take advantage of shell processing in the argument strings. For clients which implement `runInTerminal` using an intermediary shell, the `argsCanBeInterpretedByShell` property can be set to true. In this case the client is requested not to escape any special shell characters in the argument strings.", + "properties": { + "command": { "type": "string", "enum": ["runInTerminal"] }, + "arguments": { "$ref": "#/definitions/RunInTerminalRequestArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "RunInTerminalRequestArguments": { + "type": "object", + "description": "Arguments for `runInTerminal` request.", + "properties": { + "kind": { + "type": "string", + "enum": ["integrated", "external"], + "description": "What kind of terminal to launch. Defaults to `integrated` if not specified." + }, + "title": { "type": "string", "description": "Title of the terminal." }, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." + }, + "args": { + "type": "array", + "items": { "type": "string" }, + "description": "List of arguments. The first argument is the command to run." + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": ["string", "null"], + "description": "A string is a proper value for an environment variable. The value `null` removes the variable from the environment." + } + }, + "argsCanBeInterpretedByShell": { + "type": "boolean", + "description": "This property should only be set if the corresponding capability `supportsArgsCanBeInterpretedByShell` is true. If the client uses an intermediary shell to launch the application, then the client must not attempt to escape characters with special meanings for the shell. The user is fully responsible for escaping as needed and that arguments using special characters may not be portable across shells." + } + }, + "required": ["args", "cwd"] + }, + "RunInTerminalResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `runInTerminal` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } + }, + "required": ["body"] + } + ] + }, + "StartDebuggingRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "This request is sent from the debug adapter to the client to start a new debug session of the same type as the caller.\nThis request should only be sent if the corresponding client capability `supportsStartDebuggingRequest` is true.\nA client implementation of `startDebugging` should start a new debug session (of the same type as the caller) in the same way that the caller's session was started. If the client supports hierarchical debug sessions, the newly created session can be treated as a child of the caller session.", + "properties": { + "command": { "type": "string", "enum": ["startDebugging"] }, + "arguments": { "$ref": "#/definitions/StartDebuggingRequestArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StartDebuggingRequestArguments": { + "type": "object", + "description": "Arguments for `startDebugging` request.", + "properties": { + "configuration": { + "type": "object", + "additionalProperties": true, + "description": "Arguments passed to the new debug session. The arguments must only contain properties understood by the `launch` or `attach` requests of the debug adapter and they must not contain any client-specific properties (e.g. `type`) or client-specific features (e.g. substitutable 'variables')." + }, + "request": { + "type": "string", + "enum": ["launch", "attach"], + "description": "Indicates whether the new debug session should be started with a `launch` or `attach` request." + } + }, + "required": ["configuration", "request"] + }, + "StartDebuggingResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `startDebugging` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "InitializeRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "title": "Requests", + "description": "The `initialize` request is sent as the first request from the client to the debug adapter in order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded with an `initialize` response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an `initialize` response.\nThe `initialize` request may only be sent once.", + "properties": { + "command": { "type": "string", "enum": ["initialize"] }, + "arguments": { "$ref": "#/definitions/InitializeRequestArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "InitializeRequestArguments": { + "type": "object", + "description": "Arguments for `initialize` request.", + "properties": { + "clientID": { "type": "string", "description": "The ID of the client using this adapter." }, + "clientName": { "type": "string", "description": "The human-readable name of the client using this adapter." }, + "adapterID": { "type": "string", "description": "The ID of the debug adapter." }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { "type": "boolean", "description": "If true all line numbers are 1-based (default)." }, + "columnsStartAt1": { "type": "boolean", "description": "If true all column numbers are 1-based (default)." }, + "pathFormat": { + "type": "string", + "_enum": ["path", "uri"], + "description": "Determines in what format paths are specified. The default is `path`, which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the `type` attribute for variables." + }, + "supportsVariablePaging": { "type": "boolean", "description": "Client supports the paging of variables." }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the `runInTerminal` request." + }, + "supportsMemoryReferences": { "type": "boolean", "description": "Client supports memory references." }, + "supportsProgressReporting": { "type": "boolean", "description": "Client supports progress reporting." }, + "supportsInvalidatedEvent": { "type": "boolean", "description": "Client supports the `invalidated` event." }, + "supportsMemoryEvent": { "type": "boolean", "description": "Client supports the `memory` event." }, + "supportsArgsCanBeInterpretedByShell": { + "type": "boolean", + "description": "Client supports the `argsCanBeInterpretedByShell` attribute on the `runInTerminal` request." + }, + "supportsStartDebuggingRequest": { + "type": "boolean", + "description": "Client supports the `startDebugging` request." + } + }, + "required": ["adapterID"] + }, + "InitializeResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `initialize` request.", + "properties": { + "body": { "$ref": "#/definitions/Capabilities", "description": "The capabilities of this debug adapter." } + } + } + ] + }, + "ConfigurationDoneRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "This request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the `initialized` event).\nClients should only call this request if the corresponding capability `supportsConfigurationDoneRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["configurationDone"] }, + "arguments": { "$ref": "#/definitions/ConfigurationDoneArguments" } + }, + "required": ["command"] + } + ] + }, + "ConfigurationDoneArguments": { "type": "object", "description": "Arguments for `configurationDone` request." }, + "ConfigurationDoneResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `configurationDone` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "LaunchRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if `noDebug` is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { "type": "string", "enum": ["launch"] }, + "arguments": { "$ref": "#/definitions/LaunchRequestArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "LaunchRequestArguments": { + "type": "object", + "description": "Arguments for `launch` request. Additional attributes are implementation specific.", + "properties": { + "noDebug": { + "type": "boolean", + "description": "If true, the launch request should launch the program without enabling debugging." + }, + "__restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "LaunchResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `launch` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "AttachRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The `attach` request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { "type": "string", "enum": ["attach"] }, + "arguments": { "$ref": "#/definitions/AttachRequestArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "AttachRequestArguments": { + "type": "object", + "description": "Arguments for `attach` request. Additional attributes are implementation specific.", + "properties": { + "__restart": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Arbitrary data from the previous, restarted session.\nThe data is sent as the `restart` attribute of the `terminated` event.\nThe client should leave the data intact." + } + } + }, + "AttachResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `attach` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "RestartRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Restarts a debug session. Clients should only call this request if the corresponding capability `supportsRestartRequest` is true.\nIf the capability is missing or has the value false, a typical client emulates `restart` by terminating the debug adapter first and then launching it anew.", + "properties": { + "command": { "type": "string", "enum": ["restart"] }, + "arguments": { "$ref": "#/definitions/RestartArguments" } + }, + "required": ["command"] + } + ] + }, + "RestartArguments": { + "type": "object", + "description": "Arguments for `restart` request.", + "properties": { + "arguments": { + "oneOf": [ + { "$ref": "#/definitions/LaunchRequestArguments" }, + { "$ref": "#/definitions/AttachRequestArguments" } + ], + "description": "The latest version of the `launch` or `attach` configuration." + } + } + }, + "RestartResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `restart` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "DisconnectRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The `disconnect` request asks the debug adapter to disconnect from the debuggee (thus ending the debug session) and then to shut down itself (the debug adapter).\nIn addition, the debug adapter must terminate the debuggee if it was started with the `launch` request. If an `attach` request was used to connect to the debuggee, then the debug adapter must not terminate the debuggee.\nThis implicit behavior of when to terminate the debuggee can be overridden with the `terminateDebuggee` argument (which is only supported by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true).", + "properties": { + "command": { "type": "string", "enum": ["disconnect"] }, + "arguments": { "$ref": "#/definitions/DisconnectArguments" } + }, + "required": ["command"] + } + ] + }, + "DisconnectArguments": { + "type": "object", + "description": "Arguments for `disconnect` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `disconnect` request is part of a restart sequence." + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportTerminateDebuggee` is true." + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportSuspendDebuggee` is true." + } + } + }, + "DisconnectResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `disconnect` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "TerminateRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The `terminate` request is sent from the client to the debug adapter in order to shut down the debuggee gracefully. Clients should only call this request if the capability `supportsTerminateRequest` is true.\nTypically a debug adapter implements `terminate` by sending a software signal which the debuggee intercepts in order to clean things up properly before terminating itself.\nPlease note that this request does not directly affect the state of the debug session: if the debuggee decides to veto the graceful shutdown for any reason by not terminating itself, then the debug session just continues.\nClients can surface the `terminate` request as an explicit command or they can integrate it into a two stage Stop command that first sends `terminate` to request a graceful shutdown, and if that fails uses `disconnect` for a forceful shutdown.", + "properties": { + "command": { "type": "string", "enum": ["terminate"] }, + "arguments": { "$ref": "#/definitions/TerminateArguments" } + }, + "required": ["command"] + } + ] + }, + "TerminateArguments": { + "type": "object", + "description": "Arguments for `terminate` request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this `terminate` request is part of a restart sequence." + } + } + }, + "TerminateResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `terminate` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "BreakpointLocationsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The `breakpointLocations` request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the corresponding capability `supportsBreakpointLocationsRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["breakpointLocations"] }, + "arguments": { "$ref": "#/definitions/BreakpointLocationsArguments" } + }, + "required": ["command"] + } + ] + }, + "BreakpointLocationsArguments": { + "type": "object", + "description": "Arguments for `breakpointLocations` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.reference` must be specified." + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." + }, + "column": { + "type": "integer", + "description": "Start position within `line` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no column is given, the first position in the start line is assumed." + }, + "endLine": { + "type": "integer", + "description": "End line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." + }, + "endColumn": { + "type": "integer", + "description": "End position within `endLine` to search possible breakpoint locations in. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If no end column is given, the last position in the end line is assumed." + } + }, + "required": ["source", "line"] + }, + "BreakpointLocationsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `breakpointLocations` request.\nContains possible locations for source breakpoints.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/BreakpointLocation" }, + "description": "Sorted set of possible breakpoint locations." + } + }, + "required": ["breakpoints"] + } + }, + "required": ["body"] + } + ] + }, + "SetBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a `stopped` event (with reason `breakpoint`) is generated.", + "properties": { + "command": { "type": "string", "enum": ["setBreakpoints"] }, + "arguments": { "$ref": "#/definitions/SetBreakpointsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setBreakpoints` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either `source.path` or `source.sourceReference` must be specified." + }, + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/SourceBreakpoint" }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { "type": "integer" }, + "description": "Deprecated: The code locations of the breakpoints." + }, + "sourceModified": { + "type": "boolean", + "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." + } + }, + "required": ["source"] + }, + "SetBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setBreakpoints` request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the `breakpoints`\n(or the deprecated `lines`) array in the arguments.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/Breakpoint" }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the `breakpoints` (or the deprecated `lines`) array in the arguments." + } + }, + "required": ["breakpoints"] + } + }, + "required": ["body"] + } + ] + }, + "SetFunctionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a `stopped` event (with reason `function breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsFunctionBreakpoints` is true.", + "properties": { + "command": { "type": "string", "enum": ["setFunctionBreakpoints"] }, + "arguments": { "$ref": "#/definitions/SetFunctionBreakpointsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetFunctionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setFunctionBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/FunctionBreakpoint" }, + "description": "The function names of the breakpoints." + } + }, + "required": ["breakpoints"] + }, + "SetFunctionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setFunctionBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/Breakpoint" }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": ["breakpoints"] + } + }, + "required": ["body"] + } + ] + }, + "SetExceptionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request configures the debugger's response to thrown exceptions.\nIf an exception is configured to break, a `stopped` event is fired (with reason `exception`).\nClients should only call this request if the corresponding capability `exceptionBreakpointFilters` returns one or more filters.", + "properties": { + "command": { "type": "string", "enum": ["setExceptionBreakpoints"] }, + "arguments": { "$ref": "#/definitions/SetExceptionBreakpointsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetExceptionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setExceptionBreakpoints` request.", + "properties": { + "filters": { + "type": "array", + "items": { "type": "string" }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. The `filter` and `filterOptions` sets are additive." + }, + "filterOptions": { + "type": "array", + "items": { "$ref": "#/definitions/ExceptionFilterOptions" }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the `exceptionBreakpointFilters` capability. This attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionFilterOptions` is true. The `filter` and `filterOptions` sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { "$ref": "#/definitions/ExceptionOptions" }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsExceptionOptions` is true." + } + }, + "required": ["filters"] + }, + "SetExceptionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setExceptionBreakpoints` request.\nThe response contains an array of `Breakpoint` objects with information about each exception breakpoint or filter. The `Breakpoint` objects are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays given as arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information.\nThe `verified` property of a `Breakpoint` object signals whether the exception breakpoint or filter could be successfully created and whether the condition is valid. In case of an error the `message` property explains the problem. The `id` property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the `breakpoints` array and the enclosing `body` are optional. If these elements are missing a client is not able to show problems for individual exception breakpoints or filters.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/Breakpoint" }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the `filters`, `filterOptions`, `exceptionOptions` arrays in the arguments. If both `filters` and `filterOptions` are given, the returned array must start with `filters` information first, followed by `filterOptions` information." + } + } + } + } + } + ] + }, + "DataBreakpointInfoRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { "type": "string", "enum": ["dataBreakpointInfo"] }, + "arguments": { "$ref": "#/definitions/DataBreakpointInfoArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "DataBreakpointInfoArguments": { + "type": "object", + "description": "Arguments for `dataBreakpointInfo` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "Reference to the variable container if the data breakpoint is requested for a child of the container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { + "type": "string", + "description": "The name of the variable's child to obtain data breakpoint information for.\nIf `variablesReference` isn't specified, this can be an expression." + }, + "frameId": { + "type": "integer", + "description": "When `name` is an expression, evaluate it in the scope of this stack frame. If not specified, the expression is evaluated in the global scope. When `variablesReference` is specified, this property has no effect." + } + }, + "required": ["name"] + }, + "DataBreakpointInfoResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `dataBreakpointInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "dataId": { + "type": ["string", "null"], + "description": "An identifier for the data on which a data breakpoint can be registered with the `setDataBreakpoints` request or null if no data breakpoint is available. If a `variablesReference` or `frameId` is passed, the `dataId` is valid in the current suspended state, otherwise it's valid indefinitely. See 'Lifetime of Object References' in the Overview section for details. Breakpoints set using the `dataId` in the `setDataBreakpoints` request may outlive the lifetime of the associated `dataId`." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { "$ref": "#/definitions/DataBreakpointAccessType" }, + "description": "Attribute lists the available access types for a potential data breakpoint. A UI client could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Attribute indicates that a potential data breakpoint could be persisted across sessions." + } + }, + "required": ["dataId", "description"] + } + }, + "required": ["body"] + } + ] + }, + "SetDataBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a `stopped` event (with reason `data breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsDataBreakpoints` is true.", + "properties": { + "command": { "type": "string", "enum": ["setDataBreakpoints"] }, + "arguments": { "$ref": "#/definitions/SetDataBreakpointsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetDataBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setDataBreakpoints` request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/DataBreakpoint" }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + } + }, + "required": ["breakpoints"] + }, + "SetDataBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setDataBreakpoints` request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/Breakpoint" }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument `breakpoints` array." + } + }, + "required": ["breakpoints"] + } + }, + "required": ["body"] + } + ] + }, + "SetInstructionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a `stopped` event (with reason `instruction breakpoint`) is generated.\nClients should only call this request if the corresponding capability `supportsInstructionBreakpoints` is true.", + "properties": { + "command": { "type": "string", "enum": ["setInstructionBreakpoints"] }, + "arguments": { "$ref": "#/definitions/SetInstructionBreakpointsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for `setInstructionBreakpoints` request", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/InstructionBreakpoint" }, + "description": "The instruction references of the breakpoints" + } + }, + "required": ["breakpoints"] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setInstructionBreakpoints` request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { "$ref": "#/definitions/Breakpoint" }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the `breakpoints` array." + } + }, + "required": ["breakpoints"] + } + }, + "required": ["body"] + } + ] + }, + "ContinueRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request resumes execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.", + "properties": { + "command": { "type": "string", "enum": ["continue"] }, + "arguments": { "$ref": "#/definitions/ContinueArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ContinueArguments": { + "type": "object", + "description": "Arguments for `continue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the argument `singleThread` is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, execution is resumed only for the thread with given `threadId`." + } + }, + "required": ["threadId"] + }, + "ContinueResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `continue` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "The value true (or a missing property) signals to the client that all threads have been resumed. The value false indicates that not all threads were resumed." + } + } + } + }, + "required": ["body"] + } + ] + }, + "NextRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request executes one step (in the given granularity) for the specified thread and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { "type": "string", "enum": ["next"] }, + "arguments": { "$ref": "#/definitions/NextArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "NextArguments": { + "type": "object", + "description": "Arguments for `next` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": ["threadId"] + }, + "NextResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `next` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepInRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request resumes the given thread to step into a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nIf the request cannot step into a target, `stepIn` behaves like the `next` request.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe argument `targetId` can be used to control into which target the `stepIn` should occur.\nThe list of possible targets for a given source line can be retrieved via the `stepInTargets` request.", + "properties": { + "command": { "type": "string", "enum": ["stepIn"] }, + "arguments": { "$ref": "#/definitions/StepInArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StepInArguments": { + "type": "object", + "description": "Arguments for `stepIn` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-into (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "targetId": { "type": "integer", "description": "Id of the target to step into." }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": ["threadId"] + }, + "StepInResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `stepIn` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepOutRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request resumes the given thread to step out (return) from a function/method and allows all other threads to run freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.", + "properties": { + "command": { "type": "string", "enum": ["stepOut"] }, + "arguments": { "$ref": "#/definitions/StepOutArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StepOutArguments": { + "type": "object", + "description": "Arguments for `stepOut` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step-out (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": ["threadId"] + }, + "StepOutResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `stepOut` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepBackRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request executes one backward step (in the given granularity) for the specified thread and allows all other threads to run backward freely by resuming them.\nIf the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true prevents other suspended threads from resuming.\nThe debug adapter first sends the response and then a `stopped` event (with reason `step`) after the step has completed.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { "type": "string", "enum": ["stepBack"] }, + "arguments": { "$ref": "#/definitions/StepBackArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StepBackArguments": { + "type": "object", + "description": "Arguments for `stepBack` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the thread for which to resume execution for one step backwards (of the given granularity)." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, all other suspended threads are not resumed." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Stepping granularity to step. If no granularity is specified, a granularity of `statement` is assumed." + } + }, + "required": ["threadId"] + }, + "StepBackResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `stepBack` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "ReverseContinueRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request resumes backward execution of all threads. If the debug adapter supports single thread execution (see capability `supportsSingleThreadExecutionRequests`), setting the `singleThread` argument to true resumes only the specified thread. If not all threads were resumed, the `allThreadsContinued` attribute of the response should be set to false.\nClients should only call this request if the corresponding capability `supportsStepBack` is true.", + "properties": { + "command": { "type": "string", "enum": ["reverseContinue"] }, + "arguments": { "$ref": "#/definitions/ReverseContinueArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ReverseContinueArguments": { + "type": "object", + "description": "Arguments for `reverseContinue` request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Specifies the active thread. If the debug adapter supports single thread execution (see `supportsSingleThreadExecutionRequests`) and the `singleThread` argument is true, only the thread with this ID is resumed." + }, + "singleThread": { + "type": "boolean", + "description": "If this flag is true, backward execution is resumed only for the thread with given `threadId`." + } + }, + "required": ["threadId"] + }, + "ReverseContinueResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `reverseContinue` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "RestartFrameRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request restarts execution of the specified stack frame.\nThe debug adapter first sends the response and then a `stopped` event (with reason `restart`) after the restart has completed.\nClients should only call this request if the corresponding capability `supportsRestartFrame` is true.", + "properties": { + "command": { "type": "string", "enum": ["restartFrame"] }, + "arguments": { "$ref": "#/definitions/RestartFrameArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "RestartFrameArguments": { + "type": "object", + "description": "Arguments for `restartFrame` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Restart the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": ["frameId"] + }, + "RestartFrameResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `restartFrame` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "GotoRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to execute code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a `stopped` event with reason `goto`.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true (because only then goto targets exist that can be passed as arguments).", + "properties": { + "command": { "type": "string", "enum": ["goto"] }, + "arguments": { "$ref": "#/definitions/GotoArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "GotoArguments": { + "type": "object", + "description": "Arguments for `goto` request.", + "properties": { + "threadId": { "type": "integer", "description": "Set the goto target for this thread." }, + "targetId": { "type": "integer", "description": "The location where the debuggee will continue to run." } + }, + "required": ["threadId", "targetId"] + }, + "GotoResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `goto` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "PauseRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a `stopped` event (with reason `pause`) after the thread has been paused successfully.", + "properties": { + "command": { "type": "string", "enum": ["pause"] }, + "arguments": { "$ref": "#/definitions/PauseArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "PauseArguments": { + "type": "object", + "description": "Arguments for `pause` request.", + "properties": { "threadId": { "type": "integer", "description": "Pause execution for this thread." } }, + "required": ["threadId"] + }, + "PauseResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `pause` request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StackTraceRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance-conscious clients and if the corresponding capability `supportsDelayedStackTraceLoading` is true, stack frames can be retrieved in a piecemeal way with the `startFrame` and `levels` arguments. The response of the `stackTrace` request may contain a `totalFrames` property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of `totalFrames` decide how to proceed. In any case a client should be prepared to receive fewer frames than requested, which is an indication that the end of the stack has been reached.", + "properties": { + "command": { "type": "string", "enum": ["stackTrace"] }, + "arguments": { "$ref": "#/definitions/StackTraceArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StackTraceArguments": { + "type": "object", + "description": "Arguments for `stackTrace` request.", + "properties": { + "threadId": { "type": "integer", "description": "Retrieve the stacktrace for this thread." }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." + }, + "format": { + "$ref": "#/definitions/StackFrameFormat", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": ["threadId"] + }, + "StackTraceResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `stackTrace` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": { "$ref": "#/definitions/StackFrame" }, + "description": "The frames of the stack frame. If the array has length zero, there are no stack frames available.\nThis means that there is no location information available." + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if `totalFrames` is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing `totalFrames` values for subsequent requests can be used to enforce paging in the client." + } + }, + "required": ["stackFrames"] + } + }, + "required": ["body"] + } + ] + }, + "ScopesRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request returns the variable scopes for a given stack frame ID.", + "properties": { + "command": { "type": "string", "enum": ["scopes"] }, + "arguments": { "$ref": "#/definitions/ScopesArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ScopesArguments": { + "type": "object", + "description": "Arguments for `scopes` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for the stack frame identified by `frameId`. The `frameId` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + } + }, + "required": ["frameId"] + }, + "ScopesResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `scopes` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { "$ref": "#/definitions/Scope" }, + "description": "The scopes of the stack frame. If the array has length zero, there are no scopes available." + } + }, + "required": ["scopes"] + } + }, + "required": ["body"] + } + ] + }, + "VariablesRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Retrieves all child variables for the given variable reference.\nA filter can be used to limit the fetched children to either named or indexed children.", + "properties": { + "command": { "type": "string", "enum": ["variables"] }, + "arguments": { "$ref": "#/definitions/VariablesArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "VariablesArguments": { + "type": "object", + "description": "Arguments for `variables` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The variable for which to retrieve its children. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "filter": { + "type": "string", + "enum": ["indexed", "named"], + "description": "Filter to limit the child variables to either named or indexed. If omitted, both types are fetched." + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsVariablePaging` is true." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": ["variablesReference"] + }, + "VariablesResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `variables` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": { "$ref": "#/definitions/Variable" }, + "description": "All (or a range) of variables for the given variable reference." + } + }, + "required": ["variables"] + } + }, + "required": ["body"] + } + ] + }, + "SetVariableRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the corresponding capability `supportsSetVariable` is true.\nIf a debug adapter implements both `setVariable` and `setExpression`, a client will only use `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { "type": "string", "enum": ["setVariable"] }, + "arguments": { "$ref": "#/definitions/SetVariableArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetVariableArguments": { + "type": "object", + "description": "Arguments for `setVariable` request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container. The `variablesReference` must have been obtained in the current suspended state. See 'Lifetime of Object References' in the Overview section for details." + }, + "name": { "type": "string", "description": "The name of the variable in the container." }, + "value": { "type": "string", "description": "The value of the variable." }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the response value." + } + }, + "required": ["variablesReference", "name", "value"] + }, + "SetVariableResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setVariable` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { "type": "string", "description": "The new value of the variable." }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the new value is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": ["value"] + } + }, + "required": ["body"] + } + ] + }, + "SourceRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request retrieves the source code for a given source reference.", + "properties": { + "command": { "type": "string", "enum": ["source"] }, + "arguments": { "$ref": "#/definitions/SourceArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SourceArguments": { + "type": "object", + "description": "Arguments for `source` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "Specifies the source content to load. Either `source.path` or `source.sourceReference` must be specified." + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as `source.sourceReference`.\nThis is provided for backward compatibility since old clients do not understand the `source` attribute." + } + }, + "required": ["sourceReference"] + }, + "SourceResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `source` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "content": { "type": "string", "description": "Content of the source reference." }, + "mimeType": { "type": "string", "description": "Content type (MIME type) of the source." } + }, + "required": ["content"] + } + }, + "required": ["body"] + } + ] + }, + "ThreadsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request retrieves a list of all threads.", + "properties": { "command": { "type": "string", "enum": ["threads"] } }, + "required": ["command"] + } + ] + }, + "ThreadsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `threads` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "threads": { + "type": "array", + "items": { "$ref": "#/definitions/Thread" }, + "description": "All threads." + } + }, + "required": ["threads"] + } + }, + "required": ["body"] + } + ] + }, + "TerminateThreadsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the corresponding capability `supportsTerminateThreadsRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["terminateThreads"] }, + "arguments": { "$ref": "#/definitions/TerminateThreadsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "TerminateThreadsArguments": { + "type": "object", + "description": "Arguments for `terminateThreads` request.", + "properties": { + "threadIds": { + "type": "array", + "items": { "type": "integer" }, + "description": "Ids of threads to be terminated." + } + } + }, + "TerminateThreadsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `terminateThreads` request. This is just an acknowledgement, no body field is required." + } + ] + }, + "ModulesRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the corresponding capability `supportsModulesRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["modules"] }, + "arguments": { "$ref": "#/definitions/ModulesArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ModulesArguments": { + "type": "object", + "description": "Arguments for `modules` request.", + "properties": { + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If `moduleCount` is not specified or 0, all modules are returned." + } + } + }, + "ModulesResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `modules` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { "$ref": "#/definitions/Module" }, + "description": "All modules or range of modules." + }, + "totalModules": { "type": "integer", "description": "The total number of modules available." } + }, + "required": ["modules"] + } + }, + "required": ["body"] + } + ] + }, + "LoadedSourcesRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the corresponding capability `supportsLoadedSourcesRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["loadedSources"] }, + "arguments": { "$ref": "#/definitions/LoadedSourcesArguments" } + }, + "required": ["command"] + } + ] + }, + "LoadedSourcesArguments": { "type": "object", "description": "Arguments for `loadedSources` request." }, + "LoadedSourcesResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `loadedSources` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { "$ref": "#/definitions/Source" }, + "description": "Set of loaded sources." + } + }, + "required": ["sources"] + } + }, + "required": ["body"] + } + ] + }, + "EvaluateRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Evaluates the given expression in the context of the topmost stack frame.\nThe expression has access to any variables and arguments that are in scope.", + "properties": { + "command": { "type": "string", "enum": ["evaluate"] }, + "arguments": { "$ref": "#/definitions/EvaluateArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "EvaluateArguments": { + "type": "object", + "description": "Arguments for `evaluate` request.", + "properties": { + "expression": { "type": "string", "description": "The expression to evaluate." }, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." + }, + "context": { + "type": "string", + "_enum": ["watch", "repl", "hover", "clipboard", "variables"], + "enumDescriptions": [ + "evaluate is called from a watch view context.", + "evaluate is called from a REPL context.", + "evaluate is called to generate the debug hover contents.\nThis value should only be used if the corresponding capability `supportsEvaluateForHovers` is true.", + "evaluate is called to generate clipboard contents.\nThis value should only be used if the corresponding capability `supportsClipboardContext` is true.", + "evaluate is called from a variables view context." + ], + "description": "The context in which the evaluate request is used." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the result.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsValueFormattingOptions` is true." + } + }, + "required": ["expression"] + }, + "EvaluateResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `evaluate` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "result": { "type": "string", "description": "The result of the evaluate request." }, + "type": { + "type": "string", + "description": "The type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of an evaluate result that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "A memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": ["result", "variablesReference"] + } + }, + "required": ["body"] + } + ] + }, + "SetExpressionRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Evaluates the given `value` expression and assigns it to the `expression` which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the corresponding capability `supportsSetExpression` is true.\nIf a debug adapter implements both `setExpression` and `setVariable`, a client uses `setExpression` if the variable has an `evaluateName` property.", + "properties": { + "command": { "type": "string", "enum": ["setExpression"] }, + "arguments": { "$ref": "#/definitions/SetExpressionArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "SetExpressionArguments": { + "type": "object", + "description": "Arguments for `setExpression` request.", + "properties": { + "expression": { "type": "string", "description": "The l-value expression to assign to." }, + "value": { "type": "string", "description": "The value expression to assign to the l-value expression." }, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies how the resulting value should be formatted." + } + }, + "required": ["expression", "value"] + }, + "SetExpressionResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `setExpression` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { "type": "string", "description": "The new value of the expression." }, + "type": { + "type": "string", + "description": "The type of the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the evaluate result is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": ["value"] + } + }, + "required": ["body"] + } + ] + }, + "StepInTargetsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "This request retrieves the possible step-in targets for the specified stack frame.\nThese targets can be used in the `stepIn` request.\nClients should only call this request if the corresponding capability `supportsStepInTargetsRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["stepInTargets"] }, + "arguments": { "$ref": "#/definitions/StepInTargetsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "StepInTargetsArguments": { + "type": "object", + "description": "Arguments for `stepInTargets` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible step-in targets." + } + }, + "required": ["frameId"] + }, + "StepInTargetsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `stepInTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { "$ref": "#/definitions/StepInTarget" }, + "description": "The possible step-in targets of the specified source location." + } + }, + "required": ["targets"] + } + }, + "required": ["body"] + } + ] + }, + "GotoTargetsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the `goto` request.\nClients should only call this request if the corresponding capability `supportsGotoTargetsRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["gotoTargets"] }, + "arguments": { "$ref": "#/definitions/GotoTargetsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "GotoTargetsArguments": { + "type": "object", + "description": "Arguments for `gotoTargets` request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location for which the goto targets are determined." + }, + "line": { "type": "integer", "description": "The line location for which the goto targets are determined." }, + "column": { + "type": "integer", + "description": "The position within `line` for which the goto targets are determined. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": ["source", "line"] + }, + "GotoTargetsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `gotoTargets` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { "$ref": "#/definitions/GotoTarget" }, + "description": "The possible goto targets of the specified location." + } + }, + "required": ["targets"] + } + }, + "required": ["body"] + } + ] + }, + "CompletionsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the corresponding capability `supportsCompletionsRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["completions"] }, + "arguments": { "$ref": "#/definitions/CompletionsArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "CompletionsArguments": { + "type": "object", + "description": "Arguments for `completions` request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text users have typed into the debug console before they asked for completion." + }, + "column": { + "type": "integer", + "description": "The position within `text` for which to determine the completion proposals. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "line": { + "type": "integer", + "description": "A line for which to determine the completion proposals. If missing the first line of the text is assumed." + } + }, + "required": ["text", "column"] + }, + "CompletionsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `completions` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { "$ref": "#/definitions/CompletionItem" }, + "description": "The possible completions for ." + } + }, + "required": ["targets"] + } + }, + "required": ["body"] + } + ] + }, + "ExceptionInfoRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the corresponding capability `supportsExceptionInfoRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["exceptionInfo"] }, + "arguments": { "$ref": "#/definitions/ExceptionInfoArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ExceptionInfoArguments": { + "type": "object", + "description": "Arguments for `exceptionInfo` request.", + "properties": { + "threadId": { "type": "integer", "description": "Thread for which exception information should be retrieved." } + }, + "required": ["threadId"] + }, + "ExceptionInfoResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `exceptionInfo` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "exceptionId": { "type": "string", "description": "ID of the exception that was thrown." }, + "description": { "type": "string", "description": "Descriptive text for the exception." }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised." + }, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } + }, + "required": ["exceptionId", "breakMode"] + } + }, + "required": ["body"] + } + ] + }, + "ReadMemoryRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the corresponding capability `supportsReadMemoryRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["readMemory"] }, + "arguments": { "$ref": "#/definitions/ReadMemoryArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "ReadMemoryArguments": { + "type": "object", + "description": "Arguments for `readMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before reading data. Can be negative." + }, + "count": { "type": "integer", "description": "Number of bytes to read at the specified location and offset." } + }, + "required": ["memoryReference", "count"] + }, + "ReadMemoryResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `readMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that should be skipped before a subsequent `readMemory` request succeeds." + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64. If the decoded length of `data` is less than the requested `count` in the original `readMemory` request, and `unreadableBytes` is zero or omitted, then the client should assume it's reached the end of readable memory." + } + }, + "required": ["address"] + } + } + } + ] + }, + "WriteMemoryRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Writes bytes to memory at the provided location.\nClients should only call this request if the corresponding capability `supportsWriteMemoryRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["writeMemory"] }, + "arguments": { "$ref": "#/definitions/WriteMemoryArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "WriteMemoryArguments": { + "type": "object", + "description": "Arguments for `writeMemory` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location to which data should be written." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before writing data. Can be negative." + }, + "allowPartial": { + "type": "boolean", + "description": "Property to control partial writes. If true, the debug adapter should attempt to write memory even if the entire memory region is not writable. In such a case the debug adapter should stop after hitting the first byte of memory that cannot be written and return the number of bytes written in the response via the `offset` and `bytesWritten` properties.\nIf false or missing, a debug adapter should attempt to verify the region is writable before writing, and fail the response if it is not." + }, + "data": { "type": "string", "description": "Bytes to write, encoded using base64." } + }, + "required": ["memoryReference", "data"] + }, + "WriteMemoryResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `writeMemory` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "offset": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the offset of the first byte of data successfully written. Can be negative." + }, + "bytesWritten": { + "type": "integer", + "description": "Property that should be returned when `allowPartial` is true to indicate the number of bytes starting from address that were successfully written." + } + } + } + } + } + ] + }, + "DisassembleRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the corresponding capability `supportsDisassembleRequest` is true.", + "properties": { + "command": { "type": "string", "enum": ["disassemble"] }, + "arguments": { "$ref": "#/definitions/DisassembleArguments" } + }, + "required": ["command", "arguments"] + } + ] + }, + "DisassembleArguments": { + "type": "object", + "description": "Arguments for `disassemble` request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble." + }, + "offset": { + "type": "integer", + "description": "Offset (in bytes) to be applied to the reference location before disassembling. Can be negative." + }, + "instructionOffset": { + "type": "integer", + "description": "Offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + }, + "resolveSymbols": { + "type": "boolean", + "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } + }, + "required": ["memoryReference", "instructionCount"] + }, + "DisassembleResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to `disassemble` request.", + "properties": { + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { "$ref": "#/definitions/DisassembledInstruction" }, + "description": "The list of disassembled instructions." + } + }, + "required": ["instructions"] + } + } + } + ] + }, + "Capabilities": { + "type": "object", + "title": "Types", + "description": "Information about the capabilities of a debug adapter.", + "properties": { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the `configurationDone` request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." + }, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) `evaluate` request for data hovers." + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": { "$ref": "#/definitions/ExceptionBreakpointsFilter" }, + "description": "Available exception filter options for the `setExceptionBreakpoints` request." + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the `stepBack` and `reverseContinue` requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { "type": "boolean", "description": "The debug adapter supports restarting a frame." }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `gotoTargets` request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `stepInTargets` request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `completions` request." + }, + "completionTriggerCharacters": { + "type": "array", + "items": { "type": "string" }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the `.` character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `modules` request." + }, + "additionalModuleColumns": { + "type": "array", + "items": { "$ref": "#/definitions/ColumnDescriptor" }, + "description": "The set of additional module information exposed by the debug adapter." + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": { "$ref": "#/definitions/ChecksumAlgorithm" }, + "description": "Checksum algorithms supported by the debug adapter." + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the `restart` request. In this case a client should not implement `restart` by terminating and relaunching the adapter but by calling the `restart` request." + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports `exceptionOptions` on the `setExceptionBreakpoints` request." + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a `format` attribute on the `stackTrace`, `variables`, and `evaluate` requests." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the `exceptionInfo` request." + }, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `terminateDebuggee` attribute on the `disconnect` request." + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the `suspendDebuggee` attribute on the `disconnect` request." + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the `startFrame` and `levels` arguments and the `totalFrames` result of the `stackTrace` request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the `loadedSources` request." + }, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports log points by interpreting the `logMessage` attribute of the `SourceBreakpoint`." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminateThreads` request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the `setExpression` request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the `terminate` request." + }, + "supportsDataBreakpoints": { "type": "boolean", "description": "The debug adapter supports data breakpoints." }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `readMemory` request." + }, + "supportsWriteMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the `writeMemory` request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the `disassemble` request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the `cancel` request." + }, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the `breakpointLocations` request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the `clipboard` context value in the `evaluate` request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument `granularity`) for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports `filterOptions` as an argument on the `setExceptionBreakpoints` request." + }, + "supportsSingleThreadExecutionRequests": { + "type": "boolean", + "description": "The debug adapter supports the `singleThread` property on the execution requests (`continue`, `next`, `stepIn`, `stepOut`, `reverseContinue`, `stepBack`)." + } + } + }, + "ExceptionBreakpointsFilter": { + "type": "object", + "description": "An `ExceptionBreakpointsFilter` is shown in the UI as an filter option for configuring how exceptions are dealt with.", + "properties": { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the `setExceptionBreakpoints` request." + }, + "label": { "type": "string", "description": "The name of the filter option. This is shown in the UI." }, + "description": { + "type": "string", + "description": "A help text providing additional information about the exception filter. This string is typically shown as a hover and can be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value false is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." + }, + "conditionDescription": { + "type": "string", + "description": "A help text providing information about the condition. This string is shown as the placeholder text for a text box and can be translated." + } + }, + "required": ["filter", "label"] + }, + "Message": { + "type": "object", + "description": "A structured message object. Used to return errors from requests.", + "properties": { + "id": { + "type": "integer", + "description": "Unique (within a debug adapter implementation) identifier for the message. The purpose of these error IDs is to help extension authors that have the requirement that every user visible error message needs a corresponding error number, so that users or customer support can find information about the specific error more easily." + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form `{name}`.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": { "type": "string", "description": "All dictionary values must be strings." } + }, + "sendTelemetry": { "type": "boolean", "description": "If true send to telemetry." }, + "showUser": { "type": "boolean", "description": "If true show user." }, + "url": { + "type": "string", + "description": "A url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "A label that is presented to the user as the UI for opening the url." + } + }, + "required": ["id", "format"] + }, + "Module": { + "type": "object", + "description": "A Module object represents a row in the modules view.\nThe `id` attribute identifies a module in the modules view and is used in a `module` event for identifying a module for adding, updating or deleting.\nThe `name` attribute is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They show up in the module view if they have a corresponding `ColumnDescriptor`.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names, we recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", + "properties": { + "id": { "type": ["integer", "string"], "description": "Unique identifier for the module." }, + "name": { "type": "string", "description": "A name of the module." }, + "path": { + "type": "string", + "description": "Logical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { "type": "boolean", "description": "True if the module is optimized." }, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { "type": "string", "description": "Version of Module." }, + "symbolStatus": { + "type": "string", + "description": "User-understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc.)" + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." + }, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified, encoded as a RFC 3339 timestamp." + }, + "addressRange": { "type": "string", "description": "Address range covered by this module." } + }, + "required": ["id", "name"] + }, + "ColumnDescriptor": { + "type": "object", + "description": "A `ColumnDescriptor` specifies what module attribute to show in a column of the modules view, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "properties": { + "attributeName": { "type": "string", "description": "Name of the attribute rendered in this column." }, + "label": { "type": "string", "description": "Header UI label of column." }, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." + }, + "type": { + "type": "string", + "enum": ["string", "number", "boolean", "unixTimestampUTC"], + "description": "Datatype of values in this column. Defaults to `string` if not specified." + }, + "width": { "type": "integer", "description": "Width of this column in characters (hint only)." } + }, + "required": ["attributeName", "label"] + }, + "Thread": { + "type": "object", + "description": "A Thread", + "properties": { + "id": { "type": "integer", "description": "Unique identifier for the thread." }, + "name": { "type": "string", "description": "The name of the thread." } + }, + "required": ["id", "name"] + }, + "Source": { + "type": "object", + "description": "A `Source` is a descriptor for source code.\nIt is returned from the debug adapter as part of a `StackFrame` and it is used by clients when specifying breakpoints.", + "properties": { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no `sourceReference` is specified (or its value is 0)." + }, + "sourceReference": { + "type": "integer", + "description": "If the value > 0 the contents of the source must be retrieved through the `source` request (even if a path is specified).\nSince a `sourceReference` is only valid for a session, it can not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present the source in the UI.\nA value of `deemphasize` can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": ["normal", "emphasize", "deemphasize"] + }, + "origin": { + "type": "string", + "description": "The origin of this source. For example, 'internal module', 'inlined content from source map', etc." + }, + "sources": { + "type": "array", + "items": { "$ref": "#/definitions/Source" }, + "description": "A list of sources that are related to this source. These may be the source that generated this source." + }, + "adapterData": { + "type": ["array", "boolean", "integer", "null", "number", "object", "string"], + "description": "Additional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." + }, + "checksums": { + "type": "array", + "items": { "$ref": "#/definitions/Checksum" }, + "description": "The checksums associated with this file." + } + } + }, + "StackFrame": { + "type": "object", + "description": "A Stackframe contains the source location.", + "properties": { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the `scopes` request or to restart the execution of a stack frame." + }, + "name": { "type": "string", "description": "The name of the stack frame, typically a method name." }, + "source": { "$ref": "#/definitions/Source", "description": "The source of the frame." }, + "line": { + "type": "integer", + "description": "The line within the source of the frame. If the source attribute is missing or doesn't exist, `line` is 0 and should be ignored by the client." + }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If attribute `source` is missing or doesn't exist, `column` is 0 and should be ignored by the client." + }, + "endLine": { "type": "integer", "description": "The end line of the range covered by the stack frame." }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the stack frame. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the `restart` request. Clients should only use this if the debug adapter supports the `restart` request and the corresponding capability `supportsRestartRequest` is true. If a debug adapter has this capability, then `canRestart` defaults to `true` if the property is absent." + }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the current instruction pointer in this frame." + }, + "moduleId": { "type": ["integer", "string"], "description": "The module associated with this frame, if any." }, + "presentationHint": { + "type": "string", + "enum": ["normal", "label", "subtle"], + "description": "A hint for how to present this frame in the UI.\nA value of `label` can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of `subtle` can be used to change the appearance of a frame in a 'subtle' way." + } + }, + "required": ["id", "name", "line", "column"] + }, + "Scope": { + "type": "object", + "description": "A `Scope` is a named container for variables. Optionally a scope can map to a source or a range within a source.", + "properties": { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." + }, + "presentationHint": { + "type": "string", + "description": "A hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": ["arguments", "locals", "registers"], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single `registers` scope should be returned from a `scopes` request." + ] + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this information to present the variables in a paged UI and fetch them in chunks." + }, + "expensive": { + "type": "boolean", + "description": "If true, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { "$ref": "#/definitions/Source", "description": "The source for this scope." }, + "line": { "type": "integer", "description": "The start line of the range covered by this scope." }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { "type": "integer", "description": "The end line of the range covered by this scope." }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the scope. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": ["name", "variablesReference", "expensive"] + }, + "Variable": { + "type": "object", + "description": "A Variable is a name/value pair.\nThe `type` attribute is shown if space permits or when hovering over the variable's name.\nThe `kind` attribute is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the `variables` request.\nIf the number of named or indexed children is large, the numbers should be returned via the `namedVariables` and `indexedVariables` attributes.\nThe client can use this information to present the children in a paged UI and fetch them in chunks.", + "properties": { + "name": { "type": "string", "description": "The variable's name." }, + "value": { + "type": "string", + "description": "The variable's value.\nThis can be a multi-line text, e.g. for a function the body of a function.\nFor structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. This helps to identify the structured object in the collapsed state when its children are not yet visible.\nAn empty string can be used if no value should be shown in the UI." + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the corresponding capability `supportsVariableType` is true." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI." + }, + "evaluateName": { + "type": "string", + "description": "The evaluatable name of this variable which can be passed to the `evaluate` request to fetch the variable's value." + }, + "variablesReference": { + "type": "integer", + "description": "If `variablesReference` is > 0, the variable is structured and its children can be retrieved by passing `variablesReference` to the `variables` request as long as execution remains suspended. See 'Lifetime of Object References' in the Overview section for details." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this information to present the children in a paged UI and fetch them in chunks." + }, + "memoryReference": { + "type": "string", + "description": "The memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the corresponding capability `supportsMemoryReferences` is true." + } + }, + "required": ["name", "value", "variablesReference"] + }, + "VariablePresentationHint": { + "type": "object", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI.", + "properties": { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ + "property", + "method", + "class", + "data", + "event", + "baseClass", + "innerClass", + "interface", + "mostDerivedClass", + "virtual", + "dataBreakpoint" + ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introduced by the adapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The `hasDataBreakpoint` attribute should generally be used instead." + ] + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ + "static", + "constant", + "readOnly", + "rawString", + "hasObjectId", + "canHaveObjectId", + "hasSideEffects", + "hasDataBreakpoint" + ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it.", + "Indicates that the object has an Object ID associated with it.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint." + ] + } + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": ["public", "private", "protected", "internal", "final"] + }, + "lazy": { + "description": "If true, clients can present the variable with a UI that supports a specific gesture to trigger its evaluation.\nThis mechanism can be used for properties that require executing code when retrieving their value and where the code execution can be expensive and/or produce side-effects. A typical example are properties based on a getter function.\nPlease note that in addition to the `lazy` flag, the variable's `variablesReference` is expected to refer to a variable that will provide the value through another `variable` request.", + "type": "boolean" + } + } + }, + "BreakpointLocation": { + "type": "object", + "description": "Properties of a breakpoint location returned from the `breakpointLocations` request.", + "properties": { + "line": { "type": "integer", "description": "Start line of breakpoint location." }, + "column": { + "type": "integer", + "description": "The start position of a breakpoint location. Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { + "type": "integer", + "description": "The end line of breakpoint location if the location covers a range." + }, + "endColumn": { + "type": "integer", + "description": "The end position of a breakpoint location (if the location covers a range). Position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": ["line"] + }, + "SourceBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint or logpoint passed to the `setBreakpoints` request.", + "properties": { + "line": { "type": "integer", "description": "The source line of the breakpoint or logpoint." }, + "column": { + "type": "integer", + "description": "Start position within source line of the breakpoint or logpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "condition": { + "type": "string", + "description": "The expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "The expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true.\nIf both this property and `condition` are specified, `hitCondition` should be evaluated only if the `condition` is met, and the debug adapter should stop only if both conditions are met." + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the debug adapter must not 'break' (stop)\nbut log the message instead. Expressions within `{}` are interpolated.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsLogPoints` is true.\nIf either `hitCondition` or `condition` is specified, then the message should only be logged if those conditions are met." + } + }, + "required": ["line"] + }, + "FunctionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setFunctionBreakpoints` request.", + "properties": { + "name": { "type": "string", "description": "The name of the function." }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": ["name"] + }, + "DataBreakpointAccessType": { + "type": "string", + "description": "This enumeration defines all possible access types for data breakpoints.", + "enum": ["read", "write", "readWrite"] + }, + "DataBreakpoint": { + "type": "object", + "description": "Properties of a data breakpoint passed to the `setDataBreakpoints` request.", + "properties": { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the `dataBreakpointInfo` request." + }, + "accessType": { + "$ref": "#/definitions/DataBreakpointAccessType", + "description": "The access type of the data." + }, + "condition": { "type": "string", "description": "An expression for conditional breakpoints." }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed." + } + }, + "required": ["dataId"] + }, + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the `setInstructionBreakpoints` request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an `EvaluateResponse`, `Variable`, `StackFrame`, `GotoTarget`, or `Breakpoint`." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An expression for conditional breakpoints.\nIt is only honored by a debug adapter if the corresponding capability `supportsConditionalBreakpoints` is true." + }, + "hitCondition": { + "type": "string", + "description": "An expression that controls how many hits of the breakpoint are ignored.\nThe debug adapter is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the corresponding capability `supportsHitConditionalBreakpoints` is true." + } + }, + "required": ["instructionReference"] + }, + "Breakpoint": { + "type": "object", + "description": "Information about a breakpoint created in `setBreakpoints`, `setFunctionBreakpoints`, `setInstructionBreakpoints`, or `setDataBreakpoints` requests.", + "properties": { + "id": { + "type": "integer", + "description": "The identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." + }, + "verified": { + "type": "boolean", + "description": "If true, the breakpoint could be set (but not necessarily at the desired location)." + }, + "message": { + "type": "string", + "description": "A message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { "$ref": "#/definitions/Source", "description": "The source where the breakpoint is located." }, + "line": { "type": "integer", "description": "The start line of the actual range covered by the breakpoint." }, + "column": { + "type": "integer", + "description": "Start position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { "type": "integer", "description": "The end line of the actual range covered by the breakpoint." }, + "endColumn": { + "type": "integer", + "description": "End position of the source range covered by the breakpoint. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "A memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "The offset from the instruction reference.\nThis can be negative." + } + }, + "required": ["verified"] + }, + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests `next`, `stepIn`, `stepOut`, and `stepBack`.", + "enum": ["statement", "line", "instruction"], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++)' could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + "StepInTarget": { + "type": "object", + "description": "A `StepInTarget` can be used in the `stepIn` request and determines into which single target the `stepIn` request should step.", + "properties": { + "id": { "type": "integer", "description": "Unique identifier for a step-in target." }, + "label": { "type": "string", "description": "The name of the step-in target (shown in the UI)." }, + "line": { "type": "integer", "description": "The line of the step-in target." }, + "column": { + "type": "integer", + "description": "Start position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + }, + "endLine": { "type": "integer", "description": "The end line of the range covered by the step-in target." }, + "endColumn": { + "type": "integer", + "description": "End position of the range covered by the step in target. It is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based." + } + }, + "required": ["id", "label"] + }, + "GotoTarget": { + "type": "object", + "description": "A `GotoTarget` describes a code location that can be used as a target in the `goto` request.\nThe possible goto targets can be determined via the `gotoTargets` request.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the `goto` request." + }, + "label": { "type": "string", "description": "The name of the goto target (shown in the UI)." }, + "line": { "type": "integer", "description": "The line of the goto target." }, + "column": { "type": "integer", "description": "The column of the goto target." }, + "endLine": { "type": "integer", "description": "The end line of the range covered by the goto target." }, + "endColumn": { "type": "integer", "description": "The end column of the range covered by the goto target." }, + "instructionPointerReference": { + "type": "string", + "description": "A memory reference for the instruction pointer value represented by this target." + } + }, + "required": ["id", "label", "line"] + }, + "CompletionItem": { + "type": "object", + "description": "`CompletionItems` are the suggestions returned from the `completions` request.", + "properties": { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is returned and not an empty string, then it is inserted instead of the label." + }, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. If not returned or an empty string, the `label` is used instead." + }, + "detail": { + "type": "string", + "description": "A human-readable string with additional information about this item, like type or symbol information." + }, + "type": { + "$ref": "#/definitions/CompletionItemType", + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." + }, + "start": { + "type": "integer", + "description": "Start position (within the `text` attribute of the `completions` request) where the completion text is added. The position is measured in UTF-16 code units and the client capability `columnsStartAt1` determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the `column` attribute of the `completions` request." + }, + "length": { + "type": "integer", + "description": "Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced). `selectionStart` is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0." + } + }, + "required": ["label"] + }, + "CompletionItemType": { + "type": "string", + "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", + "enum": [ + "method", + "function", + "constructor", + "field", + "variable", + "class", + "interface", + "module", + "property", + "unit", + "value", + "enum", + "keyword", + "snippet", + "text", + "color", + "file", + "reference", + "customcolor" + ] + }, + "ChecksumAlgorithm": { + "type": "string", + "description": "Names of checksum algorithms that may be supported by a debug adapter.", + "enum": ["MD5", "SHA1", "SHA256", "timestamp"] + }, + "Checksum": { + "type": "object", + "description": "The checksum of an item calculated by the specified algorithm.", + "properties": { + "algorithm": { + "$ref": "#/definitions/ChecksumAlgorithm", + "description": "The algorithm used to calculate this checksum." + }, + "checksum": { "type": "string", "description": "Value of the checksum, encoded as a hexadecimal value." } + }, + "required": ["algorithm", "checksum"] + }, + "ValueFormat": { + "type": "object", + "description": "Provides formatting information for a value.", + "properties": { "hex": { "type": "boolean", "description": "Display the value in hex." } } + }, + "StackFrameFormat": { + "allOf": [ + { "$ref": "#/definitions/ValueFormat" }, + { + "type": "object", + "description": "Provides formatting information for a stack frame.", + "properties": { + "parameters": { "type": "boolean", "description": "Displays parameters for the stack frame." }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { "type": "boolean", "description": "Displays the line number of the stack frame." }, + "module": { "type": "boolean", "description": "Displays the module of the stack frame." }, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } + } + } + ] + }, + "ExceptionFilterOptions": { + "type": "object", + "description": "An `ExceptionFilterOptions` is used to specify an exception filter together with a condition for the `setExceptionBreakpoints` request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the `exceptionBreakpointFilters` capability." + }, + "condition": { + "type": "string", + "description": "An expression for conditional exceptions.\nThe exception breaks into the debugger if the result of the condition is true." + } + }, + "required": ["filterId"] + }, + "ExceptionOptions": { + "type": "object", + "description": "An `ExceptionOptions` assigns configuration options to a set of exceptions.", + "properties": { + "path": { + "type": "array", + "items": { "$ref": "#/definitions/ExceptionPathSegment" }, + "description": "A path that selects a single or multiple exceptions in a tree. If `path` is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Condition when a thrown exception should result in a break." + } + }, + "required": ["breakMode"] + }, + "ExceptionBreakMode": { + "type": "string", + "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", + "enum": ["never", "always", "unhandled", "userUnhandled"] + }, + "ExceptionPathSegment": { + "type": "object", + "description": "An `ExceptionPathSegment` represents a segment in a path that is used to match leafs or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if `negate` is false or missing, or it matches anything except the names provided if `negate` is true.", + "properties": { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." + }, + "names": { + "type": "array", + "items": { "type": "string" }, + "description": "Depending on the value of `negate` the names that should match or not match." + } + }, + "required": ["names"] + }, + "ExceptionDetails": { + "type": "object", + "description": "Detailed information about an exception that has occurred.", + "properties": { + "message": { "type": "string", "description": "Message contained in the exception." }, + "typeName": { "type": "string", "description": "Short type name of the exception object." }, + "fullTypeName": { "type": "string", "description": "Fully-qualified type name of the exception object." }, + "evaluateName": { + "type": "string", + "description": "An expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { "type": "string", "description": "Stack trace at the time the exception was thrown." }, + "innerException": { + "type": "array", + "items": { "$ref": "#/definitions/ExceptionDetails" }, + "description": "Details of the exception contained by this exception, if any." + } + } + }, + "DisassembledInstruction": { + "type": "object", + "description": "Represents a single disassembled instruction.", + "properties": { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with `0x`, or as a decimal value otherwise." + }, + "instructionBytes": { + "type": "string", + "description": "Raw bytes representing the instruction and its operands, in an implementation-defined format." + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." + }, + "location": { + "$ref": "#/definitions/Source", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." + } + }, + "required": ["address", "instruction"] + }, + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the `invalidated` event.", + "_enum": ["all", "stacks", "threads", "variables"], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] + } + } +} diff --git a/packages/bun-debug-adapter-protocol/protocol/schema.d.ts b/packages/bun-debug-adapter-protocol/src/protocol/schema.d.ts index bf6f2d810..bf6f2d810 100644 --- a/packages/bun-debug-adapter-protocol/protocol/schema.d.ts +++ b/packages/bun-debug-adapter-protocol/src/protocol/schema.d.ts diff --git a/packages/bun-debug-adapter-protocol/tsconfig.json b/packages/bun-debug-adapter-protocol/tsconfig.json index bada4ff8f..3b3c098f3 100644 --- a/packages/bun-debug-adapter-protocol/tsconfig.json +++ b/packages/bun-debug-adapter-protocol/tsconfig.json @@ -15,8 +15,7 @@ "forceConsistentCasingInFileNames": true, "inlineSourceMap": true, "allowJs": true, - "types": ["bun-types"], "outDir": "dist", }, - "include": [".", "../bun-types/index.d.ts", "../bun-inspector-protocol/index"] + "include": ["src", "scripts", "../bun-types/index.d.ts", "../bun-inspector-protocol/src"] } diff --git a/packages/bun-inspector-protocol/bun.lockb b/packages/bun-inspector-protocol/bun.lockb Binary files differindex 36874030e..72ffb1f2f 100755 --- a/packages/bun-inspector-protocol/bun.lockb +++ b/packages/bun-inspector-protocol/bun.lockb diff --git a/packages/bun-inspector-protocol/index.ts b/packages/bun-inspector-protocol/index.ts index 5b0d8b43b..c5e46dbf6 100644 --- a/packages/bun-inspector-protocol/index.ts +++ b/packages/bun-inspector-protocol/index.ts @@ -1,3 +1,4 @@ -export type * from "./protocol"; -export type * from "./inspector"; -export * from "./inspector/websocket"; +export type * from "./src/protocol"; +export type * from "./src/inspector"; +export * from "./src/util/preview"; +export * from "./src/inspector/websocket"; diff --git a/packages/bun-inspector-protocol/inspector/fixtures/inspectee.js b/packages/bun-inspector-protocol/inspector/fixtures/inspectee.js deleted file mode 100644 index ea9301171..000000000 --- a/packages/bun-inspector-protocol/inspector/fixtures/inspectee.js +++ /dev/null @@ -1,7 +0,0 @@ -export default { - fetch(request) { - console.log(request); - debugger; - return new Response(); - }, -}; diff --git a/packages/bun-inspector-protocol/inspector/websocket.test.ts b/packages/bun-inspector-protocol/inspector/websocket.test.ts deleted file mode 100644 index 7f5fa0b8c..000000000 --- a/packages/bun-inspector-protocol/inspector/websocket.test.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { afterAll, beforeAll, mock, test, expect } from "bun:test"; -import type { JSC } from ".."; -import type { InspectorListener } from "."; -import { WebSocketInspector } from "./websocket"; -import { sleep, spawn } from "bun"; - -let inspectee: any; -let url: string; - -beforeAll(async () => { - const { pathname } = new URL("fixtures/inspectee.js", import.meta.url); - inspectee = spawn({ - cmd: [process.argv0, "--inspect", pathname], - stdout: "pipe", - stderr: "pipe", - }); - url = await new Promise(async resolve => { - for await (const chunk of inspectee.stdout) { - const text = new TextDecoder().decode(chunk); - const match = /(wss?:\/\/.*:[0-9]+\/.*)/.exec(text); - if (!match) { - continue; - } - const [_, url] = match; - resolve(url); - } - }); -}); - -afterAll(() => { - inspectee?.kill(); -}); - -test( - "WebSocketInspector", - async () => { - const listener: InspectorListener = { - ["Inspector.connected"]: mock((...args) => { - expect(args).toBeEmpty(); - }), - ["Inspector.disconnected"]: mock((error?: Error) => { - expect(error).toBeUndefined(); - }), - ["Debugger.scriptParsed"]: mock((event: JSC.Debugger.ScriptParsedEvent) => { - expect(event).toMatchObject({ - endColumn: expect.any(Number), - endLine: expect.any(Number), - isContentScript: expect.any(Boolean), - module: expect.any(Boolean), - scriptId: expect.any(String), - startColumn: expect.any(Number), - startLine: expect.any(Number), - url: expect.any(String), - }); - }), - }; - const inspector = new WebSocketInspector({ - url, - listener, - }); - inspector.start(); - inspector.send("Runtime.enable"); - inspector.send("Debugger.enable"); - //expect(inspector.send("Runtime.enable")).resolves.toBeEmpty(); - //expect(inspector.send("Debugger.enable")).resolves.toBeEmpty(); - expect(inspector.send("Runtime.evaluate", { expression: "1 + 1" })).resolves.toMatchObject({ - result: { - type: "number", - value: 2, - description: "2", - }, - wasThrown: false, - }); - expect(listener["Inspector.connected"]).toHaveBeenCalled(); - expect(listener["Debugger.scriptParsed"]).toHaveBeenCalled(); - inspector.close(); - expect(inspector.closed).toBeTrue(); - expect(listener["Inspector.disconnected"]).toHaveBeenCalled(); - }, - { - timeout: 100000, - }, -); diff --git a/packages/bun-inspector-protocol/scripts/generate-protocol.ts b/packages/bun-inspector-protocol/scripts/generate-protocol.ts index 8da5fe795..c53153bb4 100644 --- a/packages/bun-inspector-protocol/scripts/generate-protocol.ts +++ b/packages/bun-inspector-protocol/scripts/generate-protocol.ts @@ -1,4 +1,4 @@ -import type { Protocol, Domain, Property } from "../protocol/schema"; +import type { Protocol, Domain, Property } from "../src/protocol/schema"; import { readFileSync, writeFileSync } from "node:fs"; import { spawnSync } from "node:child_process"; diff --git a/packages/bun-inspector-protocol/inspector/index.d.ts b/packages/bun-inspector-protocol/src/inspector/index.d.ts index 4baf4ddc0..7080f1dba 100644 --- a/packages/bun-inspector-protocol/inspector/index.d.ts +++ b/packages/bun-inspector-protocol/src/inspector/index.d.ts @@ -8,7 +8,7 @@ export abstract class Inspector { /** * Starts the inspector. */ - start(...args: unknown[]): void; + start(...args: unknown[]): Promise<boolean>; /** * Sends a request to the debugger. */ diff --git a/packages/bun-inspector-protocol/inspector/websocket.ts b/packages/bun-inspector-protocol/src/inspector/websocket.ts index 71dc60a1e..238d3b2b7 100644 --- a/packages/bun-inspector-protocol/inspector/websocket.ts +++ b/packages/bun-inspector-protocol/src/inspector/websocket.ts @@ -1,10 +1,13 @@ import type { Inspector, InspectorListener } from "."; -import { JSC } from ".."; +import type { JSC } from "../protocol"; import { WebSocket } from "ws"; +import { createServer, type Server } from "node:net"; +import { tmpdir } from "node:os"; export type WebSocketInspectorOptions = { url?: string | URL; listener?: InspectorListener; + logger?: (...messages: unknown[]) => void; }; /** @@ -13,84 +16,115 @@ export type WebSocketInspectorOptions = { export class WebSocketInspector implements Inspector { #url?: URL; #webSocket?: WebSocket; + #ready: Promise<boolean> | undefined; #requestId: number; #pendingRequests: Map<number, (result: unknown) => void>; #pendingMessages: string[]; #listener: InspectorListener; + #log: (...messages: unknown[]) => void; - constructor({ url, listener }: WebSocketInspectorOptions) { + constructor({ url, listener, logger }: WebSocketInspectorOptions) { this.#url = url ? new URL(url) : undefined; - this.#listener = listener ?? {}; this.#requestId = 1; this.#pendingRequests = new Map(); this.#pendingMessages = []; + this.#listener = listener ?? {}; + this.#log = logger ?? (() => {}); } - start(url?: string | URL): void { + async start(url?: string | URL): Promise<boolean> { if (url) { this.#url = new URL(url); } if (this.#url) { - this.#connect(); + const { href } = this.#url; + return this.#connect(href); } + return false; } - #connect(): void { - if (!this.#url) { - return; + async #connect(url: string): Promise<boolean> { + if (this.#ready) { + return this.#ready; } - this.#webSocket?.close(); + let webSocket: WebSocket; try { - console.log("[jsc] connecting", this.#url.href); - webSocket = new WebSocket(this.#url, { + this.#log("connecting:", url); + // @ts-expect-error: Node.js + webSocket = new WebSocket(url, { headers: { - "Ref-Event-Loop": "0", + "Ref-Event-Loop": "1", + }, + finishRequest: (request: import("http").ClientRequest) => { + request.setHeader("Ref-Event-Loop", "1"); + request.end(); }, }); } catch (error) { this.#close(unknownToError(error)); - return; + return false; } + webSocket.addEventListener("open", () => { - console.log("[jsc] connected"); + this.#log("connected"); for (const message of this.#pendingMessages) { this.#send(message); } this.#pendingMessages.length = 0; this.#listener["Inspector.connected"]?.(); }); + webSocket.addEventListener("message", ({ data }) => { if (typeof data === "string") { this.accept(data); } }); + webSocket.addEventListener("error", event => { - console.log("[jsc] error", event); + this.#log("error:", event); this.#close(unknownToError(event)); }); + webSocket.addEventListener("unexpected-response", () => { - console.log("[jsc] unexpected-response"); + this.#log("unexpected-response"); this.#close(new Error("WebSocket upgrade failed")); }); + webSocket.addEventListener("close", ({ code, reason }) => { - console.log("[jsc] closed", code, reason); + this.#log("closed:", code, reason); if (code === 1001) { this.#close(); } else { this.#close(new Error(`WebSocket closed: ${code} ${reason}`.trimEnd())); } }); + this.#webSocket = webSocket; + + const ready = new Promise<boolean>(resolve => { + webSocket.addEventListener("open", () => resolve(true)); + webSocket.addEventListener("close", () => resolve(false)); + webSocket.addEventListener("error", () => resolve(false)); + }).finally(() => { + this.#ready = undefined; + }); + + this.#ready = ready; + + return ready; } + // @ts-ignore send<M extends keyof JSC.RequestMap & keyof JSC.ResponseMap>( method: M, params?: JSC.RequestMap[M] | undefined, ): Promise<JSC.ResponseMap[M]> { const id = this.#requestId++; const request = { id, method, params }; - console.log("[jsc] -->", request); + + this.#log("-->", request); + return new Promise((resolve, reject) => { const done = (result: any) => { this.#pendingRequests.delete(id); @@ -100,6 +134,7 @@ export class WebSocketInspector implements Inspector { resolve(result); } }; + this.#pendingRequests.set(id, done); this.#send(JSON.stringify(request)); }); @@ -113,6 +148,7 @@ export class WebSocketInspector implements Inspector { } return; } + if (!this.#pendingMessages.includes(message)) { this.#pendingMessages.push(message); } @@ -123,35 +159,37 @@ export class WebSocketInspector implements Inspector { try { event = JSON.parse(message); } catch (error) { - console.error("Failed to parse message:", message); + this.#log("Failed to parse message:", message); return; } - console.log("[jsc] <--", event); - if ("id" in event) { - const { id } = event; - const resolve = this.#pendingRequests.get(id); - if (!resolve) { - console.error(`Failed to accept response for unknown ID ${id}:`, event); - return; - } - this.#pendingRequests.delete(id); - if ("error" in event) { - const { error } = event; - const { message } = error; - resolve(new Error(message)); - } else { - const { result } = event; - resolve(result); - } - } else { + + this.#log("<--", event); + + if (!("id" in event)) { const { method, params } = event; try { - // @ts-ignore - this.#listener[method]?.(params); + this.#listener[method]?.(params as any); } catch (error) { - console.error(`Failed to accept ${method} event:`, error); - return; + this.#log(`Failed to accept ${method} event:`, error); } + return; + } + + const { id } = event; + const resolve = this.#pendingRequests.get(id); + if (!resolve) { + this.#log("Failed to accept response with unknown ID:", id); + return; + } + + this.#pendingRequests.delete(id); + if ("error" in event) { + const { error } = event; + const { message } = error; + resolve(new Error(message)); + } else { + const { result } = event; + resolve(result); } } @@ -159,12 +197,14 @@ export class WebSocketInspector implements Inspector { if (!this.#webSocket) { return true; } + const { readyState } = this.#webSocket; switch (readyState) { case WebSocket.CLOSED: case WebSocket.CLOSING: return true; } + return false; } @@ -173,13 +213,53 @@ export class WebSocketInspector implements Inspector { } #close(error?: Error): void { + for (const resolve of this.#pendingRequests.values()) { + resolve(error ?? new Error("WebSocket closed")); + } + this.#pendingRequests.clear(); + this.#listener["Inspector.disconnected"]?.(error); + } +} + +export class UnixWebSocketInspector extends WebSocketInspector { + #unix: string; + #server: Server; + #ready: Promise<unknown>; + startDebugging?: () => void; + + constructor(options: WebSocketInspectorOptions) { + super(options); + this.#unix = unixSocket(); + this.#server = createServer(); + this.#server.listen(this.#unix); + this.#ready = this.#wait().then(() => { + setTimeout(() => { + this.start().then(() => this.startDebugging?.()); + }, 1); + }); + } + + get unix(): string { + return this.#unix; + } + + #wait(): Promise<void> { + return new Promise(resolve => { + console.log("waiting"); + this.#server.once("connection", socket => { + console.log("received"); + socket.once("data", resolve); + }); + }); + } + + async start(url?: string | URL): Promise<boolean> { + await this.#ready; try { - this.#listener["Inspector.disconnected"]?.(error); + console.log("starting"); + return await super.start(url); } finally { - for (const resolve of this.#pendingRequests.values()) { - resolve(error ?? new Error("WebSocket closed")); - } - this.#pendingRequests.clear(); + this.#ready = this.#wait(); } } } @@ -188,9 +268,15 @@ function unknownToError(input: unknown): Error { if (input instanceof Error) { return input; } + if (typeof input === "object" && input !== null && "message" in input) { const { message } = input; return new Error(`${message}`); } + return new Error(`${input}`); } + +function unixSocket(): string { + return `${tmpdir()}/bun-inspect-${Math.random().toString(36).slice(2)}.sock`; +} diff --git a/packages/bun-inspector-protocol/protocol/index.d.ts b/packages/bun-inspector-protocol/src/protocol/index.d.ts index ec88ecf36..ec88ecf36 100644 --- a/packages/bun-inspector-protocol/protocol/index.d.ts +++ b/packages/bun-inspector-protocol/src/protocol/index.d.ts diff --git a/packages/bun-inspector-protocol/protocol/jsc/index.d.ts b/packages/bun-inspector-protocol/src/protocol/jsc/index.d.ts index 88e7f0a90..88e7f0a90 100644 --- a/packages/bun-inspector-protocol/protocol/jsc/index.d.ts +++ b/packages/bun-inspector-protocol/src/protocol/jsc/index.d.ts diff --git a/packages/bun-inspector-protocol/protocol/jsc/protocol.json b/packages/bun-inspector-protocol/src/protocol/jsc/protocol.json index ed3bb67e6..ed3bb67e6 100644 --- a/packages/bun-inspector-protocol/protocol/jsc/protocol.json +++ b/packages/bun-inspector-protocol/src/protocol/jsc/protocol.json diff --git a/packages/bun-inspector-protocol/protocol/protocol.d.ts b/packages/bun-inspector-protocol/src/protocol/protocol.d.ts index eae326469..eae326469 100644 --- a/packages/bun-inspector-protocol/protocol/protocol.d.ts +++ b/packages/bun-inspector-protocol/src/protocol/protocol.d.ts diff --git a/packages/bun-inspector-protocol/protocol/schema.d.ts b/packages/bun-inspector-protocol/src/protocol/schema.d.ts index a92bea546..a92bea546 100644 --- a/packages/bun-inspector-protocol/protocol/schema.d.ts +++ b/packages/bun-inspector-protocol/src/protocol/schema.d.ts diff --git a/packages/bun-inspector-protocol/src/protocol/v8/index.d.ts b/packages/bun-inspector-protocol/src/protocol/v8/index.d.ts new file mode 100644 index 000000000..f0e82acb4 --- /dev/null +++ b/packages/bun-inspector-protocol/src/protocol/v8/index.d.ts @@ -0,0 +1,17428 @@ +// GENERATED - DO NOT EDIT +export namespace V8 { + export namespace Accessibility { + /** + * Unique accessibility node identifier. + */ + export type AXNodeId = string; + /** + * Enum of possible property types. + */ + export type AXValueType = + | "boolean" + | "tristate" + | "booleanOrUndefined" + | "idref" + | "idrefList" + | "integer" + | "node" + | "nodeList" + | "number" + | "string" + | "computedString" + | "token" + | "tokenList" + | "domRelation" + | "role" + | "internalRole" + | "valueUndefined"; + /** + * Enum of possible property sources. + */ + export type AXValueSourceType = "attribute" | "implicit" | "style" | "contents" | "placeholder" | "relatedElement"; + /** + * Enum of possible native property sources (as a subtype of a particular AXValueSourceType). + */ + export type AXValueNativeSourceType = + | "description" + | "figcaption" + | "label" + | "labelfor" + | "labelwrapped" + | "legend" + | "rubyannotation" + | "tablecaption" + | "title" + | "other"; + /** + * A single source for a computed AX property. + */ + export type AXValueSource = { + /** + * What type of source this is. + */ + type: AXValueSourceType; + /** + * The value of this property source. + */ + value?: AXValue | undefined; + /** + * The name of the relevant attribute, if any. + */ + attribute?: string | undefined; + /** + * The value of the relevant attribute, if any. + */ + attributeValue?: AXValue | undefined; + /** + * Whether this source is superseded by a higher priority source. + */ + superseded?: boolean | undefined; + /** + * The native markup source for this value, e.g. a `<label>` element. + */ + nativeSource?: AXValueNativeSourceType | undefined; + /** + * The value, such as a node or node list, of the native source. + */ + nativeSourceValue?: AXValue | undefined; + /** + * Whether the value for this property is invalid. + */ + invalid?: boolean | undefined; + /** + * Reason for the value being invalid, if it is. + */ + invalidReason?: string | undefined; + }; + export type AXRelatedNode = { + /** + * The BackendNodeId of the related DOM node. + */ + backendDOMNodeId: DOM.BackendNodeId; + /** + * The IDRef value provided, if any. + */ + idref?: string | undefined; + /** + * The text alternative of this node in the current context. + */ + text?: string | undefined; + }; + export type AXProperty = { + /** + * The name of this property. + */ + name: AXPropertyName; + /** + * The value of this property. + */ + value: AXValue; + }; + /** + * A single computed AX property. + */ + export type AXValue = { + /** + * The type of this value. + */ + type: AXValueType; + /** + * The computed value of this property. + */ + value?: unknown | undefined; + /** + * One or more related nodes, if applicable. + */ + relatedNodes?: AXRelatedNode[] | undefined; + /** + * The sources which contributed to the computation of this property. + */ + sources?: AXValueSource[] | undefined; + }; + /** + * Values of AXProperty name: + * - from 'busy' to 'roledescription': states which apply to every AX node + * - from 'live' to 'root': attributes which apply to nodes in live regions + * - from 'autocomplete' to 'valuetext': attributes which apply to widgets + * - from 'checked' to 'selected': states which apply to widgets + * - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling. + */ + export type AXPropertyName = + | "busy" + | "disabled" + | "editable" + | "focusable" + | "focused" + | "hidden" + | "hiddenRoot" + | "invalid" + | "keyshortcuts" + | "settable" + | "roledescription" + | "live" + | "atomic" + | "relevant" + | "root" + | "autocomplete" + | "hasPopup" + | "level" + | "multiselectable" + | "orientation" + | "multiline" + | "readonly" + | "required" + | "valuemin" + | "valuemax" + | "valuetext" + | "checked" + | "expanded" + | "modal" + | "pressed" + | "selected" + | "activedescendant" + | "controls" + | "describedby" + | "details" + | "errormessage" + | "flowto" + | "labelledby" + | "owns"; + /** + * A node in the accessibility tree. + */ + export type AXNode = { + /** + * Unique identifier for this node. + */ + nodeId: AXNodeId; + /** + * Whether this node is ignored for accessibility + */ + ignored: boolean; + /** + * Collection of reasons why this node is hidden. + */ + ignoredReasons?: AXProperty[] | undefined; + /** + * This `Node`'s role, whether explicit or implicit. + */ + role?: AXValue | undefined; + /** + * This `Node`'s Chrome raw role. + */ + chromeRole?: AXValue | undefined; + /** + * The accessible name for this `Node`. + */ + name?: AXValue | undefined; + /** + * The accessible description for this `Node`. + */ + description?: AXValue | undefined; + /** + * The value for this `Node`. + */ + value?: AXValue | undefined; + /** + * All other properties + */ + properties?: AXProperty[] | undefined; + /** + * ID for this node's parent. + */ + parentId?: AXNodeId | undefined; + /** + * IDs for each of this node's child nodes. + */ + childIds?: AXNodeId[] | undefined; + /** + * The backend ID for the associated DOM node, if any. + */ + backendDOMNodeId?: DOM.BackendNodeId | undefined; + /** + * The frame ID for the frame associated with this nodes document. + */ + frameId?: Page.FrameId | undefined; + }; + /** + * The loadComplete event mirrors the load complete event sent by the browser to assistive + * technology when the web page has finished loading. + * @event `Accessibility.loadComplete` + */ + export type LoadCompleteEvent = { + /** + * New document root node. + */ + root: AXNode; + }; + /** + * The nodesUpdated event is sent every time a previously requested node has changed the in tree. + * @event `Accessibility.nodesUpdated` + */ + export type NodesUpdatedEvent = { + /** + * Updated node data. + */ + nodes: AXNode[]; + }; + /** + * Disables the accessibility domain. + * @request `Accessibility.disable` + */ + export type DisableRequest = {}; + /** + * Disables the accessibility domain. + * @response `Accessibility.disable` + */ + export type DisableResponse = {}; + /** + * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. + * This turns on accessibility for the page, which can impact performance until accessibility is disabled. + * @request `Accessibility.enable` + */ + export type EnableRequest = {}; + /** + * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. + * This turns on accessibility for the page, which can impact performance until accessibility is disabled. + * @response `Accessibility.enable` + */ + export type EnableResponse = {}; + /** + * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. + * @request `Accessibility.getPartialAXTree` + */ + export type GetPartialAXTreeRequest = { + /** + * Identifier of the node to get the partial accessibility tree for. + */ + nodeId?: DOM.NodeId | undefined; + /** + * Identifier of the backend node to get the partial accessibility tree for. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper to get the partial accessibility tree for. + */ + objectId?: Runtime.RemoteObjectId | undefined; + /** + * Whether to fetch this node's ancestors, siblings and children. Defaults to true. + */ + fetchRelatives?: boolean | undefined; + }; + /** + * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. + * @response `Accessibility.getPartialAXTree` + */ + export type GetPartialAXTreeResponse = { + /** + * The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and + * children, if requested. + */ + nodes: AXNode[]; + }; + /** + * Fetches the entire accessibility tree for the root Document + * @request `Accessibility.getFullAXTree` + */ + export type GetFullAXTreeRequest = { + /** + * The maximum depth at which descendants of the root node should be retrieved. + * If omitted, the full tree is returned. + */ + depth?: number | undefined; + /** + * The frame for whose document the AX tree should be retrieved. + * If omited, the root frame is used. + */ + frameId?: Page.FrameId | undefined; + }; + /** + * Fetches the entire accessibility tree for the root Document + * @response `Accessibility.getFullAXTree` + */ + export type GetFullAXTreeResponse = { + nodes: AXNode[]; + }; + /** + * Fetches the root node. + * Requires `enable()` to have been called previously. + * @request `Accessibility.getRootAXNode` + */ + export type GetRootAXNodeRequest = { + /** + * The frame in whose document the node resides. + * If omitted, the root frame is used. + */ + frameId?: Page.FrameId | undefined; + }; + /** + * Fetches the root node. + * Requires `enable()` to have been called previously. + * @response `Accessibility.getRootAXNode` + */ + export type GetRootAXNodeResponse = { + node: AXNode; + }; + /** + * Fetches a node and all ancestors up to and including the root. + * Requires `enable()` to have been called previously. + * @request `Accessibility.getAXNodeAndAncestors` + */ + export type GetAXNodeAndAncestorsRequest = { + /** + * Identifier of the node to get. + */ + nodeId?: DOM.NodeId | undefined; + /** + * Identifier of the backend node to get. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper to get. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Fetches a node and all ancestors up to and including the root. + * Requires `enable()` to have been called previously. + * @response `Accessibility.getAXNodeAndAncestors` + */ + export type GetAXNodeAndAncestorsResponse = { + nodes: AXNode[]; + }; + /** + * Fetches a particular accessibility node by AXNodeId. + * Requires `enable()` to have been called previously. + * @request `Accessibility.getChildAXNodes` + */ + export type GetChildAXNodesRequest = { + id: AXNodeId; + /** + * The frame in whose document the node resides. + * If omitted, the root frame is used. + */ + frameId?: Page.FrameId | undefined; + }; + /** + * Fetches a particular accessibility node by AXNodeId. + * Requires `enable()` to have been called previously. + * @response `Accessibility.getChildAXNodes` + */ + export type GetChildAXNodesResponse = { + nodes: AXNode[]; + }; + /** + * Query a DOM node's accessibility subtree for accessible name and role. + * This command computes the name and role for all nodes in the subtree, including those that are + * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM + * node is specified, or the DOM node does not exist, the command returns an error. If neither + * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. + * @request `Accessibility.queryAXTree` + */ + export type QueryAXTreeRequest = { + /** + * Identifier of the node for the root to query. + */ + nodeId?: DOM.NodeId | undefined; + /** + * Identifier of the backend node for the root to query. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper for the root to query. + */ + objectId?: Runtime.RemoteObjectId | undefined; + /** + * Find nodes with this computed name. + */ + accessibleName?: string | undefined; + /** + * Find nodes with this computed role. + */ + role?: string | undefined; + }; + /** + * Query a DOM node's accessibility subtree for accessible name and role. + * This command computes the name and role for all nodes in the subtree, including those that are + * ignored for accessibility, and returns those that mactch the specified name and role. If no DOM + * node is specified, or the DOM node does not exist, the command returns an error. If neither + * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. + * @response `Accessibility.queryAXTree` + */ + export type QueryAXTreeResponse = { + /** + * A list of `Accessibility.AXNode` matching the specified attributes, + * including nodes that are ignored for accessibility. + */ + nodes: AXNode[]; + }; + } + export namespace Animation { + /** + * Animation instance. + */ + export type Animation = { + /** + * `Animation`'s id. + */ + id: string; + /** + * `Animation`'s name. + */ + name: string; + /** + * `Animation`'s internal paused state. + */ + pausedState: boolean; + /** + * `Animation`'s play state. + */ + playState: string; + /** + * `Animation`'s playback rate. + */ + playbackRate: number; + /** + * `Animation`'s start time. + */ + startTime: number; + /** + * `Animation`'s current time. + */ + currentTime: number; + /** + * Animation type of `Animation`. + */ + type: "CSSTransition" | "CSSAnimation" | "WebAnimation"; + /** + * `Animation`'s source animation node. + */ + source?: AnimationEffect | undefined; + /** + * A unique ID for `Animation` representing the sources that triggered this CSS + * animation/transition. + */ + cssId?: string | undefined; + }; + /** + * AnimationEffect instance + */ + export type AnimationEffect = { + /** + * `AnimationEffect`'s delay. + */ + delay: number; + /** + * `AnimationEffect`'s end delay. + */ + endDelay: number; + /** + * `AnimationEffect`'s iteration start. + */ + iterationStart: number; + /** + * `AnimationEffect`'s iterations. + */ + iterations: number; + /** + * `AnimationEffect`'s iteration duration. + */ + duration: number; + /** + * `AnimationEffect`'s playback direction. + */ + direction: string; + /** + * `AnimationEffect`'s fill mode. + */ + fill: string; + /** + * `AnimationEffect`'s target node. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * `AnimationEffect`'s keyframes. + */ + keyframesRule?: KeyframesRule | undefined; + /** + * `AnimationEffect`'s timing function. + */ + easing: string; + }; + /** + * Keyframes Rule + */ + export type KeyframesRule = { + /** + * CSS keyframed animation's name. + */ + name?: string | undefined; + /** + * List of animation keyframes. + */ + keyframes: KeyframeStyle[]; + }; + /** + * Keyframe Style + */ + export type KeyframeStyle = { + /** + * Keyframe's time offset. + */ + offset: string; + /** + * `AnimationEffect`'s timing function. + */ + easing: string; + }; + /** + * Event for when an animation has been cancelled. + * @event `Animation.animationCanceled` + */ + export type AnimationCanceledEvent = { + /** + * Id of the animation that was cancelled. + */ + id: string; + }; + /** + * Event for each animation that has been created. + * @event `Animation.animationCreated` + */ + export type AnimationCreatedEvent = { + /** + * Id of the animation that was created. + */ + id: string; + }; + /** + * Event for animation that has been started. + * @event `Animation.animationStarted` + */ + export type AnimationStartedEvent = { + /** + * Animation that was started. + */ + animation: Animation; + }; + /** + * Disables animation domain notifications. + * @request `Animation.disable` + */ + export type DisableRequest = {}; + /** + * Disables animation domain notifications. + * @response `Animation.disable` + */ + export type DisableResponse = {}; + /** + * Enables animation domain notifications. + * @request `Animation.enable` + */ + export type EnableRequest = {}; + /** + * Enables animation domain notifications. + * @response `Animation.enable` + */ + export type EnableResponse = {}; + /** + * Returns the current time of the an animation. + * @request `Animation.getCurrentTime` + */ + export type GetCurrentTimeRequest = { + /** + * Id of animation. + */ + id: string; + }; + /** + * Returns the current time of the an animation. + * @response `Animation.getCurrentTime` + */ + export type GetCurrentTimeResponse = { + /** + * Current time of the page. + */ + currentTime: number; + }; + /** + * Gets the playback rate of the document timeline. + * @request `Animation.getPlaybackRate` + */ + export type GetPlaybackRateRequest = {}; + /** + * Gets the playback rate of the document timeline. + * @response `Animation.getPlaybackRate` + */ + export type GetPlaybackRateResponse = { + /** + * Playback rate for animations on page. + */ + playbackRate: number; + }; + /** + * Releases a set of animations to no longer be manipulated. + * @request `Animation.releaseAnimations` + */ + export type ReleaseAnimationsRequest = { + /** + * List of animation ids to seek. + */ + animations: string[]; + }; + /** + * Releases a set of animations to no longer be manipulated. + * @response `Animation.releaseAnimations` + */ + export type ReleaseAnimationsResponse = {}; + /** + * Gets the remote object of the Animation. + * @request `Animation.resolveAnimation` + */ + export type ResolveAnimationRequest = { + /** + * Animation id. + */ + animationId: string; + }; + /** + * Gets the remote object of the Animation. + * @response `Animation.resolveAnimation` + */ + export type ResolveAnimationResponse = { + /** + * Corresponding remote object. + */ + remoteObject: Runtime.RemoteObject; + }; + /** + * Seek a set of animations to a particular time within each animation. + * @request `Animation.seekAnimations` + */ + export type SeekAnimationsRequest = { + /** + * List of animation ids to seek. + */ + animations: string[]; + /** + * Set the current time of each animation. + */ + currentTime: number; + }; + /** + * Seek a set of animations to a particular time within each animation. + * @response `Animation.seekAnimations` + */ + export type SeekAnimationsResponse = {}; + /** + * Sets the paused state of a set of animations. + * @request `Animation.setPaused` + */ + export type SetPausedRequest = { + /** + * Animations to set the pause state of. + */ + animations: string[]; + /** + * Paused state to set to. + */ + paused: boolean; + }; + /** + * Sets the paused state of a set of animations. + * @response `Animation.setPaused` + */ + export type SetPausedResponse = {}; + /** + * Sets the playback rate of the document timeline. + * @request `Animation.setPlaybackRate` + */ + export type SetPlaybackRateRequest = { + /** + * Playback rate for animations on page + */ + playbackRate: number; + }; + /** + * Sets the playback rate of the document timeline. + * @response `Animation.setPlaybackRate` + */ + export type SetPlaybackRateResponse = {}; + /** + * Sets the timing of an animation node. + * @request `Animation.setTiming` + */ + export type SetTimingRequest = { + /** + * Animation id. + */ + animationId: string; + /** + * Duration of the animation. + */ + duration: number; + /** + * Delay of the animation. + */ + delay: number; + }; + /** + * Sets the timing of an animation node. + * @response `Animation.setTiming` + */ + export type SetTimingResponse = {}; + } + export namespace Audits { + /** + * Information about a cookie that is affected by an inspector issue. + */ + export type AffectedCookie = { + /** + * The following three properties uniquely identify a cookie + */ + name: string; + path: string; + domain: string; + }; + /** + * Information about a request that is affected by an inspector issue. + */ + export type AffectedRequest = { + /** + * The unique request id. + */ + requestId: Network.RequestId; + url?: string | undefined; + }; + /** + * Information about the frame affected by an inspector issue. + */ + export type AffectedFrame = { + frameId: Page.FrameId; + }; + export type CookieExclusionReason = + | "ExcludeSameSiteUnspecifiedTreatedAsLax" + | "ExcludeSameSiteNoneInsecure" + | "ExcludeSameSiteLax" + | "ExcludeSameSiteStrict" + | "ExcludeInvalidSameParty" + | "ExcludeSamePartyCrossPartyContext" + | "ExcludeDomainNonASCII" + | "ExcludeThirdPartyCookieBlockedInFirstPartySet" + | "ExcludeThirdPartyPhaseout"; + export type CookieWarningReason = + | "WarnSameSiteUnspecifiedCrossSiteContext" + | "WarnSameSiteNoneInsecure" + | "WarnSameSiteUnspecifiedLaxAllowUnsafe" + | "WarnSameSiteStrictLaxDowngradeStrict" + | "WarnSameSiteStrictCrossDowngradeStrict" + | "WarnSameSiteStrictCrossDowngradeLax" + | "WarnSameSiteLaxCrossDowngradeStrict" + | "WarnSameSiteLaxCrossDowngradeLax" + | "WarnAttributeValueExceedsMaxSize" + | "WarnDomainNonASCII" + | "WarnThirdPartyPhaseout"; + export type CookieOperation = "SetCookie" | "ReadCookie"; + /** + * This information is currently necessary, as the front-end has a difficult + * time finding a specific cookie. With this, we can convey specific error + * information without the cookie. + */ + export type CookieIssueDetails = { + /** + * If AffectedCookie is not set then rawCookieLine contains the raw + * Set-Cookie header string. This hints at a problem where the + * cookie line is syntactically or semantically malformed in a way + * that no valid cookie could be created. + */ + cookie?: AffectedCookie | undefined; + rawCookieLine?: string | undefined; + cookieWarningReasons: CookieWarningReason[]; + cookieExclusionReasons: CookieExclusionReason[]; + /** + * Optionally identifies the site-for-cookies and the cookie url, which + * may be used by the front-end as additional context. + */ + operation: CookieOperation; + siteForCookies?: string | undefined; + cookieUrl?: string | undefined; + request?: AffectedRequest | undefined; + }; + export type MixedContentResolutionStatus = + | "MixedContentBlocked" + | "MixedContentAutomaticallyUpgraded" + | "MixedContentWarning"; + export type MixedContentResourceType = + | "AttributionSrc" + | "Audio" + | "Beacon" + | "CSPReport" + | "Download" + | "EventSource" + | "Favicon" + | "Font" + | "Form" + | "Frame" + | "Image" + | "Import" + | "Manifest" + | "Ping" + | "PluginData" + | "PluginResource" + | "Prefetch" + | "Resource" + | "Script" + | "ServiceWorker" + | "SharedWorker" + | "Stylesheet" + | "Track" + | "Video" + | "Worker" + | "XMLHttpRequest" + | "XSLT"; + export type MixedContentIssueDetails = { + /** + * The type of resource causing the mixed content issue (css, js, iframe, + * form,...). Marked as optional because it is mapped to from + * blink::mojom::RequestContextType, which will be replaced + * by network::mojom::RequestDestination + */ + resourceType?: MixedContentResourceType | undefined; + /** + * The way the mixed content issue is being resolved. + */ + resolutionStatus: MixedContentResolutionStatus; + /** + * The unsafe http url causing the mixed content issue. + */ + insecureURL: string; + /** + * The url responsible for the call to an unsafe url. + */ + mainResourceURL: string; + /** + * The mixed content request. + * Does not always exist (e.g. for unsafe form submission urls). + */ + request?: AffectedRequest | undefined; + /** + * Optional because not every mixed content issue is necessarily linked to a frame. + */ + frame?: AffectedFrame | undefined; + }; + /** + * Enum indicating the reason a response has been blocked. These reasons are + * refinements of the net error BLOCKED_BY_RESPONSE. + */ + export type BlockedByResponseReason = + | "CoepFrameResourceNeedsCoepHeader" + | "CoopSandboxedIFrameCannotNavigateToCoopPage" + | "CorpNotSameOrigin" + | "CorpNotSameOriginAfterDefaultedToSameOriginByCoep" + | "CorpNotSameSite"; + /** + * Details for a request that has been blocked with the BLOCKED_BY_RESPONSE + * code. Currently only used for COEP/COOP, but may be extended to include + * some CSP errors in the future. + */ + export type BlockedByResponseIssueDetails = { + request: AffectedRequest; + parentFrame?: AffectedFrame | undefined; + blockedFrame?: AffectedFrame | undefined; + reason: BlockedByResponseReason; + }; + export type HeavyAdResolutionStatus = "HeavyAdBlocked" | "HeavyAdWarning"; + export type HeavyAdReason = "NetworkTotalLimit" | "CpuTotalLimit" | "CpuPeakLimit"; + export type HeavyAdIssueDetails = { + /** + * The resolution status, either blocking the content or warning. + */ + resolution: HeavyAdResolutionStatus; + /** + * The reason the ad was blocked, total network or cpu or peak cpu. + */ + reason: HeavyAdReason; + /** + * The frame that was blocked. + */ + frame: AffectedFrame; + }; + export type ContentSecurityPolicyViolationType = + | "kInlineViolation" + | "kEvalViolation" + | "kURLViolation" + | "kTrustedTypesSinkViolation" + | "kTrustedTypesPolicyViolation" + | "kWasmEvalViolation"; + export type SourceCodeLocation = { + scriptId?: Runtime.ScriptId | undefined; + url: string; + lineNumber: number; + columnNumber: number; + }; + export type ContentSecurityPolicyIssueDetails = { + /** + * The url not included in allowed sources. + */ + blockedURL?: string | undefined; + /** + * Specific directive that is violated, causing the CSP issue. + */ + violatedDirective: string; + isReportOnly: boolean; + contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType; + frameAncestor?: AffectedFrame | undefined; + sourceCodeLocation?: SourceCodeLocation | undefined; + violatingNodeId?: DOM.BackendNodeId | undefined; + }; + export type SharedArrayBufferIssueType = "TransferIssue" | "CreationIssue"; + /** + * Details for a issue arising from an SAB being instantiated in, or + * transferred to a context that is not cross-origin isolated. + */ + export type SharedArrayBufferIssueDetails = { + sourceCodeLocation: SourceCodeLocation; + isWarning: boolean; + type: SharedArrayBufferIssueType; + }; + export type LowTextContrastIssueDetails = { + violatingNodeId: DOM.BackendNodeId; + violatingNodeSelector: string; + contrastRatio: number; + thresholdAA: number; + thresholdAAA: number; + fontSize: string; + fontWeight: string; + }; + /** + * Details for a CORS related issue, e.g. a warning or error related to + * CORS RFC1918 enforcement. + */ + export type CorsIssueDetails = { + corsErrorStatus: Network.CorsErrorStatus; + isWarning: boolean; + request: AffectedRequest; + location?: SourceCodeLocation | undefined; + initiatorOrigin?: string | undefined; + resourceIPAddressSpace?: Network.IPAddressSpace | undefined; + clientSecurityState?: Network.ClientSecurityState | undefined; + }; + export type AttributionReportingIssueType = + | "PermissionPolicyDisabled" + | "UntrustworthyReportingOrigin" + | "InsecureContext" + | "InvalidHeader" + | "InvalidRegisterTriggerHeader" + | "SourceAndTriggerHeaders" + | "SourceIgnored" + | "TriggerIgnored" + | "OsSourceIgnored" + | "OsTriggerIgnored" + | "InvalidRegisterOsSourceHeader" + | "InvalidRegisterOsTriggerHeader" + | "WebAndOsHeaders" + | "NoWebOrOsSupport" + | "NavigationRegistrationWithoutTransientUserActivation"; + /** + * Details for issues around "Attribution Reporting API" usage. + * Explainer: https://github.com/WICG/attribution-reporting-api + */ + export type AttributionReportingIssueDetails = { + violationType: AttributionReportingIssueType; + request?: AffectedRequest | undefined; + violatingNodeId?: DOM.BackendNodeId | undefined; + invalidParameter?: string | undefined; + }; + /** + * Details for issues about documents in Quirks Mode + * or Limited Quirks Mode that affects page layouting. + */ + export type QuirksModeIssueDetails = { + /** + * If false, it means the document's mode is "quirks" + * instead of "limited-quirks". + */ + isLimitedQuirksMode: boolean; + documentNodeId: DOM.BackendNodeId; + url: string; + frameId: Page.FrameId; + loaderId: Network.LoaderId; + }; + export type NavigatorUserAgentIssueDetails = { + url: string; + location?: SourceCodeLocation | undefined; + }; + export type GenericIssueErrorType = + | "CrossOriginPortalPostMessageError" + | "FormLabelForNameError" + | "FormDuplicateIdForInputError" + | "FormInputWithNoLabelError" + | "FormAutocompleteAttributeEmptyError" + | "FormEmptyIdAndNameAttributesForInputError" + | "FormAriaLabelledByToNonExistingId" + | "FormInputAssignedAutocompleteValueToIdOrNameAttributeError" + | "FormLabelHasNeitherForNorNestedInput" + | "FormLabelForMatchesNonExistingIdError" + | "FormInputHasWrongButWellIntendedAutocompleteValueError" + | "ResponseWasBlockedByORB"; + /** + * Depending on the concrete errorType, different properties are set. + */ + export type GenericIssueDetails = { + /** + * Issues with the same errorType are aggregated in the frontend. + */ + errorType: GenericIssueErrorType; + frameId?: Page.FrameId | undefined; + violatingNodeId?: DOM.BackendNodeId | undefined; + violatingNodeAttribute?: string | undefined; + request?: AffectedRequest | undefined; + }; + /** + * This issue tracks information needed to print a deprecation message. + * https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md + */ + export type DeprecationIssueDetails = { + affectedFrame?: AffectedFrame | undefined; + sourceCodeLocation: SourceCodeLocation; + /** + * One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5 + */ + type: string; + }; + /** + * This issue warns about sites in the redirect chain of a finished navigation + * that may be flagged as trackers and have their state cleared if they don't + * receive a user interaction. Note that in this context 'site' means eTLD+1. + * For example, if the URL `https://example.test:80/bounce` was in the + * redirect chain, the site reported would be `example.test`. + */ + export type BounceTrackingIssueDetails = { + trackingSites: string[]; + }; + export type ClientHintIssueReason = "MetaTagAllowListInvalidOrigin" | "MetaTagModifiedHTML"; + export type FederatedAuthRequestIssueDetails = { + federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason; + }; + /** + * Represents the failure reason when a federated authentication reason fails. + * Should be updated alongside RequestIdTokenStatus in + * third_party/blink/public/mojom/devtools/inspector_issue.mojom to include + * all cases except for success. + */ + export type FederatedAuthRequestIssueReason = + | "ShouldEmbargo" + | "TooManyRequests" + | "WellKnownHttpNotFound" + | "WellKnownNoResponse" + | "WellKnownInvalidResponse" + | "WellKnownListEmpty" + | "WellKnownInvalidContentType" + | "ConfigNotInWellKnown" + | "WellKnownTooBig" + | "ConfigHttpNotFound" + | "ConfigNoResponse" + | "ConfigInvalidResponse" + | "ConfigInvalidContentType" + | "ClientMetadataHttpNotFound" + | "ClientMetadataNoResponse" + | "ClientMetadataInvalidResponse" + | "ClientMetadataInvalidContentType" + | "DisabledInSettings" + | "ErrorFetchingSignin" + | "InvalidSigninResponse" + | "AccountsHttpNotFound" + | "AccountsNoResponse" + | "AccountsInvalidResponse" + | "AccountsListEmpty" + | "AccountsInvalidContentType" + | "IdTokenHttpNotFound" + | "IdTokenNoResponse" + | "IdTokenInvalidResponse" + | "IdTokenInvalidRequest" + | "IdTokenInvalidContentType" + | "ErrorIdToken" + | "Canceled" + | "RpPageNotVisible" + | "SilentMediationFailure" + | "ThirdPartyCookiesBlocked"; + export type FederatedAuthUserInfoRequestIssueDetails = { + federatedAuthUserInfoRequestIssueReason: FederatedAuthUserInfoRequestIssueReason; + }; + /** + * Represents the failure reason when a getUserInfo() call fails. + * Should be updated alongside FederatedAuthUserInfoRequestResult in + * third_party/blink/public/mojom/devtools/inspector_issue.mojom. + */ + export type FederatedAuthUserInfoRequestIssueReason = + | "NotSameOrigin" + | "NotIframe" + | "NotPotentiallyTrustworthy" + | "NoApiPermission" + | "NotSignedInWithIdp" + | "NoAccountSharingPermission" + | "InvalidConfigOrWellKnown" + | "InvalidAccountsResponse" + | "NoReturningUserFromFetchedAccounts"; + /** + * This issue tracks client hints related issues. It's used to deprecate old + * features, encourage the use of new ones, and provide general guidance. + */ + export type ClientHintIssueDetails = { + sourceCodeLocation: SourceCodeLocation; + clientHintIssueReason: ClientHintIssueReason; + }; + export type FailedRequestInfo = { + /** + * The URL that failed to load. + */ + url: string; + /** + * The failure message for the failed request. + */ + failureMessage: string; + requestId?: Network.RequestId | undefined; + }; + export type StyleSheetLoadingIssueReason = "LateImportRule" | "RequestFailed"; + /** + * This issue warns when a referenced stylesheet couldn't be loaded. + */ + export type StylesheetLoadingIssueDetails = { + /** + * Source code position that referenced the failing stylesheet. + */ + sourceCodeLocation: SourceCodeLocation; + /** + * Reason why the stylesheet couldn't be loaded. + */ + styleSheetLoadingIssueReason: StyleSheetLoadingIssueReason; + /** + * Contains additional info when the failure was due to a request. + */ + failedRequestInfo?: FailedRequestInfo | undefined; + }; + /** + * A unique identifier for the type of issue. Each type may use one of the + * optional fields in InspectorIssueDetails to convey more specific + * information about the kind of issue. + */ + export type InspectorIssueCode = + | "CookieIssue" + | "MixedContentIssue" + | "BlockedByResponseIssue" + | "HeavyAdIssue" + | "ContentSecurityPolicyIssue" + | "SharedArrayBufferIssue" + | "LowTextContrastIssue" + | "CorsIssue" + | "AttributionReportingIssue" + | "QuirksModeIssue" + | "NavigatorUserAgentIssue" + | "GenericIssue" + | "DeprecationIssue" + | "ClientHintIssue" + | "FederatedAuthRequestIssue" + | "BounceTrackingIssue" + | "StylesheetLoadingIssue" + | "FederatedAuthUserInfoRequestIssue"; + /** + * This struct holds a list of optional fields with additional information + * specific to the kind of issue. When adding a new issue code, please also + * add a new optional field to this type. + */ + export type InspectorIssueDetails = { + cookieIssueDetails?: CookieIssueDetails | undefined; + mixedContentIssueDetails?: MixedContentIssueDetails | undefined; + blockedByResponseIssueDetails?: BlockedByResponseIssueDetails | undefined; + heavyAdIssueDetails?: HeavyAdIssueDetails | undefined; + contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails | undefined; + sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails | undefined; + lowTextContrastIssueDetails?: LowTextContrastIssueDetails | undefined; + corsIssueDetails?: CorsIssueDetails | undefined; + attributionReportingIssueDetails?: AttributionReportingIssueDetails | undefined; + quirksModeIssueDetails?: QuirksModeIssueDetails | undefined; + navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails | undefined; + genericIssueDetails?: GenericIssueDetails | undefined; + deprecationIssueDetails?: DeprecationIssueDetails | undefined; + clientHintIssueDetails?: ClientHintIssueDetails | undefined; + federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails | undefined; + bounceTrackingIssueDetails?: BounceTrackingIssueDetails | undefined; + stylesheetLoadingIssueDetails?: StylesheetLoadingIssueDetails | undefined; + federatedAuthUserInfoRequestIssueDetails?: FederatedAuthUserInfoRequestIssueDetails | undefined; + }; + /** + * A unique id for a DevTools inspector issue. Allows other entities (e.g. + * exceptions, CDP message, console messages, etc.) to reference an issue. + */ + export type IssueId = string; + /** + * An inspector issue reported from the back-end. + */ + export type InspectorIssue = { + code: InspectorIssueCode; + details: InspectorIssueDetails; + /** + * A unique id for this issue. May be omitted if no other entity (e.g. + * exception, CDP message, etc.) is referencing this issue. + */ + issueId?: IssueId | undefined; + }; + /** + * undefined + * @event `Audits.issueAdded` + */ + export type IssueAddedEvent = { + issue: InspectorIssue; + }; + /** + * Returns the response body and size if it were re-encoded with the specified settings. Only + * applies to images. + * @request `Audits.getEncodedResponse` + */ + export type GetEncodedResponseRequest = { + /** + * Identifier of the network request to get content for. + */ + requestId: Network.RequestId; + /** + * The encoding to use. + */ + encoding: "webp" | "jpeg" | "png"; + /** + * The quality of the encoding (0-1). (defaults to 1) + */ + quality?: number | undefined; + /** + * Whether to only return the size information (defaults to false). + */ + sizeOnly?: boolean | undefined; + }; + /** + * Returns the response body and size if it were re-encoded with the specified settings. Only + * applies to images. + * @response `Audits.getEncodedResponse` + */ + export type GetEncodedResponseResponse = { + /** + * The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON) + */ + body?: string | undefined; + /** + * Size before re-encoding. + */ + originalSize: number; + /** + * Size after re-encoding. + */ + encodedSize: number; + }; + /** + * Disables issues domain, prevents further issues from being reported to the client. + * @request `Audits.disable` + */ + export type DisableRequest = {}; + /** + * Disables issues domain, prevents further issues from being reported to the client. + * @response `Audits.disable` + */ + export type DisableResponse = {}; + /** + * Enables issues domain, sends the issues collected so far to the client by means of the + * `issueAdded` event. + * @request `Audits.enable` + */ + export type EnableRequest = {}; + /** + * Enables issues domain, sends the issues collected so far to the client by means of the + * `issueAdded` event. + * @response `Audits.enable` + */ + export type EnableResponse = {}; + /** + * Runs the contrast check for the target page. Found issues are reported + * using Audits.issueAdded event. + * @request `Audits.checkContrast` + */ + export type CheckContrastRequest = { + /** + * Whether to report WCAG AAA level issues. Default is false. + */ + reportAAA?: boolean | undefined; + }; + /** + * Runs the contrast check for the target page. Found issues are reported + * using Audits.issueAdded event. + * @response `Audits.checkContrast` + */ + export type CheckContrastResponse = {}; + /** + * Runs the form issues check for the target page. Found issues are reported + * using Audits.issueAdded event. + * @request `Audits.checkFormsIssues` + */ + export type CheckFormsIssuesRequest = {}; + /** + * Runs the form issues check for the target page. Found issues are reported + * using Audits.issueAdded event. + * @response `Audits.checkFormsIssues` + */ + export type CheckFormsIssuesResponse = { + formIssues: GenericIssueDetails[]; + }; + } + export namespace Autofill { + export type CreditCard = { + /** + * 16-digit credit card number. + */ + number: string; + /** + * Name of the credit card owner. + */ + name: string; + /** + * 2-digit expiry month. + */ + expiryMonth: string; + /** + * 4-digit expiry year. + */ + expiryYear: string; + /** + * 3-digit card verification code. + */ + cvc: string; + }; + export type AddressField = { + /** + * address field name, for example GIVEN_NAME. + */ + name: string; + /** + * address field name, for example Jon Doe. + */ + value: string; + }; + export type Address = { + /** + * fields and values defining a test address. + */ + fields: AddressField[]; + }; + /** + * Trigger autofill on a form identified by the fieldId. + * If the field and related form cannot be autofilled, returns an error. + * @request `Autofill.trigger` + */ + export type TriggerRequest = { + /** + * Identifies a field that serves as an anchor for autofill. + */ + fieldId: DOM.BackendNodeId; + /** + * Identifies the frame that field belongs to. + */ + frameId?: Page.FrameId | undefined; + /** + * Credit card information to fill out the form. Credit card data is not saved. + */ + card: CreditCard; + }; + /** + * Trigger autofill on a form identified by the fieldId. + * If the field and related form cannot be autofilled, returns an error. + * @response `Autofill.trigger` + */ + export type TriggerResponse = {}; + /** + * Set addresses so that developers can verify their forms implementation. + * @request `Autofill.setAddresses` + */ + export type SetAddressesRequest = { + addresses: Address[]; + }; + /** + * Set addresses so that developers can verify their forms implementation. + * @response `Autofill.setAddresses` + */ + export type SetAddressesResponse = {}; + } + export namespace BackgroundService { + /** + * The Background Service that will be associated with the commands/events. + * Every Background Service operates independently, but they share the same + * API. + */ + export type ServiceName = + | "backgroundFetch" + | "backgroundSync" + | "pushMessaging" + | "notifications" + | "paymentHandler" + | "periodicBackgroundSync"; + /** + * A key-value pair for additional event information to pass along. + */ + export type EventMetadata = { + key: string; + value: string; + }; + export type BackgroundServiceEvent = { + /** + * Timestamp of the event (in seconds). + */ + timestamp: Network.TimeSinceEpoch; + /** + * The origin this event belongs to. + */ + origin: string; + /** + * The Service Worker ID that initiated the event. + */ + serviceWorkerRegistrationId: ServiceWorker.RegistrationID; + /** + * The Background Service this event belongs to. + */ + service: ServiceName; + /** + * A description of the event. + */ + eventName: string; + /** + * An identifier that groups related events together. + */ + instanceId: string; + /** + * A list of event-specific information. + */ + eventMetadata: EventMetadata[]; + /** + * Storage key this event belongs to. + */ + storageKey: string; + }; + /** + * Called when the recording state for the service has been updated. + * @event `BackgroundService.recordingStateChanged` + */ + export type RecordingStateChangedEvent = { + isRecording: boolean; + service: ServiceName; + }; + /** + * Called with all existing backgroundServiceEvents when enabled, and all new + * events afterwards if enabled and recording. + * @event `BackgroundService.backgroundServiceEventReceived` + */ + export type BackgroundServiceEventReceivedEvent = { + backgroundServiceEvent: BackgroundServiceEvent; + }; + /** + * Enables event updates for the service. + * @request `BackgroundService.startObserving` + */ + export type StartObservingRequest = { + service: ServiceName; + }; + /** + * Enables event updates for the service. + * @response `BackgroundService.startObserving` + */ + export type StartObservingResponse = {}; + /** + * Disables event updates for the service. + * @request `BackgroundService.stopObserving` + */ + export type StopObservingRequest = { + service: ServiceName; + }; + /** + * Disables event updates for the service. + * @response `BackgroundService.stopObserving` + */ + export type StopObservingResponse = {}; + /** + * Set the recording state for the service. + * @request `BackgroundService.setRecording` + */ + export type SetRecordingRequest = { + shouldRecord: boolean; + service: ServiceName; + }; + /** + * Set the recording state for the service. + * @response `BackgroundService.setRecording` + */ + export type SetRecordingResponse = {}; + /** + * Clears all stored data for the service. + * @request `BackgroundService.clearEvents` + */ + export type ClearEventsRequest = { + service: ServiceName; + }; + /** + * Clears all stored data for the service. + * @response `BackgroundService.clearEvents` + */ + export type ClearEventsResponse = {}; + } + export namespace Browser { + export type BrowserContextID = string; + export type WindowID = number; + /** + * The state of the browser window. + */ + export type WindowState = "normal" | "minimized" | "maximized" | "fullscreen"; + /** + * Browser window bounds information + */ + export type Bounds = { + /** + * The offset from the left edge of the screen to the window in pixels. + */ + left?: number | undefined; + /** + * The offset from the top edge of the screen to the window in pixels. + */ + top?: number | undefined; + /** + * The window width in pixels. + */ + width?: number | undefined; + /** + * The window height in pixels. + */ + height?: number | undefined; + /** + * The window state. Default to normal. + */ + windowState?: WindowState | undefined; + }; + export type PermissionType = + | "accessibilityEvents" + | "audioCapture" + | "backgroundSync" + | "backgroundFetch" + | "clipboardReadWrite" + | "clipboardSanitizedWrite" + | "displayCapture" + | "durableStorage" + | "flash" + | "geolocation" + | "idleDetection" + | "localFonts" + | "midi" + | "midiSysex" + | "nfc" + | "notifications" + | "paymentHandler" + | "periodicBackgroundSync" + | "protectedMediaIdentifier" + | "sensors" + | "storageAccess" + | "topLevelStorageAccess" + | "videoCapture" + | "videoCapturePanTiltZoom" + | "wakeLockScreen" + | "wakeLockSystem" + | "windowManagement"; + export type PermissionSetting = "granted" | "denied" | "prompt"; + /** + * Definition of PermissionDescriptor defined in the Permissions API: + * https://w3c.github.io/permissions/#dictdef-permissiondescriptor. + */ + export type PermissionDescriptor = { + /** + * Name of permission. + * See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names. + */ + name: string; + /** + * For "midi" permission, may also specify sysex control. + */ + sysex?: boolean | undefined; + /** + * For "push" permission, may specify userVisibleOnly. + * Note that userVisibleOnly = true is the only currently supported type. + */ + userVisibleOnly?: boolean | undefined; + /** + * For "clipboard" permission, may specify allowWithoutSanitization. + */ + allowWithoutSanitization?: boolean | undefined; + /** + * For "camera" permission, may specify panTiltZoom. + */ + panTiltZoom?: boolean | undefined; + }; + /** + * Browser command ids used by executeBrowserCommand. + */ + export type BrowserCommandId = "openTabSearch" | "closeTabSearch"; + /** + * Chrome histogram bucket. + */ + export type Bucket = { + /** + * Minimum value (inclusive). + */ + low: number; + /** + * Maximum value (exclusive). + */ + high: number; + /** + * Number of samples. + */ + count: number; + }; + /** + * Chrome histogram. + */ + export type Histogram = { + /** + * Name. + */ + name: string; + /** + * Sum of sample values. + */ + sum: number; + /** + * Total number of samples. + */ + count: number; + /** + * Buckets. + */ + buckets: Bucket[]; + }; + /** + * Fired when page is about to start a download. + * @event `Browser.downloadWillBegin` + */ + export type DownloadWillBeginEvent = { + /** + * Id of the frame that caused the download to begin. + */ + frameId: Page.FrameId; + /** + * Global unique identifier of the download. + */ + guid: string; + /** + * URL of the resource being downloaded. + */ + url: string; + /** + * Suggested file name of the resource (the actual name of the file saved on disk may differ). + */ + suggestedFilename: string; + }; + /** + * Fired when download makes progress. Last call has |done| == true. + * @event `Browser.downloadProgress` + */ + export type DownloadProgressEvent = { + /** + * Global unique identifier of the download. + */ + guid: string; + /** + * Total expected bytes to download. + */ + totalBytes: number; + /** + * Total bytes received. + */ + receivedBytes: number; + /** + * Download status. + */ + state: "inProgress" | "completed" | "canceled"; + }; + /** + * Set permission settings for given origin. + * @request `Browser.setPermission` + */ + export type SetPermissionRequest = { + /** + * Descriptor of permission to override. + */ + permission: PermissionDescriptor; + /** + * Setting of the permission. + */ + setting: PermissionSetting; + /** + * Origin the permission applies to, all origins if not specified. + */ + origin?: string | undefined; + /** + * Context to override. When omitted, default browser context is used. + */ + browserContextId?: BrowserContextID | undefined; + }; + /** + * Set permission settings for given origin. + * @response `Browser.setPermission` + */ + export type SetPermissionResponse = {}; + /** + * Grant specific permissions to the given origin and reject all others. + * @request `Browser.grantPermissions` + */ + export type GrantPermissionsRequest = { + permissions: PermissionType[]; + /** + * Origin the permission applies to, all origins if not specified. + */ + origin?: string | undefined; + /** + * BrowserContext to override permissions. When omitted, default browser context is used. + */ + browserContextId?: BrowserContextID | undefined; + }; + /** + * Grant specific permissions to the given origin and reject all others. + * @response `Browser.grantPermissions` + */ + export type GrantPermissionsResponse = {}; + /** + * Reset all permission management for all origins. + * @request `Browser.resetPermissions` + */ + export type ResetPermissionsRequest = { + /** + * BrowserContext to reset permissions. When omitted, default browser context is used. + */ + browserContextId?: BrowserContextID | undefined; + }; + /** + * Reset all permission management for all origins. + * @response `Browser.resetPermissions` + */ + export type ResetPermissionsResponse = {}; + /** + * Set the behavior when downloading a file. + * @request `Browser.setDownloadBehavior` + */ + export type SetDownloadBehaviorRequest = { + /** + * Whether to allow all or deny all download requests, or use default Chrome behavior if + * available (otherwise deny). |allowAndName| allows download and names files according to + * their dowmload guids. + */ + behavior: "deny" | "allow" | "allowAndName" | "default"; + /** + * BrowserContext to set download behavior. When omitted, default browser context is used. + */ + browserContextId?: BrowserContextID | undefined; + /** + * The default path to save downloaded files to. This is required if behavior is set to 'allow' + * or 'allowAndName'. + */ + downloadPath?: string | undefined; + /** + * Whether to emit download events (defaults to false). + */ + eventsEnabled?: boolean | undefined; + }; + /** + * Set the behavior when downloading a file. + * @response `Browser.setDownloadBehavior` + */ + export type SetDownloadBehaviorResponse = {}; + /** + * Cancel a download if in progress + * @request `Browser.cancelDownload` + */ + export type CancelDownloadRequest = { + /** + * Global unique identifier of the download. + */ + guid: string; + /** + * BrowserContext to perform the action in. When omitted, default browser context is used. + */ + browserContextId?: BrowserContextID | undefined; + }; + /** + * Cancel a download if in progress + * @response `Browser.cancelDownload` + */ + export type CancelDownloadResponse = {}; + /** + * Close browser gracefully. + * @request `Browser.close` + */ + export type CloseRequest = {}; + /** + * Close browser gracefully. + * @response `Browser.close` + */ + export type CloseResponse = {}; + /** + * Crashes browser on the main thread. + * @request `Browser.crash` + */ + export type CrashRequest = {}; + /** + * Crashes browser on the main thread. + * @response `Browser.crash` + */ + export type CrashResponse = {}; + /** + * Crashes GPU process. + * @request `Browser.crashGpuProcess` + */ + export type CrashGpuProcessRequest = {}; + /** + * Crashes GPU process. + * @response `Browser.crashGpuProcess` + */ + export type CrashGpuProcessResponse = {}; + /** + * Returns version information. + * @request `Browser.getVersion` + */ + export type GetVersionRequest = {}; + /** + * Returns version information. + * @response `Browser.getVersion` + */ + export type GetVersionResponse = { + /** + * Protocol version. + */ + protocolVersion: string; + /** + * Product name. + */ + product: string; + /** + * Product revision. + */ + revision: string; + /** + * User-Agent. + */ + userAgent: string; + /** + * V8 version. + */ + jsVersion: string; + }; + /** + * Returns the command line switches for the browser process if, and only if + * --enable-automation is on the commandline. + * @request `Browser.getBrowserCommandLine` + */ + export type GetBrowserCommandLineRequest = {}; + /** + * Returns the command line switches for the browser process if, and only if + * --enable-automation is on the commandline. + * @response `Browser.getBrowserCommandLine` + */ + export type GetBrowserCommandLineResponse = { + /** + * Commandline parameters + */ + arguments: string[]; + }; + /** + * Get Chrome histograms. + * @request `Browser.getHistograms` + */ + export type GetHistogramsRequest = { + /** + * Requested substring in name. Only histograms which have query as a + * substring in their name are extracted. An empty or absent query returns + * all histograms. + */ + query?: string | undefined; + /** + * If true, retrieve delta since last delta call. + */ + delta?: boolean | undefined; + }; + /** + * Get Chrome histograms. + * @response `Browser.getHistograms` + */ + export type GetHistogramsResponse = { + /** + * Histograms. + */ + histograms: Histogram[]; + }; + /** + * Get a Chrome histogram by name. + * @request `Browser.getHistogram` + */ + export type GetHistogramRequest = { + /** + * Requested histogram name. + */ + name: string; + /** + * If true, retrieve delta since last delta call. + */ + delta?: boolean | undefined; + }; + /** + * Get a Chrome histogram by name. + * @response `Browser.getHistogram` + */ + export type GetHistogramResponse = { + /** + * Histogram. + */ + histogram: Histogram; + }; + /** + * Get position and size of the browser window. + * @request `Browser.getWindowBounds` + */ + export type GetWindowBoundsRequest = { + /** + * Browser window id. + */ + windowId: WindowID; + }; + /** + * Get position and size of the browser window. + * @response `Browser.getWindowBounds` + */ + export type GetWindowBoundsResponse = { + /** + * Bounds information of the window. When window state is 'minimized', the restored window + * position and size are returned. + */ + bounds: Bounds; + }; + /** + * Get the browser window that contains the devtools target. + * @request `Browser.getWindowForTarget` + */ + export type GetWindowForTargetRequest = { + /** + * Devtools agent host id. If called as a part of the session, associated targetId is used. + */ + targetId?: Target.TargetID | undefined; + }; + /** + * Get the browser window that contains the devtools target. + * @response `Browser.getWindowForTarget` + */ + export type GetWindowForTargetResponse = { + /** + * Browser window id. + */ + windowId: WindowID; + /** + * Bounds information of the window. When window state is 'minimized', the restored window + * position and size are returned. + */ + bounds: Bounds; + }; + /** + * Set position and/or size of the browser window. + * @request `Browser.setWindowBounds` + */ + export type SetWindowBoundsRequest = { + /** + * Browser window id. + */ + windowId: WindowID; + /** + * New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined + * with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. + */ + bounds: Bounds; + }; + /** + * Set position and/or size of the browser window. + * @response `Browser.setWindowBounds` + */ + export type SetWindowBoundsResponse = {}; + /** + * Set dock tile details, platform-specific. + * @request `Browser.setDockTile` + */ + export type SetDockTileRequest = { + badgeLabel?: string | undefined; + /** + * Png encoded image. (Encoded as a base64 string when passed over JSON) + */ + image?: string | undefined; + }; + /** + * Set dock tile details, platform-specific. + * @response `Browser.setDockTile` + */ + export type SetDockTileResponse = {}; + /** + * Invoke custom browser commands used by telemetry. + * @request `Browser.executeBrowserCommand` + */ + export type ExecuteBrowserCommandRequest = { + commandId: BrowserCommandId; + }; + /** + * Invoke custom browser commands used by telemetry. + * @response `Browser.executeBrowserCommand` + */ + export type ExecuteBrowserCommandResponse = {}; + /** + * Allows a site to use privacy sandbox features that require enrollment + * without the site actually being enrolled. Only supported on page targets. + * @request `Browser.addPrivacySandboxEnrollmentOverride` + */ + export type AddPrivacySandboxEnrollmentOverrideRequest = { + url: string; + }; + /** + * Allows a site to use privacy sandbox features that require enrollment + * without the site actually being enrolled. Only supported on page targets. + * @response `Browser.addPrivacySandboxEnrollmentOverride` + */ + export type AddPrivacySandboxEnrollmentOverrideResponse = {}; + } + export namespace CacheStorage { + /** + * Unique identifier of the Cache object. + */ + export type CacheId = string; + /** + * type of HTTP response cached + */ + export type CachedResponseType = "basic" | "cors" | "default" | "error" | "opaqueResponse" | "opaqueRedirect"; + /** + * Data entry. + */ + export type DataEntry = { + /** + * Request URL. + */ + requestURL: string; + /** + * Request method. + */ + requestMethod: string; + /** + * Request headers + */ + requestHeaders: Header[]; + /** + * Number of seconds since epoch. + */ + responseTime: number; + /** + * HTTP response status code. + */ + responseStatus: number; + /** + * HTTP response status text. + */ + responseStatusText: string; + /** + * HTTP response type + */ + responseType: CachedResponseType; + /** + * Response headers + */ + responseHeaders: Header[]; + }; + /** + * Cache identifier. + */ + export type Cache = { + /** + * An opaque unique id of the cache. + */ + cacheId: CacheId; + /** + * Security origin of the cache. + */ + securityOrigin: string; + /** + * Storage key of the cache. + */ + storageKey: string; + /** + * Storage bucket of the cache. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * The name of the cache. + */ + cacheName: string; + }; + export type Header = { + name: string; + value: string; + }; + /** + * Cached response + */ + export type CachedResponse = { + /** + * Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON) + */ + body: string; + }; + /** + * Deletes a cache. + * @request `CacheStorage.deleteCache` + */ + export type DeleteCacheRequest = { + /** + * Id of cache for deletion. + */ + cacheId: CacheId; + }; + /** + * Deletes a cache. + * @response `CacheStorage.deleteCache` + */ + export type DeleteCacheResponse = {}; + /** + * Deletes a cache entry. + * @request `CacheStorage.deleteEntry` + */ + export type DeleteEntryRequest = { + /** + * Id of cache where the entry will be deleted. + */ + cacheId: CacheId; + /** + * URL spec of the request. + */ + request: string; + }; + /** + * Deletes a cache entry. + * @response `CacheStorage.deleteEntry` + */ + export type DeleteEntryResponse = {}; + /** + * Requests cache names. + * @request `CacheStorage.requestCacheNames` + */ + export type RequestCacheNamesRequest = { + /** + * At least and at most one of securityOrigin, storageKey, storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + }; + /** + * Requests cache names. + * @response `CacheStorage.requestCacheNames` + */ + export type RequestCacheNamesResponse = { + /** + * Caches for the security origin. + */ + caches: Cache[]; + }; + /** + * Fetches cache entry. + * @request `CacheStorage.requestCachedResponse` + */ + export type RequestCachedResponseRequest = { + /** + * Id of cache that contains the entry. + */ + cacheId: CacheId; + /** + * URL spec of the request. + */ + requestURL: string; + /** + * headers of the request. + */ + requestHeaders: Header[]; + }; + /** + * Fetches cache entry. + * @response `CacheStorage.requestCachedResponse` + */ + export type RequestCachedResponseResponse = { + /** + * Response read from the cache. + */ + response: CachedResponse; + }; + /** + * Requests data from cache. + * @request `CacheStorage.requestEntries` + */ + export type RequestEntriesRequest = { + /** + * ID of cache to get entries from. + */ + cacheId: CacheId; + /** + * Number of records to skip. + */ + skipCount?: number | undefined; + /** + * Number of records to fetch. + */ + pageSize?: number | undefined; + /** + * If present, only return the entries containing this substring in the path + */ + pathFilter?: string | undefined; + }; + /** + * Requests data from cache. + * @response `CacheStorage.requestEntries` + */ + export type RequestEntriesResponse = { + /** + * Array of object store data entries. + */ + cacheDataEntries: DataEntry[]; + /** + * Count of returned entries from this storage. If pathFilter is empty, it + * is the count of all entries from this storage. + */ + returnCount: number; + }; + } + export namespace Cast { + export type Sink = { + name: string; + id: string; + /** + * Text describing the current session. Present only if there is an active + * session on the sink. + */ + session?: string | undefined; + }; + /** + * This is fired whenever the list of available sinks changes. A sink is a + * device or a software surface that you can cast to. + * @event `Cast.sinksUpdated` + */ + export type SinksUpdatedEvent = { + sinks: Sink[]; + }; + /** + * This is fired whenever the outstanding issue/error message changes. + * |issueMessage| is empty if there is no issue. + * @event `Cast.issueUpdated` + */ + export type IssueUpdatedEvent = { + issueMessage: string; + }; + /** + * Starts observing for sinks that can be used for tab mirroring, and if set, + * sinks compatible with |presentationUrl| as well. When sinks are found, a + * |sinksUpdated| event is fired. + * Also starts observing for issue messages. When an issue is added or removed, + * an |issueUpdated| event is fired. + * @request `Cast.enable` + */ + export type EnableRequest = { + presentationUrl?: string | undefined; + }; + /** + * Starts observing for sinks that can be used for tab mirroring, and if set, + * sinks compatible with |presentationUrl| as well. When sinks are found, a + * |sinksUpdated| event is fired. + * Also starts observing for issue messages. When an issue is added or removed, + * an |issueUpdated| event is fired. + * @response `Cast.enable` + */ + export type EnableResponse = {}; + /** + * Stops observing for sinks and issues. + * @request `Cast.disable` + */ + export type DisableRequest = {}; + /** + * Stops observing for sinks and issues. + * @response `Cast.disable` + */ + export type DisableResponse = {}; + /** + * Sets a sink to be used when the web page requests the browser to choose a + * sink via Presentation API, Remote Playback API, or Cast SDK. + * @request `Cast.setSinkToUse` + */ + export type SetSinkToUseRequest = { + sinkName: string; + }; + /** + * Sets a sink to be used when the web page requests the browser to choose a + * sink via Presentation API, Remote Playback API, or Cast SDK. + * @response `Cast.setSinkToUse` + */ + export type SetSinkToUseResponse = {}; + /** + * Starts mirroring the desktop to the sink. + * @request `Cast.startDesktopMirroring` + */ + export type StartDesktopMirroringRequest = { + sinkName: string; + }; + /** + * Starts mirroring the desktop to the sink. + * @response `Cast.startDesktopMirroring` + */ + export type StartDesktopMirroringResponse = {}; + /** + * Starts mirroring the tab to the sink. + * @request `Cast.startTabMirroring` + */ + export type StartTabMirroringRequest = { + sinkName: string; + }; + /** + * Starts mirroring the tab to the sink. + * @response `Cast.startTabMirroring` + */ + export type StartTabMirroringResponse = {}; + /** + * Stops the active Cast session on the sink. + * @request `Cast.stopCasting` + */ + export type StopCastingRequest = { + sinkName: string; + }; + /** + * Stops the active Cast session on the sink. + * @response `Cast.stopCasting` + */ + export type StopCastingResponse = {}; + } + export namespace CSS { + export type StyleSheetId = string; + /** + * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent + * stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via + * inspector" rules), "regular" for regular stylesheets. + */ + export type StyleSheetOrigin = "injected" | "user-agent" | "inspector" | "regular"; + /** + * CSS rule collection for a single pseudo style. + */ + export type PseudoElementMatches = { + /** + * Pseudo element type. + */ + pseudoType: DOM.PseudoType; + /** + * Pseudo element custom ident. + */ + pseudoIdentifier?: string | undefined; + /** + * Matches of CSS rules applicable to the pseudo style. + */ + matches: RuleMatch[]; + }; + /** + * Inherited CSS rule collection from ancestor node. + */ + export type InheritedStyleEntry = { + /** + * The ancestor node's inline style, if any, in the style inheritance chain. + */ + inlineStyle?: CSSStyle | undefined; + /** + * Matches of CSS rules matching the ancestor node in the style inheritance chain. + */ + matchedCSSRules: RuleMatch[]; + }; + /** + * Inherited pseudo element matches from pseudos of an ancestor node. + */ + export type InheritedPseudoElementMatches = { + /** + * Matches of pseudo styles from the pseudos of an ancestor node. + */ + pseudoElements: PseudoElementMatches[]; + }; + /** + * Match data for a CSS rule. + */ + export type RuleMatch = { + /** + * CSS rule in the match. + */ + rule: CSSRule; + /** + * Matching selector indices in the rule's selectorList selectors (0-based). + */ + matchingSelectors: number[]; + }; + /** + * Data for a simple selector (these are delimited by commas in a selector list). + */ + export type Value = { + /** + * Value text. + */ + text: string; + /** + * Value range in the underlying resource (if available). + */ + range?: SourceRange | undefined; + /** + * Specificity of the selector. + */ + specificity?: Specificity | undefined; + }; + /** + * Specificity: + * https://drafts.csswg.org/selectors/#specificity-rules + */ + export type Specificity = { + /** + * The a component, which represents the number of ID selectors. + */ + a: number; + /** + * The b component, which represents the number of class selectors, attributes selectors, and + * pseudo-classes. + */ + b: number; + /** + * The c component, which represents the number of type selectors and pseudo-elements. + */ + c: number; + }; + /** + * Selector list data. + */ + export type SelectorList = { + /** + * Selectors in the list. + */ + selectors: Value[]; + /** + * Rule selector text. + */ + text: string; + }; + /** + * CSS stylesheet metainformation. + */ + export type CSSStyleSheetHeader = { + /** + * The stylesheet identifier. + */ + styleSheetId: StyleSheetId; + /** + * Owner frame identifier. + */ + frameId: Page.FrameId; + /** + * Stylesheet resource URL. Empty if this is a constructed stylesheet created using + * new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported + * as a CSS module script). + */ + sourceURL: string; + /** + * URL of source map associated with the stylesheet (if any). + */ + sourceMapURL?: string | undefined; + /** + * Stylesheet origin. + */ + origin: StyleSheetOrigin; + /** + * Stylesheet title. + */ + title: string; + /** + * The backend id for the owner node of the stylesheet. + */ + ownerNode?: DOM.BackendNodeId | undefined; + /** + * Denotes whether the stylesheet is disabled. + */ + disabled: boolean; + /** + * Whether the sourceURL field value comes from the sourceURL comment. + */ + hasSourceURL?: boolean | undefined; + /** + * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for + * document.written STYLE tags. + */ + isInline: boolean; + /** + * Whether this stylesheet is mutable. Inline stylesheets become mutable + * after they have been modified via CSSOM API. + * `<link>` element's stylesheets become mutable only if DevTools modifies them. + * Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation. + */ + isMutable: boolean; + /** + * True if this stylesheet is created through new CSSStyleSheet() or imported as a + * CSS module script. + */ + isConstructed: boolean; + /** + * Line offset of the stylesheet within the resource (zero based). + */ + startLine: number; + /** + * Column offset of the stylesheet within the resource (zero based). + */ + startColumn: number; + /** + * Size of the content (in characters). + */ + length: number; + /** + * Line offset of the end of the stylesheet within the resource (zero based). + */ + endLine: number; + /** + * Column offset of the end of the stylesheet within the resource (zero based). + */ + endColumn: number; + /** + * If the style sheet was loaded from a network resource, this indicates when the resource failed to load + */ + loadingFailed?: boolean | undefined; + }; + /** + * CSS rule representation. + */ + export type CSSRule = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Rule selector data. + */ + selectorList: SelectorList; + /** + * Array of selectors from ancestor style rules, sorted by distance from the current rule. + */ + nestingSelectors?: string[] | undefined; + /** + * Parent stylesheet's origin. + */ + origin: StyleSheetOrigin; + /** + * Associated style declaration. + */ + style: CSSStyle; + /** + * Media list array (for rules involving media queries). The array enumerates media queries + * starting with the innermost one, going outwards. + */ + media?: CSSMedia[] | undefined; + /** + * Container query list array (for rules involving container queries). + * The array enumerates container queries starting with the innermost one, going outwards. + */ + containerQueries?: CSSContainerQuery[] | undefined; + /** + * @supports CSS at-rule array. + * The array enumerates @supports at-rules starting with the innermost one, going outwards. + */ + supports?: CSSSupports[] | undefined; + /** + * Cascade layer array. Contains the layer hierarchy that this rule belongs to starting + * with the innermost layer and going outwards. + */ + layers?: CSSLayer[] | undefined; + /** + * @scope CSS at-rule array. + * The array enumerates @scope at-rules starting with the innermost one, going outwards. + */ + scopes?: CSSScope[] | undefined; + /** + * The array keeps the types of ancestor CSSRules from the innermost going outwards. + */ + ruleTypes?: CSSRuleType[] | undefined; + }; + /** + * Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. + * This list only contains rule types that are collected during the ancestor rule collection. + */ + export type CSSRuleType = "MediaRule" | "SupportsRule" | "ContainerRule" | "LayerRule" | "ScopeRule" | "StyleRule"; + /** + * CSS coverage information. + */ + export type RuleUsage = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId: StyleSheetId; + /** + * Offset of the start of the rule (including selector) from the beginning of the stylesheet. + */ + startOffset: number; + /** + * Offset of the end of the rule body from the beginning of the stylesheet. + */ + endOffset: number; + /** + * Indicates whether the rule was actually used by some element in the page. + */ + used: boolean; + }; + /** + * Text range within a resource. All numbers are zero-based. + */ + export type SourceRange = { + /** + * Start line of range. + */ + startLine: number; + /** + * Start column of range (inclusive). + */ + startColumn: number; + /** + * End line of range + */ + endLine: number; + /** + * End column of range (exclusive). + */ + endColumn: number; + }; + export type ShorthandEntry = { + /** + * Shorthand name. + */ + name: string; + /** + * Shorthand value. + */ + value: string; + /** + * Whether the property has "!important" annotation (implies `false` if absent). + */ + important?: boolean | undefined; + }; + export type CSSComputedStyleProperty = { + /** + * Computed style property name. + */ + name: string; + /** + * Computed style property value. + */ + value: string; + }; + /** + * CSS style representation. + */ + export type CSSStyle = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId?: StyleSheetId | undefined; + /** + * CSS properties in the style. + */ + cssProperties: CSSProperty[]; + /** + * Computed values for all shorthands found in the style. + */ + shorthandEntries: ShorthandEntry[]; + /** + * Style declaration text (if available). + */ + cssText?: string | undefined; + /** + * Style declaration range in the enclosing stylesheet (if available). + */ + range?: SourceRange | undefined; + }; + /** + * CSS property declaration data. + */ + export type CSSProperty = { + /** + * The property name. + */ + name: string; + /** + * The property value. + */ + value: string; + /** + * Whether the property has "!important" annotation (implies `false` if absent). + */ + important?: boolean | undefined; + /** + * Whether the property is implicit (implies `false` if absent). + */ + implicit?: boolean | undefined; + /** + * The full property text as specified in the style. + */ + text?: string | undefined; + /** + * Whether the property is understood by the browser (implies `true` if absent). + */ + parsedOk?: boolean | undefined; + /** + * Whether the property is disabled by the user (present for source-based properties only). + */ + disabled?: boolean | undefined; + /** + * The entire property range in the enclosing style declaration (if available). + */ + range?: SourceRange | undefined; + /** + * Parsed longhand components of this property if it is a shorthand. + * This field will be empty if the given property is not a shorthand. + */ + longhandProperties?: CSSProperty[] | undefined; + }; + /** + * CSS media rule descriptor. + */ + export type CSSMedia = { + /** + * Media query text. + */ + text: string; + /** + * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if + * specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked + * stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline + * stylesheet's STYLE tag. + */ + source: "mediaRule" | "importRule" | "linkedSheet" | "inlineSheet"; + /** + * URL of the document containing the media query description. + */ + sourceURL?: string | undefined; + /** + * The associated rule (@media or @import) header range in the enclosing stylesheet (if + * available). + */ + range?: SourceRange | undefined; + /** + * Identifier of the stylesheet containing this object (if exists). + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Array of media queries. + */ + mediaList?: MediaQuery[] | undefined; + }; + /** + * Media query descriptor. + */ + export type MediaQuery = { + /** + * Array of media query expressions. + */ + expressions: MediaQueryExpression[]; + /** + * Whether the media query condition is satisfied. + */ + active: boolean; + }; + /** + * Media query expression descriptor. + */ + export type MediaQueryExpression = { + /** + * Media query expression value. + */ + value: number; + /** + * Media query expression units. + */ + unit: string; + /** + * Media query expression feature. + */ + feature: string; + /** + * The associated range of the value text in the enclosing stylesheet (if available). + */ + valueRange?: SourceRange | undefined; + /** + * Computed length of media query expression (if applicable). + */ + computedLength?: number | undefined; + }; + /** + * CSS container query rule descriptor. + */ + export type CSSContainerQuery = { + /** + * Container query text. + */ + text: string; + /** + * The associated rule header range in the enclosing stylesheet (if + * available). + */ + range?: SourceRange | undefined; + /** + * Identifier of the stylesheet containing this object (if exists). + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Optional name for the container. + */ + name?: string | undefined; + /** + * Optional physical axes queried for the container. + */ + physicalAxes?: DOM.PhysicalAxes | undefined; + /** + * Optional logical axes queried for the container. + */ + logicalAxes?: DOM.LogicalAxes | undefined; + }; + /** + * CSS Supports at-rule descriptor. + */ + export type CSSSupports = { + /** + * Supports rule text. + */ + text: string; + /** + * Whether the supports condition is satisfied. + */ + active: boolean; + /** + * The associated rule header range in the enclosing stylesheet (if + * available). + */ + range?: SourceRange | undefined; + /** + * Identifier of the stylesheet containing this object (if exists). + */ + styleSheetId?: StyleSheetId | undefined; + }; + /** + * CSS Scope at-rule descriptor. + */ + export type CSSScope = { + /** + * Scope rule text. + */ + text: string; + /** + * The associated rule header range in the enclosing stylesheet (if + * available). + */ + range?: SourceRange | undefined; + /** + * Identifier of the stylesheet containing this object (if exists). + */ + styleSheetId?: StyleSheetId | undefined; + }; + /** + * CSS Layer at-rule descriptor. + */ + export type CSSLayer = { + /** + * Layer name. + */ + text: string; + /** + * The associated rule header range in the enclosing stylesheet (if + * available). + */ + range?: SourceRange | undefined; + /** + * Identifier of the stylesheet containing this object (if exists). + */ + styleSheetId?: StyleSheetId | undefined; + }; + /** + * CSS Layer data. + */ + export type CSSLayerData = { + /** + * Layer name. + */ + name: string; + /** + * Direct sub-layers + */ + subLayers?: CSSLayerData[] | undefined; + /** + * Layer order. The order determines the order of the layer in the cascade order. + * A higher number has higher priority in the cascade order. + */ + order: number; + }; + /** + * Information about amount of glyphs that were rendered with given font. + */ + export type PlatformFontUsage = { + /** + * Font's family name reported by platform. + */ + familyName: string; + /** + * Indicates if the font was downloaded or resolved locally. + */ + isCustomFont: boolean; + /** + * Amount of glyphs that were rendered with this font. + */ + glyphCount: number; + }; + /** + * Information about font variation axes for variable fonts + */ + export type FontVariationAxis = { + /** + * The font-variation-setting tag (a.k.a. "axis tag"). + */ + tag: string; + /** + * Human-readable variation name in the default language (normally, "en"). + */ + name: string; + /** + * The minimum value (inclusive) the font supports for this tag. + */ + minValue: number; + /** + * The maximum value (inclusive) the font supports for this tag. + */ + maxValue: number; + /** + * The default value. + */ + defaultValue: number; + }; + /** + * Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions + * and additional information such as platformFontFamily and fontVariationAxes. + */ + export type FontFace = { + /** + * The font-family. + */ + fontFamily: string; + /** + * The font-style. + */ + fontStyle: string; + /** + * The font-variant. + */ + fontVariant: string; + /** + * The font-weight. + */ + fontWeight: string; + /** + * The font-stretch. + */ + fontStretch: string; + /** + * The font-display. + */ + fontDisplay: string; + /** + * The unicode-range. + */ + unicodeRange: string; + /** + * The src. + */ + src: string; + /** + * The resolved platform font family + */ + platformFontFamily: string; + /** + * Available variation settings (a.k.a. "axes"). + */ + fontVariationAxes?: FontVariationAxis[] | undefined; + }; + /** + * CSS try rule representation. + */ + export type CSSTryRule = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Parent stylesheet's origin. + */ + origin: StyleSheetOrigin; + /** + * Associated style declaration. + */ + style: CSSStyle; + }; + /** + * CSS position-fallback rule representation. + */ + export type CSSPositionFallbackRule = { + name: Value; + /** + * List of keyframes. + */ + tryRules: CSSTryRule[]; + }; + /** + * CSS keyframes rule representation. + */ + export type CSSKeyframesRule = { + /** + * Animation name. + */ + animationName: Value; + /** + * List of keyframes. + */ + keyframes: CSSKeyframeRule[]; + }; + /** + * Representation of a custom property registration through CSS.registerProperty + */ + export type CSSPropertyRegistration = { + propertyName: string; + initialValue?: Value | undefined; + inherits: boolean; + syntax: string; + }; + /** + * CSS property at-rule representation. + */ + export type CSSPropertyRule = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Parent stylesheet's origin. + */ + origin: StyleSheetOrigin; + /** + * Associated property name. + */ + propertyName: Value; + /** + * Associated style declaration. + */ + style: CSSStyle; + }; + /** + * CSS keyframe rule representation. + */ + export type CSSKeyframeRule = { + /** + * The css style sheet identifier (absent for user agent stylesheet and user-specified + * stylesheet rules) this rule came from. + */ + styleSheetId?: StyleSheetId | undefined; + /** + * Parent stylesheet's origin. + */ + origin: StyleSheetOrigin; + /** + * Associated key text. + */ + keyText: Value; + /** + * Associated style declaration. + */ + style: CSSStyle; + }; + /** + * A descriptor of operation to mutate style declaration text. + */ + export type StyleDeclarationEdit = { + /** + * The css style sheet identifier. + */ + styleSheetId: StyleSheetId; + /** + * The range of the style text in the enclosing stylesheet. + */ + range: SourceRange; + /** + * New style text. + */ + text: string; + }; + /** + * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded + * web font. + * @event `CSS.fontsUpdated` + */ + export type FontsUpdatedEvent = { + /** + * The web font that has loaded. + */ + font?: FontFace | undefined; + }; + /** + * Fires whenever a MediaQuery result changes (for example, after a browser window has been + * resized.) The current implementation considers only viewport-dependent media features. + * @event `CSS.mediaQueryResultChanged` + */ + export type MediaQueryResultChangedEvent = {}; + /** + * Fired whenever an active document stylesheet is added. + * @event `CSS.styleSheetAdded` + */ + export type StyleSheetAddedEvent = { + /** + * Added stylesheet metainfo. + */ + header: CSSStyleSheetHeader; + }; + /** + * Fired whenever a stylesheet is changed as a result of the client operation. + * @event `CSS.styleSheetChanged` + */ + export type StyleSheetChangedEvent = { + styleSheetId: StyleSheetId; + }; + /** + * Fired whenever an active document stylesheet is removed. + * @event `CSS.styleSheetRemoved` + */ + export type StyleSheetRemovedEvent = { + /** + * Identifier of the removed stylesheet. + */ + styleSheetId: StyleSheetId; + }; + /** + * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the + * position specified by `location`. + * @request `CSS.addRule` + */ + export type AddRuleRequest = { + /** + * The css style sheet identifier where a new rule should be inserted. + */ + styleSheetId: StyleSheetId; + /** + * The text of a new rule. + */ + ruleText: string; + /** + * Text position of a new rule in the target style sheet. + */ + location: SourceRange; + }; + /** + * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the + * position specified by `location`. + * @response `CSS.addRule` + */ + export type AddRuleResponse = { + /** + * The newly created rule. + */ + rule: CSSRule; + }; + /** + * Returns all class names from specified stylesheet. + * @request `CSS.collectClassNames` + */ + export type CollectClassNamesRequest = { + styleSheetId: StyleSheetId; + }; + /** + * Returns all class names from specified stylesheet. + * @response `CSS.collectClassNames` + */ + export type CollectClassNamesResponse = { + /** + * Class name list. + */ + classNames: string[]; + }; + /** + * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. + * @request `CSS.createStyleSheet` + */ + export type CreateStyleSheetRequest = { + /** + * Identifier of the frame where "via-inspector" stylesheet should be created. + */ + frameId: Page.FrameId; + }; + /** + * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. + * @response `CSS.createStyleSheet` + */ + export type CreateStyleSheetResponse = { + /** + * Identifier of the created "via-inspector" stylesheet. + */ + styleSheetId: StyleSheetId; + }; + /** + * Disables the CSS agent for the given page. + * @request `CSS.disable` + */ + export type DisableRequest = {}; + /** + * Disables the CSS agent for the given page. + * @response `CSS.disable` + */ + export type DisableResponse = {}; + /** + * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been + * enabled until the result of this command is received. + * @request `CSS.enable` + */ + export type EnableRequest = {}; + /** + * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been + * enabled until the result of this command is received. + * @response `CSS.enable` + */ + export type EnableResponse = {}; + /** + * Ensures that the given node will have specified pseudo-classes whenever its style is computed by + * the browser. + * @request `CSS.forcePseudoState` + */ + export type ForcePseudoStateRequest = { + /** + * The element id for which to force the pseudo state. + */ + nodeId: DOM.NodeId; + /** + * Element pseudo classes to force when computing the element's style. + */ + forcedPseudoClasses: string[]; + }; + /** + * Ensures that the given node will have specified pseudo-classes whenever its style is computed by + * the browser. + * @response `CSS.forcePseudoState` + */ + export type ForcePseudoStateResponse = {}; + /** + * undefined + * @request `CSS.getBackgroundColors` + */ + export type GetBackgroundColorsRequest = { + /** + * Id of the node to get background colors for. + */ + nodeId: DOM.NodeId; + }; + /** + * undefined + * @response `CSS.getBackgroundColors` + */ + export type GetBackgroundColorsResponse = { + /** + * The range of background colors behind this element, if it contains any visible text. If no + * visible text is present, this will be undefined. In the case of a flat background color, + * this will consist of simply that color. In the case of a gradient, this will consist of each + * of the color stops. For anything more complicated, this will be an empty array. Images will + * be ignored (as if the image had failed to load). + */ + backgroundColors?: string[] | undefined; + /** + * The computed font size for this node, as a CSS computed value string (e.g. '12px'). + */ + computedFontSize?: string | undefined; + /** + * The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or + * '100'). + */ + computedFontWeight?: string | undefined; + }; + /** + * Returns the computed style for a DOM node identified by `nodeId`. + * @request `CSS.getComputedStyleForNode` + */ + export type GetComputedStyleForNodeRequest = { + nodeId: DOM.NodeId; + }; + /** + * Returns the computed style for a DOM node identified by `nodeId`. + * @response `CSS.getComputedStyleForNode` + */ + export type GetComputedStyleForNodeResponse = { + /** + * Computed style for the specified DOM node. + */ + computedStyle: CSSComputedStyleProperty[]; + }; + /** + * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM + * attributes) for a DOM node identified by `nodeId`. + * @request `CSS.getInlineStylesForNode` + */ + export type GetInlineStylesForNodeRequest = { + nodeId: DOM.NodeId; + }; + /** + * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM + * attributes) for a DOM node identified by `nodeId`. + * @response `CSS.getInlineStylesForNode` + */ + export type GetInlineStylesForNodeResponse = { + /** + * Inline style for the specified DOM node. + */ + inlineStyle?: CSSStyle | undefined; + /** + * Attribute-defined element style (e.g. resulting from "width=20 height=100%"). + */ + attributesStyle?: CSSStyle | undefined; + }; + /** + * Returns requested styles for a DOM node identified by `nodeId`. + * @request `CSS.getMatchedStylesForNode` + */ + export type GetMatchedStylesForNodeRequest = { + nodeId: DOM.NodeId; + }; + /** + * Returns requested styles for a DOM node identified by `nodeId`. + * @response `CSS.getMatchedStylesForNode` + */ + export type GetMatchedStylesForNodeResponse = { + /** + * Inline style for the specified DOM node. + */ + inlineStyle?: CSSStyle | undefined; + /** + * Attribute-defined element style (e.g. resulting from "width=20 height=100%"). + */ + attributesStyle?: CSSStyle | undefined; + /** + * CSS rules matching this node, from all applicable stylesheets. + */ + matchedCSSRules?: RuleMatch[] | undefined; + /** + * Pseudo style matches for this node. + */ + pseudoElements?: PseudoElementMatches[] | undefined; + /** + * A chain of inherited styles (from the immediate node parent up to the DOM tree root). + */ + inherited?: InheritedStyleEntry[] | undefined; + /** + * A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root). + */ + inheritedPseudoElements?: InheritedPseudoElementMatches[] | undefined; + /** + * A list of CSS keyframed animations matching this node. + */ + cssKeyframesRules?: CSSKeyframesRule[] | undefined; + /** + * A list of CSS position fallbacks matching this node. + */ + cssPositionFallbackRules?: CSSPositionFallbackRule[] | undefined; + /** + * A list of CSS at-property rules matching this node. + */ + cssPropertyRules?: CSSPropertyRule[] | undefined; + /** + * A list of CSS property registrations matching this node. + */ + cssPropertyRegistrations?: CSSPropertyRegistration[] | undefined; + /** + * Id of the first parent element that does not have display: contents. + */ + parentLayoutNodeId?: DOM.NodeId | undefined; + }; + /** + * Returns all media queries parsed by the rendering engine. + * @request `CSS.getMediaQueries` + */ + export type GetMediaQueriesRequest = {}; + /** + * Returns all media queries parsed by the rendering engine. + * @response `CSS.getMediaQueries` + */ + export type GetMediaQueriesResponse = { + medias: CSSMedia[]; + }; + /** + * Requests information about platform fonts which we used to render child TextNodes in the given + * node. + * @request `CSS.getPlatformFontsForNode` + */ + export type GetPlatformFontsForNodeRequest = { + nodeId: DOM.NodeId; + }; + /** + * Requests information about platform fonts which we used to render child TextNodes in the given + * node. + * @response `CSS.getPlatformFontsForNode` + */ + export type GetPlatformFontsForNodeResponse = { + /** + * Usage statistics for every employed platform font. + */ + fonts: PlatformFontUsage[]; + }; + /** + * Returns the current textual content for a stylesheet. + * @request `CSS.getStyleSheetText` + */ + export type GetStyleSheetTextRequest = { + styleSheetId: StyleSheetId; + }; + /** + * Returns the current textual content for a stylesheet. + * @response `CSS.getStyleSheetText` + */ + export type GetStyleSheetTextResponse = { + /** + * The stylesheet text. + */ + text: string; + }; + /** + * Returns all layers parsed by the rendering engine for the tree scope of a node. + * Given a DOM element identified by nodeId, getLayersForNode returns the root + * layer for the nearest ancestor document or shadow root. The layer root contains + * the full layer tree for the tree scope and their ordering. + * @request `CSS.getLayersForNode` + */ + export type GetLayersForNodeRequest = { + nodeId: DOM.NodeId; + }; + /** + * Returns all layers parsed by the rendering engine for the tree scope of a node. + * Given a DOM element identified by nodeId, getLayersForNode returns the root + * layer for the nearest ancestor document or shadow root. The layer root contains + * the full layer tree for the tree scope and their ordering. + * @response `CSS.getLayersForNode` + */ + export type GetLayersForNodeResponse = { + rootLayer: CSSLayerData; + }; + /** + * Starts tracking the given computed styles for updates. The specified array of properties + * replaces the one previously specified. Pass empty array to disable tracking. + * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. + * The changes to computed style properties are only tracked for nodes pushed to the front-end + * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed + * to the front-end, no updates will be issued for the node. + * @request `CSS.trackComputedStyleUpdates` + */ + export type TrackComputedStyleUpdatesRequest = { + propertiesToTrack: CSSComputedStyleProperty[]; + }; + /** + * Starts tracking the given computed styles for updates. The specified array of properties + * replaces the one previously specified. Pass empty array to disable tracking. + * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. + * The changes to computed style properties are only tracked for nodes pushed to the front-end + * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed + * to the front-end, no updates will be issued for the node. + * @response `CSS.trackComputedStyleUpdates` + */ + export type TrackComputedStyleUpdatesResponse = {}; + /** + * Polls the next batch of computed style updates. + * @request `CSS.takeComputedStyleUpdates` + */ + export type TakeComputedStyleUpdatesRequest = {}; + /** + * Polls the next batch of computed style updates. + * @response `CSS.takeComputedStyleUpdates` + */ + export type TakeComputedStyleUpdatesResponse = { + /** + * The list of node Ids that have their tracked computed styles updated. + */ + nodeIds: DOM.NodeId[]; + }; + /** + * Find a rule with the given active property for the given node and set the new value for this + * property + * @request `CSS.setEffectivePropertyValueForNode` + */ + export type SetEffectivePropertyValueForNodeRequest = { + /** + * The element id for which to set property. + */ + nodeId: DOM.NodeId; + propertyName: string; + value: string; + }; + /** + * Find a rule with the given active property for the given node and set the new value for this + * property + * @response `CSS.setEffectivePropertyValueForNode` + */ + export type SetEffectivePropertyValueForNodeResponse = {}; + /** + * Modifies the keyframe rule key text. + * @request `CSS.setKeyframeKey` + */ + export type SetKeyframeKeyRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + keyText: string; + }; + /** + * Modifies the keyframe rule key text. + * @response `CSS.setKeyframeKey` + */ + export type SetKeyframeKeyResponse = { + /** + * The resulting key text after modification. + */ + keyText: Value; + }; + /** + * Modifies the rule selector. + * @request `CSS.setMediaText` + */ + export type SetMediaTextRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + text: string; + }; + /** + * Modifies the rule selector. + * @response `CSS.setMediaText` + */ + export type SetMediaTextResponse = { + /** + * The resulting CSS media rule after modification. + */ + media: CSSMedia; + }; + /** + * Modifies the expression of a container query. + * @request `CSS.setContainerQueryText` + */ + export type SetContainerQueryTextRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + text: string; + }; + /** + * Modifies the expression of a container query. + * @response `CSS.setContainerQueryText` + */ + export type SetContainerQueryTextResponse = { + /** + * The resulting CSS container query rule after modification. + */ + containerQuery: CSSContainerQuery; + }; + /** + * Modifies the expression of a supports at-rule. + * @request `CSS.setSupportsText` + */ + export type SetSupportsTextRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + text: string; + }; + /** + * Modifies the expression of a supports at-rule. + * @response `CSS.setSupportsText` + */ + export type SetSupportsTextResponse = { + /** + * The resulting CSS Supports rule after modification. + */ + supports: CSSSupports; + }; + /** + * Modifies the expression of a scope at-rule. + * @request `CSS.setScopeText` + */ + export type SetScopeTextRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + text: string; + }; + /** + * Modifies the expression of a scope at-rule. + * @response `CSS.setScopeText` + */ + export type SetScopeTextResponse = { + /** + * The resulting CSS Scope rule after modification. + */ + scope: CSSScope; + }; + /** + * Modifies the rule selector. + * @request `CSS.setRuleSelector` + */ + export type SetRuleSelectorRequest = { + styleSheetId: StyleSheetId; + range: SourceRange; + selector: string; + }; + /** + * Modifies the rule selector. + * @response `CSS.setRuleSelector` + */ + export type SetRuleSelectorResponse = { + /** + * The resulting selector list after modification. + */ + selectorList: SelectorList; + }; + /** + * Sets the new stylesheet text. + * @request `CSS.setStyleSheetText` + */ + export type SetStyleSheetTextRequest = { + styleSheetId: StyleSheetId; + text: string; + }; + /** + * Sets the new stylesheet text. + * @response `CSS.setStyleSheetText` + */ + export type SetStyleSheetTextResponse = { + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string | undefined; + }; + /** + * Applies specified style edits one after another in the given order. + * @request `CSS.setStyleTexts` + */ + export type SetStyleTextsRequest = { + edits: StyleDeclarationEdit[]; + }; + /** + * Applies specified style edits one after another in the given order. + * @response `CSS.setStyleTexts` + */ + export type SetStyleTextsResponse = { + /** + * The resulting styles after modification. + */ + styles: CSSStyle[]; + }; + /** + * Enables the selector recording. + * @request `CSS.startRuleUsageTracking` + */ + export type StartRuleUsageTrackingRequest = {}; + /** + * Enables the selector recording. + * @response `CSS.startRuleUsageTracking` + */ + export type StartRuleUsageTrackingResponse = {}; + /** + * Stop tracking rule usage and return the list of rules that were used since last call to + * `takeCoverageDelta` (or since start of coverage instrumentation). + * @request `CSS.stopRuleUsageTracking` + */ + export type StopRuleUsageTrackingRequest = {}; + /** + * Stop tracking rule usage and return the list of rules that were used since last call to + * `takeCoverageDelta` (or since start of coverage instrumentation). + * @response `CSS.stopRuleUsageTracking` + */ + export type StopRuleUsageTrackingResponse = { + ruleUsage: RuleUsage[]; + }; + /** + * Obtain list of rules that became used since last call to this method (or since start of coverage + * instrumentation). + * @request `CSS.takeCoverageDelta` + */ + export type TakeCoverageDeltaRequest = {}; + /** + * Obtain list of rules that became used since last call to this method (or since start of coverage + * instrumentation). + * @response `CSS.takeCoverageDelta` + */ + export type TakeCoverageDeltaResponse = { + coverage: RuleUsage[]; + /** + * Monotonically increasing time, in seconds. + */ + timestamp: number; + }; + /** + * Enables/disables rendering of local CSS fonts (enabled by default). + * @request `CSS.setLocalFontsEnabled` + */ + export type SetLocalFontsEnabledRequest = { + /** + * Whether rendering of local fonts is enabled. + */ + enabled: boolean; + }; + /** + * Enables/disables rendering of local CSS fonts (enabled by default). + * @response `CSS.setLocalFontsEnabled` + */ + export type SetLocalFontsEnabledResponse = {}; + } + export namespace Database { + /** + * Unique identifier of Database object. + */ + export type DatabaseId = string; + /** + * Database object. + */ + export type Database = { + /** + * Database ID. + */ + id: DatabaseId; + /** + * Database domain. + */ + domain: string; + /** + * Database name. + */ + name: string; + /** + * Database version. + */ + version: string; + }; + /** + * Database error. + */ + export type Error = { + /** + * Error message. + */ + message: string; + /** + * Error code. + */ + code: number; + }; + /** + * undefined + * @event `Database.addDatabase` + */ + export type AddDatabaseEvent = { + database: Database; + }; + /** + * Disables database tracking, prevents database events from being sent to the client. + * @request `Database.disable` + */ + export type DisableRequest = {}; + /** + * Disables database tracking, prevents database events from being sent to the client. + * @response `Database.disable` + */ + export type DisableResponse = {}; + /** + * Enables database tracking, database events will now be delivered to the client. + * @request `Database.enable` + */ + export type EnableRequest = {}; + /** + * Enables database tracking, database events will now be delivered to the client. + * @response `Database.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `Database.executeSQL` + */ + export type ExecuteSQLRequest = { + databaseId: DatabaseId; + query: string; + }; + /** + * undefined + * @response `Database.executeSQL` + */ + export type ExecuteSQLResponse = { + columnNames?: string[] | undefined; + values?: unknown[] | undefined; + sqlError?: Error | undefined; + }; + /** + * undefined + * @request `Database.getDatabaseTableNames` + */ + export type GetDatabaseTableNamesRequest = { + databaseId: DatabaseId; + }; + /** + * undefined + * @response `Database.getDatabaseTableNames` + */ + export type GetDatabaseTableNamesResponse = { + tableNames: string[]; + }; + } + export namespace DeviceAccess { + /** + * Device request id. + */ + export type RequestId = string; + /** + * A device id. + */ + export type DeviceId = string; + /** + * Device information displayed in a user prompt to select a device. + */ + export type PromptDevice = { + id: DeviceId; + /** + * Display name as it appears in a device request user prompt. + */ + name: string; + }; + /** + * A device request opened a user prompt to select a device. Respond with the + * selectPrompt or cancelPrompt command. + * @event `DeviceAccess.deviceRequestPrompted` + */ + export type DeviceRequestPromptedEvent = { + id: RequestId; + devices: PromptDevice[]; + }; + /** + * Enable events in this domain. + * @request `DeviceAccess.enable` + */ + export type EnableRequest = {}; + /** + * Enable events in this domain. + * @response `DeviceAccess.enable` + */ + export type EnableResponse = {}; + /** + * Disable events in this domain. + * @request `DeviceAccess.disable` + */ + export type DisableRequest = {}; + /** + * Disable events in this domain. + * @response `DeviceAccess.disable` + */ + export type DisableResponse = {}; + /** + * Select a device in response to a DeviceAccess.deviceRequestPrompted event. + * @request `DeviceAccess.selectPrompt` + */ + export type SelectPromptRequest = { + id: RequestId; + deviceId: DeviceId; + }; + /** + * Select a device in response to a DeviceAccess.deviceRequestPrompted event. + * @response `DeviceAccess.selectPrompt` + */ + export type SelectPromptResponse = {}; + /** + * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event. + * @request `DeviceAccess.cancelPrompt` + */ + export type CancelPromptRequest = { + id: RequestId; + }; + /** + * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event. + * @response `DeviceAccess.cancelPrompt` + */ + export type CancelPromptResponse = {}; + } + export namespace DeviceOrientation { + /** + * Clears the overridden Device Orientation. + * @request `DeviceOrientation.clearDeviceOrientationOverride` + */ + export type ClearDeviceOrientationOverrideRequest = {}; + /** + * Clears the overridden Device Orientation. + * @response `DeviceOrientation.clearDeviceOrientationOverride` + */ + export type ClearDeviceOrientationOverrideResponse = {}; + /** + * Overrides the Device Orientation. + * @request `DeviceOrientation.setDeviceOrientationOverride` + */ + export type SetDeviceOrientationOverrideRequest = { + /** + * Mock alpha + */ + alpha: number; + /** + * Mock beta + */ + beta: number; + /** + * Mock gamma + */ + gamma: number; + }; + /** + * Overrides the Device Orientation. + * @response `DeviceOrientation.setDeviceOrientationOverride` + */ + export type SetDeviceOrientationOverrideResponse = {}; + } + export namespace DOM { + /** + * Unique DOM node identifier. + */ + export type NodeId = number; + /** + * Unique DOM node identifier used to reference a node that may not have been pushed to the + * front-end. + */ + export type BackendNodeId = number; + /** + * Backend node with a friendly name. + */ + export type BackendNode = { + /** + * `Node`'s nodeType. + */ + nodeType: number; + /** + * `Node`'s nodeName. + */ + nodeName: string; + backendNodeId: BackendNodeId; + }; + /** + * Pseudo element type. + */ + export type PseudoType = + | "first-line" + | "first-letter" + | "before" + | "after" + | "marker" + | "backdrop" + | "selection" + | "target-text" + | "spelling-error" + | "grammar-error" + | "highlight" + | "first-line-inherited" + | "scrollbar" + | "scrollbar-thumb" + | "scrollbar-button" + | "scrollbar-track" + | "scrollbar-track-piece" + | "scrollbar-corner" + | "resizer" + | "input-list-button" + | "view-transition" + | "view-transition-group" + | "view-transition-image-pair" + | "view-transition-old" + | "view-transition-new"; + /** + * Shadow root type. + */ + export type ShadowRootType = "user-agent" | "open" | "closed"; + /** + * Document compatibility mode. + */ + export type CompatibilityMode = "QuirksMode" | "LimitedQuirksMode" | "NoQuirksMode"; + /** + * ContainerSelector physical axes + */ + export type PhysicalAxes = "Horizontal" | "Vertical" | "Both"; + /** + * ContainerSelector logical axes + */ + export type LogicalAxes = "Inline" | "Block" | "Both"; + /** + * DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. + * DOMNode is a base node mirror type. + */ + export type Node = { + /** + * Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend + * will only push node with given `id` once. It is aware of all requested nodes and will only + * fire DOM events for nodes known to the client. + */ + nodeId: NodeId; + /** + * The id of the parent node if any. + */ + parentId?: NodeId | undefined; + /** + * The BackendNodeId for this node. + */ + backendNodeId: BackendNodeId; + /** + * `Node`'s nodeType. + */ + nodeType: number; + /** + * `Node`'s nodeName. + */ + nodeName: string; + /** + * `Node`'s localName. + */ + localName: string; + /** + * `Node`'s nodeValue. + */ + nodeValue: string; + /** + * Child count for `Container` nodes. + */ + childNodeCount?: number | undefined; + /** + * Child nodes of this node when requested with children. + */ + children?: Node[] | undefined; + /** + * Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. + */ + attributes?: string[] | undefined; + /** + * Document URL that `Document` or `FrameOwner` node points to. + */ + documentURL?: string | undefined; + /** + * Base URL that `Document` or `FrameOwner` node uses for URL completion. + */ + baseURL?: string | undefined; + /** + * `DocumentType`'s publicId. + */ + publicId?: string | undefined; + /** + * `DocumentType`'s systemId. + */ + systemId?: string | undefined; + /** + * `DocumentType`'s internalSubset. + */ + internalSubset?: string | undefined; + /** + * `Document`'s XML version in case of XML documents. + */ + xmlVersion?: string | undefined; + /** + * `Attr`'s name. + */ + name?: string | undefined; + /** + * `Attr`'s value. + */ + value?: string | undefined; + /** + * Pseudo element type for this node. + */ + pseudoType?: PseudoType | undefined; + /** + * Pseudo element identifier for this node. Only present if there is a + * valid pseudoType. + */ + pseudoIdentifier?: string | undefined; + /** + * Shadow root type. + */ + shadowRootType?: ShadowRootType | undefined; + /** + * Frame ID for frame owner elements. + */ + frameId?: Page.FrameId | undefined; + /** + * Content document for frame owner elements. + */ + contentDocument?: Node | undefined; + /** + * Shadow root list for given element host. + */ + shadowRoots?: Node[] | undefined; + /** + * Content document fragment for template elements. + */ + templateContent?: Node | undefined; + /** + * Pseudo elements associated with this node. + */ + pseudoElements?: Node[] | undefined; + /** + * Deprecated, as the HTML Imports API has been removed (crbug.com/937746). + * This property used to return the imported document for the HTMLImport links. + * The property is always undefined now. + */ + importedDocument?: Node | undefined; + /** + * Distributed nodes for given insertion point. + */ + distributedNodes?: BackendNode[] | undefined; + /** + * Whether the node is SVG. + */ + isSVG?: boolean | undefined; + compatibilityMode?: CompatibilityMode | undefined; + assignedSlot?: BackendNode | undefined; + }; + /** + * A structure holding an RGBA color. + */ + export type RGBA = { + /** + * The red component, in the [0-255] range. + */ + r: number; + /** + * The green component, in the [0-255] range. + */ + g: number; + /** + * The blue component, in the [0-255] range. + */ + b: number; + /** + * The alpha component, in the [0-1] range (default: 1). + */ + a?: number | undefined; + }; + /** + * An array of quad vertices, x immediately followed by y for each point, points clock-wise. + */ + export type Quad = number[]; + /** + * Box model. + */ + export type BoxModel = { + /** + * Content box + */ + content: Quad; + /** + * Padding box + */ + padding: Quad; + /** + * Border box + */ + border: Quad; + /** + * Margin box + */ + margin: Quad; + /** + * Node width + */ + width: number; + /** + * Node height + */ + height: number; + /** + * Shape outside coordinates + */ + shapeOutside?: ShapeOutsideInfo | undefined; + }; + /** + * CSS Shape Outside details. + */ + export type ShapeOutsideInfo = { + /** + * Shape bounds + */ + bounds: Quad; + /** + * Shape coordinate details + */ + shape: unknown[]; + /** + * Margin shape bounds + */ + marginShape: unknown[]; + }; + /** + * Rectangle. + */ + export type Rect = { + /** + * X coordinate + */ + x: number; + /** + * Y coordinate + */ + y: number; + /** + * Rectangle width + */ + width: number; + /** + * Rectangle height + */ + height: number; + }; + export type CSSComputedStyleProperty = { + /** + * Computed style property name. + */ + name: string; + /** + * Computed style property value. + */ + value: string; + }; + /** + * Fired when `Element`'s attribute is modified. + * @event `DOM.attributeModified` + */ + export type AttributeModifiedEvent = { + /** + * Id of the node that has changed. + */ + nodeId: NodeId; + /** + * Attribute name. + */ + name: string; + /** + * Attribute value. + */ + value: string; + }; + /** + * Fired when `Element`'s attribute is removed. + * @event `DOM.attributeRemoved` + */ + export type AttributeRemovedEvent = { + /** + * Id of the node that has changed. + */ + nodeId: NodeId; + /** + * A ttribute name. + */ + name: string; + }; + /** + * Mirrors `DOMCharacterDataModified` event. + * @event `DOM.characterDataModified` + */ + export type CharacterDataModifiedEvent = { + /** + * Id of the node that has changed. + */ + nodeId: NodeId; + /** + * New text value. + */ + characterData: string; + }; + /** + * Fired when `Container`'s child node count has changed. + * @event `DOM.childNodeCountUpdated` + */ + export type ChildNodeCountUpdatedEvent = { + /** + * Id of the node that has changed. + */ + nodeId: NodeId; + /** + * New node count. + */ + childNodeCount: number; + }; + /** + * Mirrors `DOMNodeInserted` event. + * @event `DOM.childNodeInserted` + */ + export type ChildNodeInsertedEvent = { + /** + * Id of the node that has changed. + */ + parentNodeId: NodeId; + /** + * Id of the previous sibling. + */ + previousNodeId: NodeId; + /** + * Inserted node data. + */ + node: Node; + }; + /** + * Mirrors `DOMNodeRemoved` event. + * @event `DOM.childNodeRemoved` + */ + export type ChildNodeRemovedEvent = { + /** + * Parent id. + */ + parentNodeId: NodeId; + /** + * Id of the node that has been removed. + */ + nodeId: NodeId; + }; + /** + * Called when distribution is changed. + * @event `DOM.distributedNodesUpdated` + */ + export type DistributedNodesUpdatedEvent = { + /** + * Insertion point where distributed nodes were updated. + */ + insertionPointId: NodeId; + /** + * Distributed nodes for given insertion point. + */ + distributedNodes: BackendNode[]; + }; + /** + * Fired when `Document` has been totally updated. Node ids are no longer valid. + * @event `DOM.documentUpdated` + */ + export type DocumentUpdatedEvent = {}; + /** + * Fired when `Element`'s inline style is modified via a CSS property modification. + * @event `DOM.inlineStyleInvalidated` + */ + export type InlineStyleInvalidatedEvent = { + /** + * Ids of the nodes for which the inline styles have been invalidated. + */ + nodeIds: NodeId[]; + }; + /** + * Called when a pseudo element is added to an element. + * @event `DOM.pseudoElementAdded` + */ + export type PseudoElementAddedEvent = { + /** + * Pseudo element's parent element id. + */ + parentId: NodeId; + /** + * The added pseudo element. + */ + pseudoElement: Node; + }; + /** + * Called when top layer elements are changed. + * @event `DOM.topLayerElementsUpdated` + */ + export type TopLayerElementsUpdatedEvent = {}; + /** + * Called when a pseudo element is removed from an element. + * @event `DOM.pseudoElementRemoved` + */ + export type PseudoElementRemovedEvent = { + /** + * Pseudo element's parent element id. + */ + parentId: NodeId; + /** + * The removed pseudo element id. + */ + pseudoElementId: NodeId; + }; + /** + * Fired when backend wants to provide client with the missing DOM structure. This happens upon + * most of the calls requesting node ids. + * @event `DOM.setChildNodes` + */ + export type SetChildNodesEvent = { + /** + * Parent node id to populate with children. + */ + parentId: NodeId; + /** + * Child nodes array. + */ + nodes: Node[]; + }; + /** + * Called when shadow root is popped from the element. + * @event `DOM.shadowRootPopped` + */ + export type ShadowRootPoppedEvent = { + /** + * Host element id. + */ + hostId: NodeId; + /** + * Shadow root id. + */ + rootId: NodeId; + }; + /** + * Called when shadow root is pushed into the element. + * @event `DOM.shadowRootPushed` + */ + export type ShadowRootPushedEvent = { + /** + * Host element id. + */ + hostId: NodeId; + /** + * Shadow root. + */ + root: Node; + }; + /** + * Collects class names for the node with given id and all of it's child nodes. + * @request `DOM.collectClassNamesFromSubtree` + */ + export type CollectClassNamesFromSubtreeRequest = { + /** + * Id of the node to collect class names. + */ + nodeId: NodeId; + }; + /** + * Collects class names for the node with given id and all of it's child nodes. + * @response `DOM.collectClassNamesFromSubtree` + */ + export type CollectClassNamesFromSubtreeResponse = { + /** + * Class name list. + */ + classNames: string[]; + }; + /** + * Creates a deep copy of the specified node and places it into the target container before the + * given anchor. + * @request `DOM.copyTo` + */ + export type CopyToRequest = { + /** + * Id of the node to copy. + */ + nodeId: NodeId; + /** + * Id of the element to drop the copy into. + */ + targetNodeId: NodeId; + /** + * Drop the copy before this node (if absent, the copy becomes the last child of + * `targetNodeId`). + */ + insertBeforeNodeId?: NodeId | undefined; + }; + /** + * Creates a deep copy of the specified node and places it into the target container before the + * given anchor. + * @response `DOM.copyTo` + */ + export type CopyToResponse = { + /** + * Id of the node clone. + */ + nodeId: NodeId; + }; + /** + * Describes node given its id, does not require domain to be enabled. Does not start tracking any + * objects, can be used for automation. + * @request `DOM.describeNode` + */ + export type DescribeNodeRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + /** + * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the + * entire subtree or provide an integer larger than 0. + */ + depth?: number | undefined; + /** + * Whether or not iframes and shadow roots should be traversed when returning the subtree + * (default is false). + */ + pierce?: boolean | undefined; + }; + /** + * Describes node given its id, does not require domain to be enabled. Does not start tracking any + * objects, can be used for automation. + * @response `DOM.describeNode` + */ + export type DescribeNodeResponse = { + /** + * Node description. + */ + node: Node; + }; + /** + * Scrolls the specified rect of the given node into view if not already visible. + * Note: exactly one between nodeId, backendNodeId and objectId should be passed + * to identify the node. + * @request `DOM.scrollIntoViewIfNeeded` + */ + export type ScrollIntoViewIfNeededRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + /** + * The rect to be scrolled into view, relative to the node's border box, in CSS pixels. + * When omitted, center of the node will be used, similar to Element.scrollIntoView. + */ + rect?: Rect | undefined; + }; + /** + * Scrolls the specified rect of the given node into view if not already visible. + * Note: exactly one between nodeId, backendNodeId and objectId should be passed + * to identify the node. + * @response `DOM.scrollIntoViewIfNeeded` + */ + export type ScrollIntoViewIfNeededResponse = {}; + /** + * Disables DOM agent for the given page. + * @request `DOM.disable` + */ + export type DisableRequest = {}; + /** + * Disables DOM agent for the given page. + * @response `DOM.disable` + */ + export type DisableResponse = {}; + /** + * Discards search results from the session with the given id. `getSearchResults` should no longer + * be called for that search. + * @request `DOM.discardSearchResults` + */ + export type DiscardSearchResultsRequest = { + /** + * Unique search session identifier. + */ + searchId: string; + }; + /** + * Discards search results from the session with the given id. `getSearchResults` should no longer + * be called for that search. + * @response `DOM.discardSearchResults` + */ + export type DiscardSearchResultsResponse = {}; + /** + * Enables DOM agent for the given page. + * @request `DOM.enable` + */ + export type EnableRequest = { + /** + * Whether to include whitespaces in the children array of returned Nodes. + */ + includeWhitespace?: "none" | "all" | undefined; + }; + /** + * Enables DOM agent for the given page. + * @response `DOM.enable` + */ + export type EnableResponse = {}; + /** + * Focuses the given element. + * @request `DOM.focus` + */ + export type FocusRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Focuses the given element. + * @response `DOM.focus` + */ + export type FocusResponse = {}; + /** + * Returns attributes for the specified node. + * @request `DOM.getAttributes` + */ + export type GetAttributesRequest = { + /** + * Id of the node to retrieve attibutes for. + */ + nodeId: NodeId; + }; + /** + * Returns attributes for the specified node. + * @response `DOM.getAttributes` + */ + export type GetAttributesResponse = { + /** + * An interleaved array of node attribute names and values. + */ + attributes: string[]; + }; + /** + * Returns boxes for the given node. + * @request `DOM.getBoxModel` + */ + export type GetBoxModelRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Returns boxes for the given node. + * @response `DOM.getBoxModel` + */ + export type GetBoxModelResponse = { + /** + * Box model for the node. + */ + model: BoxModel; + }; + /** + * Returns quads that describe node position on the page. This method + * might return multiple quads for inline nodes. + * @request `DOM.getContentQuads` + */ + export type GetContentQuadsRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Returns quads that describe node position on the page. This method + * might return multiple quads for inline nodes. + * @response `DOM.getContentQuads` + */ + export type GetContentQuadsResponse = { + /** + * Quads that describe node layout relative to viewport. + */ + quads: Quad[]; + }; + /** + * Returns the root DOM node (and optionally the subtree) to the caller. + * Implicitly enables the DOM domain events for the current target. + * @request `DOM.getDocument` + */ + export type GetDocumentRequest = { + /** + * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the + * entire subtree or provide an integer larger than 0. + */ + depth?: number | undefined; + /** + * Whether or not iframes and shadow roots should be traversed when returning the subtree + * (default is false). + */ + pierce?: boolean | undefined; + }; + /** + * Returns the root DOM node (and optionally the subtree) to the caller. + * Implicitly enables the DOM domain events for the current target. + * @response `DOM.getDocument` + */ + export type GetDocumentResponse = { + /** + * Resulting node. + */ + root: Node; + }; + /** + * Returns the root DOM node (and optionally the subtree) to the caller. + * Deprecated, as it is not designed to work well with the rest of the DOM agent. + * Use DOMSnapshot.captureSnapshot instead. + * @request `DOM.getFlattenedDocument` + */ + export type GetFlattenedDocumentRequest = { + /** + * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the + * entire subtree or provide an integer larger than 0. + */ + depth?: number | undefined; + /** + * Whether or not iframes and shadow roots should be traversed when returning the subtree + * (default is false). + */ + pierce?: boolean | undefined; + }; + /** + * Returns the root DOM node (and optionally the subtree) to the caller. + * Deprecated, as it is not designed to work well with the rest of the DOM agent. + * Use DOMSnapshot.captureSnapshot instead. + * @response `DOM.getFlattenedDocument` + */ + export type GetFlattenedDocumentResponse = { + /** + * Resulting node. + */ + nodes: Node[]; + }; + /** + * Finds nodes with a given computed style in a subtree. + * @request `DOM.getNodesForSubtreeByStyle` + */ + export type GetNodesForSubtreeByStyleRequest = { + /** + * Node ID pointing to the root of a subtree. + */ + nodeId: NodeId; + /** + * The style to filter nodes by (includes nodes if any of properties matches). + */ + computedStyles: CSSComputedStyleProperty[]; + /** + * Whether or not iframes and shadow roots in the same target should be traversed when returning the + * results (default is false). + */ + pierce?: boolean | undefined; + }; + /** + * Finds nodes with a given computed style in a subtree. + * @response `DOM.getNodesForSubtreeByStyle` + */ + export type GetNodesForSubtreeByStyleResponse = { + /** + * Resulting nodes. + */ + nodeIds: NodeId[]; + }; + /** + * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is + * either returned or not. + * @request `DOM.getNodeForLocation` + */ + export type GetNodeForLocationRequest = { + /** + * X coordinate. + */ + x: number; + /** + * Y coordinate. + */ + y: number; + /** + * False to skip to the nearest non-UA shadow root ancestor (default: false). + */ + includeUserAgentShadowDOM?: boolean | undefined; + /** + * Whether to ignore pointer-events: none on elements and hit test them. + */ + ignorePointerEventsNone?: boolean | undefined; + }; + /** + * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is + * either returned or not. + * @response `DOM.getNodeForLocation` + */ + export type GetNodeForLocationResponse = { + /** + * Resulting node. + */ + backendNodeId: BackendNodeId; + /** + * Frame this node belongs to. + */ + frameId: Page.FrameId; + /** + * Id of the node at given coordinates, only when enabled and requested document. + */ + nodeId?: NodeId | undefined; + }; + /** + * Returns node's HTML markup. + * @request `DOM.getOuterHTML` + */ + export type GetOuterHTMLRequest = { + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Returns node's HTML markup. + * @response `DOM.getOuterHTML` + */ + export type GetOuterHTMLResponse = { + /** + * Outer HTML markup. + */ + outerHTML: string; + }; + /** + * Returns the id of the nearest ancestor that is a relayout boundary. + * @request `DOM.getRelayoutBoundary` + */ + export type GetRelayoutBoundaryRequest = { + /** + * Id of the node. + */ + nodeId: NodeId; + }; + /** + * Returns the id of the nearest ancestor that is a relayout boundary. + * @response `DOM.getRelayoutBoundary` + */ + export type GetRelayoutBoundaryResponse = { + /** + * Relayout boundary node id for the given node. + */ + nodeId: NodeId; + }; + /** + * Returns search results from given `fromIndex` to given `toIndex` from the search with the given + * identifier. + * @request `DOM.getSearchResults` + */ + export type GetSearchResultsRequest = { + /** + * Unique search session identifier. + */ + searchId: string; + /** + * Start index of the search result to be returned. + */ + fromIndex: number; + /** + * End index of the search result to be returned. + */ + toIndex: number; + }; + /** + * Returns search results from given `fromIndex` to given `toIndex` from the search with the given + * identifier. + * @response `DOM.getSearchResults` + */ + export type GetSearchResultsResponse = { + /** + * Ids of the search result nodes. + */ + nodeIds: NodeId[]; + }; + /** + * Hides any highlight. + * @request `DOM.hideHighlight` + */ + export type HideHighlightRequest = {}; + /** + * Hides any highlight. + * @response `DOM.hideHighlight` + */ + export type HideHighlightResponse = {}; + /** + * Highlights DOM node. + * @request `DOM.highlightNode` + */ + export type HighlightNodeRequest = {}; + /** + * Highlights DOM node. + * @response `DOM.highlightNode` + */ + export type HighlightNodeResponse = {}; + /** + * Highlights given rectangle. + * @request `DOM.highlightRect` + */ + export type HighlightRectRequest = {}; + /** + * Highlights given rectangle. + * @response `DOM.highlightRect` + */ + export type HighlightRectResponse = {}; + /** + * Marks last undoable state. + * @request `DOM.markUndoableState` + */ + export type MarkUndoableStateRequest = {}; + /** + * Marks last undoable state. + * @response `DOM.markUndoableState` + */ + export type MarkUndoableStateResponse = {}; + /** + * Moves node into the new container, places it before the given anchor. + * @request `DOM.moveTo` + */ + export type MoveToRequest = { + /** + * Id of the node to move. + */ + nodeId: NodeId; + /** + * Id of the element to drop the moved node into. + */ + targetNodeId: NodeId; + /** + * Drop node before this one (if absent, the moved node becomes the last child of + * `targetNodeId`). + */ + insertBeforeNodeId?: NodeId | undefined; + }; + /** + * Moves node into the new container, places it before the given anchor. + * @response `DOM.moveTo` + */ + export type MoveToResponse = { + /** + * New id of the moved node. + */ + nodeId: NodeId; + }; + /** + * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or + * `cancelSearch` to end this search session. + * @request `DOM.performSearch` + */ + export type PerformSearchRequest = { + /** + * Plain text or query selector or XPath search query. + */ + query: string; + /** + * True to search in user agent shadow DOM. + */ + includeUserAgentShadowDOM?: boolean | undefined; + }; + /** + * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or + * `cancelSearch` to end this search session. + * @response `DOM.performSearch` + */ + export type PerformSearchResponse = { + /** + * Unique search session identifier. + */ + searchId: string; + /** + * Number of search results. + */ + resultCount: number; + }; + /** + * Requests that the node is sent to the caller given its path. // FIXME, use XPath + * @request `DOM.pushNodeByPathToFrontend` + */ + export type PushNodeByPathToFrontendRequest = { + /** + * Path to node in the proprietary format. + */ + path: string; + }; + /** + * Requests that the node is sent to the caller given its path. // FIXME, use XPath + * @response `DOM.pushNodeByPathToFrontend` + */ + export type PushNodeByPathToFrontendResponse = { + /** + * Id of the node for given path. + */ + nodeId: NodeId; + }; + /** + * Requests that a batch of nodes is sent to the caller given their backend node ids. + * @request `DOM.pushNodesByBackendIdsToFrontend` + */ + export type PushNodesByBackendIdsToFrontendRequest = { + /** + * The array of backend node ids. + */ + backendNodeIds: BackendNodeId[]; + }; + /** + * Requests that a batch of nodes is sent to the caller given their backend node ids. + * @response `DOM.pushNodesByBackendIdsToFrontend` + */ + export type PushNodesByBackendIdsToFrontendResponse = { + /** + * The array of ids of pushed nodes that correspond to the backend ids specified in + * backendNodeIds. + */ + nodeIds: NodeId[]; + }; + /** + * Executes `querySelector` on a given node. + * @request `DOM.querySelector` + */ + export type QuerySelectorRequest = { + /** + * Id of the node to query upon. + */ + nodeId: NodeId; + /** + * Selector string. + */ + selector: string; + }; + /** + * Executes `querySelector` on a given node. + * @response `DOM.querySelector` + */ + export type QuerySelectorResponse = { + /** + * Query selector result. + */ + nodeId: NodeId; + }; + /** + * Executes `querySelectorAll` on a given node. + * @request `DOM.querySelectorAll` + */ + export type QuerySelectorAllRequest = { + /** + * Id of the node to query upon. + */ + nodeId: NodeId; + /** + * Selector string. + */ + selector: string; + }; + /** + * Executes `querySelectorAll` on a given node. + * @response `DOM.querySelectorAll` + */ + export type QuerySelectorAllResponse = { + /** + * Query selector result. + */ + nodeIds: NodeId[]; + }; + /** + * Returns NodeIds of current top layer elements. + * Top layer is rendered closest to the user within a viewport, therefore its elements always + * appear on top of all other content. + * @request `DOM.getTopLayerElements` + */ + export type GetTopLayerElementsRequest = {}; + /** + * Returns NodeIds of current top layer elements. + * Top layer is rendered closest to the user within a viewport, therefore its elements always + * appear on top of all other content. + * @response `DOM.getTopLayerElements` + */ + export type GetTopLayerElementsResponse = { + /** + * NodeIds of top layer elements + */ + nodeIds: NodeId[]; + }; + /** + * Re-does the last undone action. + * @request `DOM.redo` + */ + export type RedoRequest = {}; + /** + * Re-does the last undone action. + * @response `DOM.redo` + */ + export type RedoResponse = {}; + /** + * Removes attribute with given name from an element with given id. + * @request `DOM.removeAttribute` + */ + export type RemoveAttributeRequest = { + /** + * Id of the element to remove attribute from. + */ + nodeId: NodeId; + /** + * Name of the attribute to remove. + */ + name: string; + }; + /** + * Removes attribute with given name from an element with given id. + * @response `DOM.removeAttribute` + */ + export type RemoveAttributeResponse = {}; + /** + * Removes node with given id. + * @request `DOM.removeNode` + */ + export type RemoveNodeRequest = { + /** + * Id of the node to remove. + */ + nodeId: NodeId; + }; + /** + * Removes node with given id. + * @response `DOM.removeNode` + */ + export type RemoveNodeResponse = {}; + /** + * Requests that children of the node with given id are returned to the caller in form of + * `setChildNodes` events where not only immediate children are retrieved, but all children down to + * the specified depth. + * @request `DOM.requestChildNodes` + */ + export type RequestChildNodesRequest = { + /** + * Id of the node to get children for. + */ + nodeId: NodeId; + /** + * The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the + * entire subtree or provide an integer larger than 0. + */ + depth?: number | undefined; + /** + * Whether or not iframes and shadow roots should be traversed when returning the sub-tree + * (default is false). + */ + pierce?: boolean | undefined; + }; + /** + * Requests that children of the node with given id are returned to the caller in form of + * `setChildNodes` events where not only immediate children are retrieved, but all children down to + * the specified depth. + * @response `DOM.requestChildNodes` + */ + export type RequestChildNodesResponse = {}; + /** + * Requests that the node is sent to the caller given the JavaScript node object reference. All + * nodes that form the path from the node to the root are also sent to the client as a series of + * `setChildNodes` notifications. + * @request `DOM.requestNode` + */ + export type RequestNodeRequest = { + /** + * JavaScript object id to convert into node. + */ + objectId: Runtime.RemoteObjectId; + }; + /** + * Requests that the node is sent to the caller given the JavaScript node object reference. All + * nodes that form the path from the node to the root are also sent to the client as a series of + * `setChildNodes` notifications. + * @response `DOM.requestNode` + */ + export type RequestNodeResponse = { + /** + * Node id for given object. + */ + nodeId: NodeId; + }; + /** + * Resolves the JavaScript node object for a given NodeId or BackendNodeId. + * @request `DOM.resolveNode` + */ + export type ResolveNodeRequest = { + /** + * Id of the node to resolve. + */ + nodeId?: NodeId | undefined; + /** + * Backend identifier of the node to resolve. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string | undefined; + /** + * Execution context in which to resolve the node. + */ + executionContextId?: Runtime.ExecutionContextId | undefined; + }; + /** + * Resolves the JavaScript node object for a given NodeId or BackendNodeId. + * @response `DOM.resolveNode` + */ + export type ResolveNodeResponse = { + /** + * JavaScript object wrapper for given node. + */ + object: Runtime.RemoteObject; + }; + /** + * Sets attribute for an element with given id. + * @request `DOM.setAttributeValue` + */ + export type SetAttributeValueRequest = { + /** + * Id of the element to set attribute for. + */ + nodeId: NodeId; + /** + * Attribute name. + */ + name: string; + /** + * Attribute value. + */ + value: string; + }; + /** + * Sets attribute for an element with given id. + * @response `DOM.setAttributeValue` + */ + export type SetAttributeValueResponse = {}; + /** + * Sets attributes on element with given id. This method is useful when user edits some existing + * attribute value and types in several attribute name/value pairs. + * @request `DOM.setAttributesAsText` + */ + export type SetAttributesAsTextRequest = { + /** + * Id of the element to set attributes for. + */ + nodeId: NodeId; + /** + * Text with a number of attributes. Will parse this text using HTML parser. + */ + text: string; + /** + * Attribute name to replace with new attributes derived from text in case text parsed + * successfully. + */ + name?: string | undefined; + }; + /** + * Sets attributes on element with given id. This method is useful when user edits some existing + * attribute value and types in several attribute name/value pairs. + * @response `DOM.setAttributesAsText` + */ + export type SetAttributesAsTextResponse = {}; + /** + * Sets files for the given file input element. + * @request `DOM.setFileInputFiles` + */ + export type SetFileInputFilesRequest = { + /** + * Array of file paths to set. + */ + files: string[]; + /** + * Identifier of the node. + */ + nodeId?: NodeId | undefined; + /** + * Identifier of the backend node. + */ + backendNodeId?: BackendNodeId | undefined; + /** + * JavaScript object id of the node wrapper. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Sets files for the given file input element. + * @response `DOM.setFileInputFiles` + */ + export type SetFileInputFilesResponse = {}; + /** + * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. + * @request `DOM.setNodeStackTracesEnabled` + */ + export type SetNodeStackTracesEnabledRequest = { + /** + * Enable or disable. + */ + enable: boolean; + }; + /** + * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. + * @response `DOM.setNodeStackTracesEnabled` + */ + export type SetNodeStackTracesEnabledResponse = {}; + /** + * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. + * @request `DOM.getNodeStackTraces` + */ + export type GetNodeStackTracesRequest = { + /** + * Id of the node to get stack traces for. + */ + nodeId: NodeId; + }; + /** + * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. + * @response `DOM.getNodeStackTraces` + */ + export type GetNodeStackTracesResponse = { + /** + * Creation stack trace, if available. + */ + creation?: Runtime.StackTrace | undefined; + }; + /** + * Returns file information for the given + * File wrapper. + * @request `DOM.getFileInfo` + */ + export type GetFileInfoRequest = { + /** + * JavaScript object id of the node wrapper. + */ + objectId: Runtime.RemoteObjectId; + }; + /** + * Returns file information for the given + * File wrapper. + * @response `DOM.getFileInfo` + */ + export type GetFileInfoResponse = { + path: string; + }; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details + * $x functions). + * @request `DOM.setInspectedNode` + */ + export type SetInspectedNodeRequest = { + /** + * DOM node id to be accessible by means of $x command line API. + */ + nodeId: NodeId; + }; + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details + * $x functions). + * @response `DOM.setInspectedNode` + */ + export type SetInspectedNodeResponse = {}; + /** + * Sets node name for a node with given id. + * @request `DOM.setNodeName` + */ + export type SetNodeNameRequest = { + /** + * Id of the node to set name for. + */ + nodeId: NodeId; + /** + * New node's name. + */ + name: string; + }; + /** + * Sets node name for a node with given id. + * @response `DOM.setNodeName` + */ + export type SetNodeNameResponse = { + /** + * New node's id. + */ + nodeId: NodeId; + }; + /** + * Sets node value for a node with given id. + * @request `DOM.setNodeValue` + */ + export type SetNodeValueRequest = { + /** + * Id of the node to set value for. + */ + nodeId: NodeId; + /** + * New node's value. + */ + value: string; + }; + /** + * Sets node value for a node with given id. + * @response `DOM.setNodeValue` + */ + export type SetNodeValueResponse = {}; + /** + * Sets node HTML markup, returns new node id. + * @request `DOM.setOuterHTML` + */ + export type SetOuterHTMLRequest = { + /** + * Id of the node to set markup for. + */ + nodeId: NodeId; + /** + * Outer HTML markup to set. + */ + outerHTML: string; + }; + /** + * Sets node HTML markup, returns new node id. + * @response `DOM.setOuterHTML` + */ + export type SetOuterHTMLResponse = {}; + /** + * Undoes the last performed action. + * @request `DOM.undo` + */ + export type UndoRequest = {}; + /** + * Undoes the last performed action. + * @response `DOM.undo` + */ + export type UndoResponse = {}; + /** + * Returns iframe node that owns iframe with the given domain. + * @request `DOM.getFrameOwner` + */ + export type GetFrameOwnerRequest = { + frameId: Page.FrameId; + }; + /** + * Returns iframe node that owns iframe with the given domain. + * @response `DOM.getFrameOwner` + */ + export type GetFrameOwnerResponse = { + /** + * Resulting node. + */ + backendNodeId: BackendNodeId; + /** + * Id of the node at given coordinates, only when enabled and requested document. + */ + nodeId?: NodeId | undefined; + }; + /** + * Returns the query container of the given node based on container query + * conditions: containerName, physical, and logical axes. If no axes are + * provided, the style container is returned, which is the direct parent or the + * closest element with a matching container-name. + * @request `DOM.getContainerForNode` + */ + export type GetContainerForNodeRequest = { + nodeId: NodeId; + containerName?: string | undefined; + physicalAxes?: PhysicalAxes | undefined; + logicalAxes?: LogicalAxes | undefined; + }; + /** + * Returns the query container of the given node based on container query + * conditions: containerName, physical, and logical axes. If no axes are + * provided, the style container is returned, which is the direct parent or the + * closest element with a matching container-name. + * @response `DOM.getContainerForNode` + */ + export type GetContainerForNodeResponse = { + /** + * The container node for the given node, or null if not found. + */ + nodeId?: NodeId | undefined; + }; + /** + * Returns the descendants of a container query container that have + * container queries against this container. + * @request `DOM.getQueryingDescendantsForContainer` + */ + export type GetQueryingDescendantsForContainerRequest = { + /** + * Id of the container node to find querying descendants from. + */ + nodeId: NodeId; + }; + /** + * Returns the descendants of a container query container that have + * container queries against this container. + * @response `DOM.getQueryingDescendantsForContainer` + */ + export type GetQueryingDescendantsForContainerResponse = { + /** + * Descendant nodes with container queries against the given container. + */ + nodeIds: NodeId[]; + }; + } + export namespace DOMDebugger { + /** + * DOM breakpoint type. + */ + export type DOMBreakpointType = "subtree-modified" | "attribute-modified" | "node-removed"; + /** + * CSP Violation type. + */ + export type CSPViolationType = "trustedtype-sink-violation" | "trustedtype-policy-violation"; + /** + * Object event listener. + */ + export type EventListener = { + /** + * `EventListener`'s type. + */ + type: string; + /** + * `EventListener`'s useCapture. + */ + useCapture: boolean; + /** + * `EventListener`'s passive flag. + */ + passive: boolean; + /** + * `EventListener`'s once flag. + */ + once: boolean; + /** + * Script id of the handler code. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber: number; + /** + * Event handler function value. + */ + handler?: Runtime.RemoteObject | undefined; + /** + * Event original handler function value. + */ + originalHandler?: Runtime.RemoteObject | undefined; + /** + * Node the listener is added to (if any). + */ + backendNodeId?: DOM.BackendNodeId | undefined; + }; + /** + * Returns event listeners of the given object. + * @request `DOMDebugger.getEventListeners` + */ + export type GetEventListenersRequest = { + /** + * Identifier of the object to return listeners for. + */ + objectId: Runtime.RemoteObjectId; + /** + * The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the + * entire subtree or provide an integer larger than 0. + */ + depth?: number | undefined; + /** + * Whether or not iframes and shadow roots should be traversed when returning the subtree + * (default is false). Reports listeners for all contexts if pierce is enabled. + */ + pierce?: boolean | undefined; + }; + /** + * Returns event listeners of the given object. + * @response `DOMDebugger.getEventListeners` + */ + export type GetEventListenersResponse = { + /** + * Array of relevant listeners. + */ + listeners: EventListener[]; + }; + /** + * Removes DOM breakpoint that was set using `setDOMBreakpoint`. + * @request `DOMDebugger.removeDOMBreakpoint` + */ + export type RemoveDOMBreakpointRequest = { + /** + * Identifier of the node to remove breakpoint from. + */ + nodeId: DOM.NodeId; + /** + * Type of the breakpoint to remove. + */ + type: DOMBreakpointType; + }; + /** + * Removes DOM breakpoint that was set using `setDOMBreakpoint`. + * @response `DOMDebugger.removeDOMBreakpoint` + */ + export type RemoveDOMBreakpointResponse = {}; + /** + * Removes breakpoint on particular DOM event. + * @request `DOMDebugger.removeEventListenerBreakpoint` + */ + export type RemoveEventListenerBreakpointRequest = { + /** + * Event name. + */ + eventName: string; + /** + * EventTarget interface name. + */ + targetName?: string | undefined; + }; + /** + * Removes breakpoint on particular DOM event. + * @response `DOMDebugger.removeEventListenerBreakpoint` + */ + export type RemoveEventListenerBreakpointResponse = {}; + /** + * Removes breakpoint on particular native event. + * @request `DOMDebugger.removeInstrumentationBreakpoint` + */ + export type RemoveInstrumentationBreakpointRequest = { + /** + * Instrumentation name to stop on. + */ + eventName: string; + }; + /** + * Removes breakpoint on particular native event. + * @response `DOMDebugger.removeInstrumentationBreakpoint` + */ + export type RemoveInstrumentationBreakpointResponse = {}; + /** + * Removes breakpoint from XMLHttpRequest. + * @request `DOMDebugger.removeXHRBreakpoint` + */ + export type RemoveXHRBreakpointRequest = { + /** + * Resource URL substring. + */ + url: string; + }; + /** + * Removes breakpoint from XMLHttpRequest. + * @response `DOMDebugger.removeXHRBreakpoint` + */ + export type RemoveXHRBreakpointResponse = {}; + /** + * Sets breakpoint on particular CSP violations. + * @request `DOMDebugger.setBreakOnCSPViolation` + */ + export type SetBreakOnCSPViolationRequest = { + /** + * CSP Violations to stop upon. + */ + violationTypes: CSPViolationType[]; + }; + /** + * Sets breakpoint on particular CSP violations. + * @response `DOMDebugger.setBreakOnCSPViolation` + */ + export type SetBreakOnCSPViolationResponse = {}; + /** + * Sets breakpoint on particular operation with DOM. + * @request `DOMDebugger.setDOMBreakpoint` + */ + export type SetDOMBreakpointRequest = { + /** + * Identifier of the node to set breakpoint on. + */ + nodeId: DOM.NodeId; + /** + * Type of the operation to stop upon. + */ + type: DOMBreakpointType; + }; + /** + * Sets breakpoint on particular operation with DOM. + * @response `DOMDebugger.setDOMBreakpoint` + */ + export type SetDOMBreakpointResponse = {}; + /** + * Sets breakpoint on particular DOM event. + * @request `DOMDebugger.setEventListenerBreakpoint` + */ + export type SetEventListenerBreakpointRequest = { + /** + * DOM Event name to stop on (any DOM event will do). + */ + eventName: string; + /** + * EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any + * EventTarget. + */ + targetName?: string | undefined; + }; + /** + * Sets breakpoint on particular DOM event. + * @response `DOMDebugger.setEventListenerBreakpoint` + */ + export type SetEventListenerBreakpointResponse = {}; + /** + * Sets breakpoint on particular native event. + * @request `DOMDebugger.setInstrumentationBreakpoint` + */ + export type SetInstrumentationBreakpointRequest = { + /** + * Instrumentation name to stop on. + */ + eventName: string; + }; + /** + * Sets breakpoint on particular native event. + * @response `DOMDebugger.setInstrumentationBreakpoint` + */ + export type SetInstrumentationBreakpointResponse = {}; + /** + * Sets breakpoint on XMLHttpRequest. + * @request `DOMDebugger.setXHRBreakpoint` + */ + export type SetXHRBreakpointRequest = { + /** + * Resource URL substring. All XHRs having this substring in the URL will get stopped upon. + */ + url: string; + }; + /** + * Sets breakpoint on XMLHttpRequest. + * @response `DOMDebugger.setXHRBreakpoint` + */ + export type SetXHRBreakpointResponse = {}; + } + export namespace DOMSnapshot { + /** + * A Node in the DOM tree. + */ + export type DOMNode = { + /** + * `Node`'s nodeType. + */ + nodeType: number; + /** + * `Node`'s nodeName. + */ + nodeName: string; + /** + * `Node`'s nodeValue. + */ + nodeValue: string; + /** + * Only set for textarea elements, contains the text value. + */ + textValue?: string | undefined; + /** + * Only set for input elements, contains the input's associated text value. + */ + inputValue?: string | undefined; + /** + * Only set for radio and checkbox input elements, indicates if the element has been checked + */ + inputChecked?: boolean | undefined; + /** + * Only set for option elements, indicates if the element has been selected + */ + optionSelected?: boolean | undefined; + /** + * `Node`'s id, corresponds to DOM.Node.backendNodeId. + */ + backendNodeId: DOM.BackendNodeId; + /** + * The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if + * any. + */ + childNodeIndexes?: number[] | undefined; + /** + * Attributes of an `Element` node. + */ + attributes?: NameValue[] | undefined; + /** + * Indexes of pseudo elements associated with this node in the `domNodes` array returned by + * `getSnapshot`, if any. + */ + pseudoElementIndexes?: number[] | undefined; + /** + * The index of the node's related layout tree node in the `layoutTreeNodes` array returned by + * `getSnapshot`, if any. + */ + layoutNodeIndex?: number | undefined; + /** + * Document URL that `Document` or `FrameOwner` node points to. + */ + documentURL?: string | undefined; + /** + * Base URL that `Document` or `FrameOwner` node uses for URL completion. + */ + baseURL?: string | undefined; + /** + * Only set for documents, contains the document's content language. + */ + contentLanguage?: string | undefined; + /** + * Only set for documents, contains the document's character set encoding. + */ + documentEncoding?: string | undefined; + /** + * `DocumentType` node's publicId. + */ + publicId?: string | undefined; + /** + * `DocumentType` node's systemId. + */ + systemId?: string | undefined; + /** + * Frame ID for frame owner elements and also for the document node. + */ + frameId?: Page.FrameId | undefined; + /** + * The index of a frame owner element's content document in the `domNodes` array returned by + * `getSnapshot`, if any. + */ + contentDocumentIndex?: number | undefined; + /** + * Type of a pseudo element node. + */ + pseudoType?: DOM.PseudoType | undefined; + /** + * Shadow root type. + */ + shadowRootType?: DOM.ShadowRootType | undefined; + /** + * Whether this DOM node responds to mouse clicks. This includes nodes that have had click + * event listeners attached via JavaScript as well as anchor tags that naturally navigate when + * clicked. + */ + isClickable?: boolean | undefined; + /** + * Details of the node's event listeners, if any. + */ + eventListeners?: DOMDebugger.EventListener[] | undefined; + /** + * The selected url for nodes with a srcset attribute. + */ + currentSourceURL?: string | undefined; + /** + * The url of the script (if any) that generates this node. + */ + originURL?: string | undefined; + /** + * Scroll offsets, set when this node is a Document. + */ + scrollOffsetX?: number | undefined; + scrollOffsetY?: number | undefined; + }; + /** + * Details of post layout rendered text positions. The exact layout should not be regarded as + * stable and may change between versions. + */ + export type InlineTextBox = { + /** + * The bounding box in document coordinates. Note that scroll offset of the document is ignored. + */ + boundingBox: DOM.Rect; + /** + * The starting index in characters, for this post layout textbox substring. Characters that + * would be represented as a surrogate pair in UTF-16 have length 2. + */ + startCharacterIndex: number; + /** + * The number of characters in this post layout textbox substring. Characters that would be + * represented as a surrogate pair in UTF-16 have length 2. + */ + numCharacters: number; + }; + /** + * Details of an element in the DOM tree with a LayoutObject. + */ + export type LayoutTreeNode = { + /** + * The index of the related DOM node in the `domNodes` array returned by `getSnapshot`. + */ + domNodeIndex: number; + /** + * The bounding box in document coordinates. Note that scroll offset of the document is ignored. + */ + boundingBox: DOM.Rect; + /** + * Contents of the LayoutText, if any. + */ + layoutText?: string | undefined; + /** + * The post-layout inline text nodes, if any. + */ + inlineTextNodes?: InlineTextBox[] | undefined; + /** + * Index into the `computedStyles` array returned by `getSnapshot`. + */ + styleIndex?: number | undefined; + /** + * Global paint order index, which is determined by the stacking order of the nodes. Nodes + * that are painted together will have the same index. Only provided if includePaintOrder in + * getSnapshot was true. + */ + paintOrder?: number | undefined; + /** + * Set to true to indicate the element begins a new stacking context. + */ + isStackingContext?: boolean | undefined; + }; + /** + * A subset of the full ComputedStyle as defined by the request whitelist. + */ + export type ComputedStyle = { + /** + * Name/value pairs of computed style properties. + */ + properties: NameValue[]; + }; + /** + * A name/value pair. + */ + export type NameValue = { + /** + * Attribute/property name. + */ + name: string; + /** + * Attribute/property value. + */ + value: string; + }; + /** + * Index of the string in the strings table. + */ + export type StringIndex = number; + /** + * Index of the string in the strings table. + */ + export type ArrayOfStrings = StringIndex[]; + /** + * Data that is only present on rare nodes. + */ + export type RareStringData = { + index: number[]; + value: StringIndex[]; + }; + export type RareBooleanData = { + index: number[]; + }; + export type RareIntegerData = { + index: number[]; + value: number[]; + }; + export type Rectangle = number[]; + /** + * Document snapshot. + */ + export type DocumentSnapshot = { + /** + * Document URL that `Document` or `FrameOwner` node points to. + */ + documentURL: StringIndex; + /** + * Document title. + */ + title: StringIndex; + /** + * Base URL that `Document` or `FrameOwner` node uses for URL completion. + */ + baseURL: StringIndex; + /** + * Contains the document's content language. + */ + contentLanguage: StringIndex; + /** + * Contains the document's character set encoding. + */ + encodingName: StringIndex; + /** + * `DocumentType` node's publicId. + */ + publicId: StringIndex; + /** + * `DocumentType` node's systemId. + */ + systemId: StringIndex; + /** + * Frame ID for frame owner elements and also for the document node. + */ + frameId: StringIndex; + /** + * A table with dom nodes. + */ + nodes: NodeTreeSnapshot; + /** + * The nodes in the layout tree. + */ + layout: LayoutTreeSnapshot; + /** + * The post-layout inline text nodes. + */ + textBoxes: TextBoxSnapshot; + /** + * Horizontal scroll offset. + */ + scrollOffsetX?: number | undefined; + /** + * Vertical scroll offset. + */ + scrollOffsetY?: number | undefined; + /** + * Document content width. + */ + contentWidth?: number | undefined; + /** + * Document content height. + */ + contentHeight?: number | undefined; + }; + /** + * Table containing nodes. + */ + export type NodeTreeSnapshot = { + /** + * Parent node index. + */ + parentIndex?: number[] | undefined; + /** + * `Node`'s nodeType. + */ + nodeType?: number[] | undefined; + /** + * Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum. + */ + shadowRootType?: RareStringData | undefined; + /** + * `Node`'s nodeName. + */ + nodeName?: StringIndex[] | undefined; + /** + * `Node`'s nodeValue. + */ + nodeValue?: StringIndex[] | undefined; + /** + * `Node`'s id, corresponds to DOM.Node.backendNodeId. + */ + backendNodeId?: DOM.BackendNodeId[] | undefined; + /** + * Attributes of an `Element` node. Flatten name, value pairs. + */ + attributes?: ArrayOfStrings[] | undefined; + /** + * Only set for textarea elements, contains the text value. + */ + textValue?: RareStringData | undefined; + /** + * Only set for input elements, contains the input's associated text value. + */ + inputValue?: RareStringData | undefined; + /** + * Only set for radio and checkbox input elements, indicates if the element has been checked + */ + inputChecked?: RareBooleanData | undefined; + /** + * Only set for option elements, indicates if the element has been selected + */ + optionSelected?: RareBooleanData | undefined; + /** + * The index of the document in the list of the snapshot documents. + */ + contentDocumentIndex?: RareIntegerData | undefined; + /** + * Type of a pseudo element node. + */ + pseudoType?: RareStringData | undefined; + /** + * Pseudo element identifier for this node. Only present if there is a + * valid pseudoType. + */ + pseudoIdentifier?: RareStringData | undefined; + /** + * Whether this DOM node responds to mouse clicks. This includes nodes that have had click + * event listeners attached via JavaScript as well as anchor tags that naturally navigate when + * clicked. + */ + isClickable?: RareBooleanData | undefined; + /** + * The selected url for nodes with a srcset attribute. + */ + currentSourceURL?: RareStringData | undefined; + /** + * The url of the script (if any) that generates this node. + */ + originURL?: RareStringData | undefined; + }; + /** + * Table of details of an element in the DOM tree with a LayoutObject. + */ + export type LayoutTreeSnapshot = { + /** + * Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`. + */ + nodeIndex: number[]; + /** + * Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`. + */ + styles: ArrayOfStrings[]; + /** + * The absolute position bounding box. + */ + bounds: Rectangle[]; + /** + * Contents of the LayoutText, if any. + */ + text: StringIndex[]; + /** + * Stacking context information. + */ + stackingContexts: RareBooleanData; + /** + * Global paint order index, which is determined by the stacking order of the nodes. Nodes + * that are painted together will have the same index. Only provided if includePaintOrder in + * captureSnapshot was true. + */ + paintOrders?: number[] | undefined; + /** + * The offset rect of nodes. Only available when includeDOMRects is set to true + */ + offsetRects?: Rectangle[] | undefined; + /** + * The scroll rect of nodes. Only available when includeDOMRects is set to true + */ + scrollRects?: Rectangle[] | undefined; + /** + * The client rect of nodes. Only available when includeDOMRects is set to true + */ + clientRects?: Rectangle[] | undefined; + /** + * The list of background colors that are blended with colors of overlapping elements. + */ + blendedBackgroundColors?: StringIndex[] | undefined; + /** + * The list of computed text opacities. + */ + textColorOpacities?: number[] | undefined; + }; + /** + * Table of details of the post layout rendered text positions. The exact layout should not be regarded as + * stable and may change between versions. + */ + export type TextBoxSnapshot = { + /** + * Index of the layout tree node that owns this box collection. + */ + layoutIndex: number[]; + /** + * The absolute position bounding box. + */ + bounds: Rectangle[]; + /** + * The starting index in characters, for this post layout textbox substring. Characters that + * would be represented as a surrogate pair in UTF-16 have length 2. + */ + start: number[]; + /** + * The number of characters in this post layout textbox substring. Characters that would be + * represented as a surrogate pair in UTF-16 have length 2. + */ + length: number[]; + }; + /** + * Disables DOM snapshot agent for the given page. + * @request `DOMSnapshot.disable` + */ + export type DisableRequest = {}; + /** + * Disables DOM snapshot agent for the given page. + * @response `DOMSnapshot.disable` + */ + export type DisableResponse = {}; + /** + * Enables DOM snapshot agent for the given page. + * @request `DOMSnapshot.enable` + */ + export type EnableRequest = {}; + /** + * Enables DOM snapshot agent for the given page. + * @response `DOMSnapshot.enable` + */ + export type EnableResponse = {}; + /** + * Returns a document snapshot, including the full DOM tree of the root node (including iframes, + * template contents, and imported documents) in a flattened array, as well as layout and + * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is + * flattened. + * @request `DOMSnapshot.getSnapshot` + */ + export type GetSnapshotRequest = { + /** + * Whitelist of computed styles to return. + */ + computedStyleWhitelist: string[]; + /** + * Whether or not to retrieve details of DOM listeners (default false). + */ + includeEventListeners?: boolean | undefined; + /** + * Whether to determine and include the paint order index of LayoutTreeNodes (default false). + */ + includePaintOrder?: boolean | undefined; + /** + * Whether to include UA shadow tree in the snapshot (default false). + */ + includeUserAgentShadowTree?: boolean | undefined; + }; + /** + * Returns a document snapshot, including the full DOM tree of the root node (including iframes, + * template contents, and imported documents) in a flattened array, as well as layout and + * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is + * flattened. + * @response `DOMSnapshot.getSnapshot` + */ + export type GetSnapshotResponse = { + /** + * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. + */ + domNodes: DOMNode[]; + /** + * The nodes in the layout tree. + */ + layoutTreeNodes: LayoutTreeNode[]; + /** + * Whitelisted ComputedStyle properties for each node in the layout tree. + */ + computedStyles: ComputedStyle[]; + }; + /** + * Returns a document snapshot, including the full DOM tree of the root node (including iframes, + * template contents, and imported documents) in a flattened array, as well as layout and + * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is + * flattened. + * @request `DOMSnapshot.captureSnapshot` + */ + export type CaptureSnapshotRequest = { + /** + * Whitelist of computed styles to return. + */ + computedStyles: string[]; + /** + * Whether to include layout object paint orders into the snapshot. + */ + includePaintOrder?: boolean | undefined; + /** + * Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot + */ + includeDOMRects?: boolean | undefined; + /** + * Whether to include blended background colors in the snapshot (default: false). + * Blended background color is achieved by blending background colors of all elements + * that overlap with the current element. + */ + includeBlendedBackgroundColors?: boolean | undefined; + /** + * Whether to include text color opacity in the snapshot (default: false). + * An element might have the opacity property set that affects the text color of the element. + * The final text color opacity is computed based on the opacity of all overlapping elements. + */ + includeTextColorOpacities?: boolean | undefined; + }; + /** + * Returns a document snapshot, including the full DOM tree of the root node (including iframes, + * template contents, and imported documents) in a flattened array, as well as layout and + * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is + * flattened. + * @response `DOMSnapshot.captureSnapshot` + */ + export type CaptureSnapshotResponse = { + /** + * The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. + */ + documents: DocumentSnapshot[]; + /** + * Shared string table that all string properties refer to with indexes. + */ + strings: string[]; + }; + } + export namespace DOMStorage { + export type SerializedStorageKey = string; + /** + * DOM Storage identifier. + */ + export type StorageId = { + /** + * Security origin for the storage. + */ + securityOrigin?: string | undefined; + /** + * Represents a key by which DOM Storage keys its CachedStorageAreas + */ + storageKey?: SerializedStorageKey | undefined; + /** + * Whether the storage is local storage (not session storage). + */ + isLocalStorage: boolean; + }; + /** + * DOM Storage item. + */ + export type Item = string[]; + /** + * undefined + * @event `DOMStorage.domStorageItemAdded` + */ + export type DomStorageItemAddedEvent = { + storageId: StorageId; + key: string; + newValue: string; + }; + /** + * undefined + * @event `DOMStorage.domStorageItemRemoved` + */ + export type DomStorageItemRemovedEvent = { + storageId: StorageId; + key: string; + }; + /** + * undefined + * @event `DOMStorage.domStorageItemUpdated` + */ + export type DomStorageItemUpdatedEvent = { + storageId: StorageId; + key: string; + oldValue: string; + newValue: string; + }; + /** + * undefined + * @event `DOMStorage.domStorageItemsCleared` + */ + export type DomStorageItemsClearedEvent = { + storageId: StorageId; + }; + /** + * undefined + * @request `DOMStorage.clear` + */ + export type ClearRequest = { + storageId: StorageId; + }; + /** + * undefined + * @response `DOMStorage.clear` + */ + export type ClearResponse = {}; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + * @request `DOMStorage.disable` + */ + export type DisableRequest = {}; + /** + * Disables storage tracking, prevents storage events from being sent to the client. + * @response `DOMStorage.disable` + */ + export type DisableResponse = {}; + /** + * Enables storage tracking, storage events will now be delivered to the client. + * @request `DOMStorage.enable` + */ + export type EnableRequest = {}; + /** + * Enables storage tracking, storage events will now be delivered to the client. + * @response `DOMStorage.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `DOMStorage.getDOMStorageItems` + */ + export type GetDOMStorageItemsRequest = { + storageId: StorageId; + }; + /** + * undefined + * @response `DOMStorage.getDOMStorageItems` + */ + export type GetDOMStorageItemsResponse = { + entries: Item[]; + }; + /** + * undefined + * @request `DOMStorage.removeDOMStorageItem` + */ + export type RemoveDOMStorageItemRequest = { + storageId: StorageId; + key: string; + }; + /** + * undefined + * @response `DOMStorage.removeDOMStorageItem` + */ + export type RemoveDOMStorageItemResponse = {}; + /** + * undefined + * @request `DOMStorage.setDOMStorageItem` + */ + export type SetDOMStorageItemRequest = { + storageId: StorageId; + key: string; + value: string; + }; + /** + * undefined + * @response `DOMStorage.setDOMStorageItem` + */ + export type SetDOMStorageItemResponse = {}; + } + export namespace Emulation { + /** + * Screen orientation. + */ + export type ScreenOrientation = { + /** + * Orientation type. + */ + type: "portraitPrimary" | "portraitSecondary" | "landscapePrimary" | "landscapeSecondary"; + /** + * Orientation angle. + */ + angle: number; + }; + export type DisplayFeature = { + /** + * Orientation of a display feature in relation to screen + */ + orientation: "vertical" | "horizontal"; + /** + * The offset from the screen origin in either the x (for vertical + * orientation) or y (for horizontal orientation) direction. + */ + offset: number; + /** + * A display feature may mask content such that it is not physically + * displayed - this length along with the offset describes this area. + * A display feature that only splits content will have a 0 mask_length. + */ + maskLength: number; + }; + export type MediaFeature = { + name: string; + value: string; + }; + /** + * advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to + * allow the next delayed task (if any) to run; pause: The virtual time base may not advance; + * pauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending + * resource fetches. + */ + export type VirtualTimePolicy = "advance" | "pause" | "pauseIfNetworkFetchesPending"; + /** + * Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints + */ + export type UserAgentBrandVersion = { + brand: string; + version: string; + }; + /** + * Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints + * Missing optional values will be filled in by the target with what it would normally use. + */ + export type UserAgentMetadata = { + /** + * Brands appearing in Sec-CH-UA. + */ + brands?: UserAgentBrandVersion[] | undefined; + /** + * Brands appearing in Sec-CH-UA-Full-Version-List. + */ + fullVersionList?: UserAgentBrandVersion[] | undefined; + fullVersion?: string | undefined; + platform: string; + platformVersion: string; + architecture: string; + model: string; + mobile: boolean; + bitness?: string | undefined; + wow64?: boolean | undefined; + }; + /** + * Enum of image types that can be disabled. + */ + export type DisabledImageType = "avif" | "webp"; + /** + * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. + * @event `Emulation.virtualTimeBudgetExpired` + */ + export type VirtualTimeBudgetExpiredEvent = {}; + /** + * Tells whether emulation is supported. + * @request `Emulation.canEmulate` + */ + export type CanEmulateRequest = {}; + /** + * Tells whether emulation is supported. + * @response `Emulation.canEmulate` + */ + export type CanEmulateResponse = { + /** + * True if emulation is supported. + */ + result: boolean; + }; + /** + * Clears the overridden device metrics. + * @request `Emulation.clearDeviceMetricsOverride` + */ + export type ClearDeviceMetricsOverrideRequest = {}; + /** + * Clears the overridden device metrics. + * @response `Emulation.clearDeviceMetricsOverride` + */ + export type ClearDeviceMetricsOverrideResponse = {}; + /** + * Clears the overridden Geolocation Position and Error. + * @request `Emulation.clearGeolocationOverride` + */ + export type ClearGeolocationOverrideRequest = {}; + /** + * Clears the overridden Geolocation Position and Error. + * @response `Emulation.clearGeolocationOverride` + */ + export type ClearGeolocationOverrideResponse = {}; + /** + * Requests that page scale factor is reset to initial values. + * @request `Emulation.resetPageScaleFactor` + */ + export type ResetPageScaleFactorRequest = {}; + /** + * Requests that page scale factor is reset to initial values. + * @response `Emulation.resetPageScaleFactor` + */ + export type ResetPageScaleFactorResponse = {}; + /** + * Enables or disables simulating a focused and active page. + * @request `Emulation.setFocusEmulationEnabled` + */ + export type SetFocusEmulationEnabledRequest = { + /** + * Whether to enable to disable focus emulation. + */ + enabled: boolean; + }; + /** + * Enables or disables simulating a focused and active page. + * @response `Emulation.setFocusEmulationEnabled` + */ + export type SetFocusEmulationEnabledResponse = {}; + /** + * Automatically render all web contents using a dark theme. + * @request `Emulation.setAutoDarkModeOverride` + */ + export type SetAutoDarkModeOverrideRequest = { + /** + * Whether to enable or disable automatic dark mode. + * If not specified, any existing override will be cleared. + */ + enabled?: boolean | undefined; + }; + /** + * Automatically render all web contents using a dark theme. + * @response `Emulation.setAutoDarkModeOverride` + */ + export type SetAutoDarkModeOverrideResponse = {}; + /** + * Enables CPU throttling to emulate slow CPUs. + * @request `Emulation.setCPUThrottlingRate` + */ + export type SetCPUThrottlingRateRequest = { + /** + * Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc). + */ + rate: number; + }; + /** + * Enables CPU throttling to emulate slow CPUs. + * @response `Emulation.setCPUThrottlingRate` + */ + export type SetCPUThrottlingRateResponse = {}; + /** + * Sets or clears an override of the default background color of the frame. This override is used + * if the content does not specify one. + * @request `Emulation.setDefaultBackgroundColorOverride` + */ + export type SetDefaultBackgroundColorOverrideRequest = { + /** + * RGBA of the default background color. If not specified, any existing override will be + * cleared. + */ + color?: DOM.RGBA | undefined; + }; + /** + * Sets or clears an override of the default background color of the frame. This override is used + * if the content does not specify one. + * @response `Emulation.setDefaultBackgroundColorOverride` + */ + export type SetDefaultBackgroundColorOverrideResponse = {}; + /** + * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, + * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media + * query results). + * @request `Emulation.setDeviceMetricsOverride` + */ + export type SetDeviceMetricsOverrideRequest = { + /** + * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. + */ + width: number; + /** + * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. + */ + height: number; + /** + * Overriding device scale factor value. 0 disables the override. + */ + deviceScaleFactor: number; + /** + * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text + * autosizing and more. + */ + mobile: boolean; + /** + * Scale to apply to resulting view image. + */ + scale?: number | undefined; + /** + * Overriding screen width value in pixels (minimum 0, maximum 10000000). + */ + screenWidth?: number | undefined; + /** + * Overriding screen height value in pixels (minimum 0, maximum 10000000). + */ + screenHeight?: number | undefined; + /** + * Overriding view X position on screen in pixels (minimum 0, maximum 10000000). + */ + positionX?: number | undefined; + /** + * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). + */ + positionY?: number | undefined; + /** + * Do not set visible view size, rely upon explicit setVisibleSize call. + */ + dontSetVisibleSize?: boolean | undefined; + /** + * Screen orientation override. + */ + screenOrientation?: ScreenOrientation | undefined; + /** + * If set, the visible area of the page will be overridden to this viewport. This viewport + * change is not observed by the page, e.g. viewport-relative elements do not change positions. + */ + viewport?: Page.Viewport | undefined; + /** + * If set, the display feature of a multi-segment screen. If not set, multi-segment support + * is turned-off. + */ + displayFeature?: DisplayFeature | undefined; + }; + /** + * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, + * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media + * query results). + * @response `Emulation.setDeviceMetricsOverride` + */ + export type SetDeviceMetricsOverrideResponse = {}; + /** + * undefined + * @request `Emulation.setScrollbarsHidden` + */ + export type SetScrollbarsHiddenRequest = { + /** + * Whether scrollbars should be always hidden. + */ + hidden: boolean; + }; + /** + * undefined + * @response `Emulation.setScrollbarsHidden` + */ + export type SetScrollbarsHiddenResponse = {}; + /** + * undefined + * @request `Emulation.setDocumentCookieDisabled` + */ + export type SetDocumentCookieDisabledRequest = { + /** + * Whether document.coookie API should be disabled. + */ + disabled: boolean; + }; + /** + * undefined + * @response `Emulation.setDocumentCookieDisabled` + */ + export type SetDocumentCookieDisabledResponse = {}; + /** + * undefined + * @request `Emulation.setEmitTouchEventsForMouse` + */ + export type SetEmitTouchEventsForMouseRequest = { + /** + * Whether touch emulation based on mouse input should be enabled. + */ + enabled: boolean; + /** + * Touch/gesture events configuration. Default: current platform. + */ + configuration?: "mobile" | "desktop" | undefined; + }; + /** + * undefined + * @response `Emulation.setEmitTouchEventsForMouse` + */ + export type SetEmitTouchEventsForMouseResponse = {}; + /** + * Emulates the given media type or media feature for CSS media queries. + * @request `Emulation.setEmulatedMedia` + */ + export type SetEmulatedMediaRequest = { + /** + * Media type to emulate. Empty string disables the override. + */ + media?: string | undefined; + /** + * Media features to emulate. + */ + features?: MediaFeature[] | undefined; + }; + /** + * Emulates the given media type or media feature for CSS media queries. + * @response `Emulation.setEmulatedMedia` + */ + export type SetEmulatedMediaResponse = {}; + /** + * Emulates the given vision deficiency. + * @request `Emulation.setEmulatedVisionDeficiency` + */ + export type SetEmulatedVisionDeficiencyRequest = { + /** + * Vision deficiency to emulate. Order: best-effort emulations come first, followed by any + * physiologically accurate emulations for medically recognized color vision deficiencies. + */ + type: + | "none" + | "blurredVision" + | "reducedContrast" + | "achromatopsia" + | "deuteranopia" + | "protanopia" + | "tritanopia"; + }; + /** + * Emulates the given vision deficiency. + * @response `Emulation.setEmulatedVisionDeficiency` + */ + export type SetEmulatedVisionDeficiencyResponse = {}; + /** + * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position + * unavailable. + * @request `Emulation.setGeolocationOverride` + */ + export type SetGeolocationOverrideRequest = { + /** + * Mock latitude + */ + latitude?: number | undefined; + /** + * Mock longitude + */ + longitude?: number | undefined; + /** + * Mock accuracy + */ + accuracy?: number | undefined; + }; + /** + * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position + * unavailable. + * @response `Emulation.setGeolocationOverride` + */ + export type SetGeolocationOverrideResponse = {}; + /** + * Overrides the Idle state. + * @request `Emulation.setIdleOverride` + */ + export type SetIdleOverrideRequest = { + /** + * Mock isUserActive + */ + isUserActive: boolean; + /** + * Mock isScreenUnlocked + */ + isScreenUnlocked: boolean; + }; + /** + * Overrides the Idle state. + * @response `Emulation.setIdleOverride` + */ + export type SetIdleOverrideResponse = {}; + /** + * Clears Idle state overrides. + * @request `Emulation.clearIdleOverride` + */ + export type ClearIdleOverrideRequest = {}; + /** + * Clears Idle state overrides. + * @response `Emulation.clearIdleOverride` + */ + export type ClearIdleOverrideResponse = {}; + /** + * Overrides value returned by the javascript navigator object. + * @request `Emulation.setNavigatorOverrides` + */ + export type SetNavigatorOverridesRequest = { + /** + * The platform navigator.platform should return. + */ + platform: string; + }; + /** + * Overrides value returned by the javascript navigator object. + * @response `Emulation.setNavigatorOverrides` + */ + export type SetNavigatorOverridesResponse = {}; + /** + * Sets a specified page scale factor. + * @request `Emulation.setPageScaleFactor` + */ + export type SetPageScaleFactorRequest = { + /** + * Page scale factor. + */ + pageScaleFactor: number; + }; + /** + * Sets a specified page scale factor. + * @response `Emulation.setPageScaleFactor` + */ + export type SetPageScaleFactorResponse = {}; + /** + * Switches script execution in the page. + * @request `Emulation.setScriptExecutionDisabled` + */ + export type SetScriptExecutionDisabledRequest = { + /** + * Whether script execution should be disabled in the page. + */ + value: boolean; + }; + /** + * Switches script execution in the page. + * @response `Emulation.setScriptExecutionDisabled` + */ + export type SetScriptExecutionDisabledResponse = {}; + /** + * Enables touch on platforms which do not support them. + * @request `Emulation.setTouchEmulationEnabled` + */ + export type SetTouchEmulationEnabledRequest = { + /** + * Whether the touch event emulation should be enabled. + */ + enabled: boolean; + /** + * Maximum touch points supported. Defaults to one. + */ + maxTouchPoints?: number | undefined; + }; + /** + * Enables touch on platforms which do not support them. + * @response `Emulation.setTouchEmulationEnabled` + */ + export type SetTouchEmulationEnabledResponse = {}; + /** + * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets + * the current virtual time policy. Note this supersedes any previous time budget. + * @request `Emulation.setVirtualTimePolicy` + */ + export type SetVirtualTimePolicyRequest = { + policy: VirtualTimePolicy; + /** + * If set, after this many virtual milliseconds have elapsed virtual time will be paused and a + * virtualTimeBudgetExpired event is sent. + */ + budget?: number | undefined; + /** + * If set this specifies the maximum number of tasks that can be run before virtual is forced + * forwards to prevent deadlock. + */ + maxVirtualTimeTaskStarvationCount?: number | undefined; + /** + * If set, base::Time::Now will be overridden to initially return this value. + */ + initialVirtualTime?: Network.TimeSinceEpoch | undefined; + }; + /** + * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets + * the current virtual time policy. Note this supersedes any previous time budget. + * @response `Emulation.setVirtualTimePolicy` + */ + export type SetVirtualTimePolicyResponse = { + /** + * Absolute timestamp at which virtual time was first enabled (up time in milliseconds). + */ + virtualTimeTicksBase: number; + }; + /** + * Overrides default host system locale with the specified one. + * @request `Emulation.setLocaleOverride` + */ + export type SetLocaleOverrideRequest = { + /** + * ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and + * restores default host system locale. + */ + locale?: string | undefined; + }; + /** + * Overrides default host system locale with the specified one. + * @response `Emulation.setLocaleOverride` + */ + export type SetLocaleOverrideResponse = {}; + /** + * Overrides default host system timezone with the specified one. + * @request `Emulation.setTimezoneOverride` + */ + export type SetTimezoneOverrideRequest = { + /** + * The timezone identifier. If empty, disables the override and + * restores default host system timezone. + */ + timezoneId: string; + }; + /** + * Overrides default host system timezone with the specified one. + * @response `Emulation.setTimezoneOverride` + */ + export type SetTimezoneOverrideResponse = {}; + /** + * Resizes the frame/viewport of the page. Note that this does not affect the frame's container + * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported + * on Android. + * @request `Emulation.setVisibleSize` + */ + export type SetVisibleSizeRequest = { + /** + * Frame width (DIP). + */ + width: number; + /** + * Frame height (DIP). + */ + height: number; + }; + /** + * Resizes the frame/viewport of the page. Note that this does not affect the frame's container + * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported + * on Android. + * @response `Emulation.setVisibleSize` + */ + export type SetVisibleSizeResponse = {}; + /** + * undefined + * @request `Emulation.setDisabledImageTypes` + */ + export type SetDisabledImageTypesRequest = { + /** + * Image types to disable. + */ + imageTypes: DisabledImageType[]; + }; + /** + * undefined + * @response `Emulation.setDisabledImageTypes` + */ + export type SetDisabledImageTypesResponse = {}; + /** + * undefined + * @request `Emulation.setHardwareConcurrencyOverride` + */ + export type SetHardwareConcurrencyOverrideRequest = { + /** + * Hardware concurrency to report + */ + hardwareConcurrency: number; + }; + /** + * undefined + * @response `Emulation.setHardwareConcurrencyOverride` + */ + export type SetHardwareConcurrencyOverrideResponse = {}; + /** + * Allows overriding user agent with the given string. + * @request `Emulation.setUserAgentOverride` + */ + export type SetUserAgentOverrideRequest = { + /** + * User agent to use. + */ + userAgent: string; + /** + * Browser langugage to emulate. + */ + acceptLanguage?: string | undefined; + /** + * The platform navigator.platform should return. + */ + platform?: string | undefined; + /** + * To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData + */ + userAgentMetadata?: UserAgentMetadata | undefined; + }; + /** + * Allows overriding user agent with the given string. + * @response `Emulation.setUserAgentOverride` + */ + export type SetUserAgentOverrideResponse = {}; + /** + * Allows overriding the automation flag. + * @request `Emulation.setAutomationOverride` + */ + export type SetAutomationOverrideRequest = { + /** + * Whether the override should be enabled. + */ + enabled: boolean; + }; + /** + * Allows overriding the automation flag. + * @response `Emulation.setAutomationOverride` + */ + export type SetAutomationOverrideResponse = {}; + } + export namespace EventBreakpoints { + /** + * Sets breakpoint on particular native event. + * @request `EventBreakpoints.setInstrumentationBreakpoint` + */ + export type SetInstrumentationBreakpointRequest = { + /** + * Instrumentation name to stop on. + */ + eventName: string; + }; + /** + * Sets breakpoint on particular native event. + * @response `EventBreakpoints.setInstrumentationBreakpoint` + */ + export type SetInstrumentationBreakpointResponse = {}; + /** + * Removes breakpoint on particular native event. + * @request `EventBreakpoints.removeInstrumentationBreakpoint` + */ + export type RemoveInstrumentationBreakpointRequest = { + /** + * Instrumentation name to stop on. + */ + eventName: string; + }; + /** + * Removes breakpoint on particular native event. + * @response `EventBreakpoints.removeInstrumentationBreakpoint` + */ + export type RemoveInstrumentationBreakpointResponse = {}; + } + export namespace FedCm { + /** + * Whether this is a sign-up or sign-in action for this account, i.e. + * whether this account has ever been used to sign in to this RP before. + */ + export type LoginState = "SignIn" | "SignUp"; + /** + * Whether the dialog shown is an account chooser or an auto re-authentication dialog. + */ + export type DialogType = "AccountChooser" | "AutoReauthn" | "ConfirmIdpSignin"; + /** + * Corresponds to IdentityRequestAccount + */ + export type Account = { + accountId: string; + email: string; + name: string; + givenName: string; + pictureUrl: string; + idpConfigUrl: string; + idpSigninUrl: string; + loginState: LoginState; + /** + * These two are only set if the loginState is signUp + */ + termsOfServiceUrl?: string | undefined; + privacyPolicyUrl?: string | undefined; + }; + /** + * undefined + * @event `FedCm.dialogShown` + */ + export type DialogShownEvent = { + dialogId: string; + dialogType: DialogType; + accounts: Account[]; + /** + * These exist primarily so that the caller can verify the + * RP context was used appropriately. + */ + title: string; + subtitle?: string | undefined; + }; + /** + * undefined + * @request `FedCm.enable` + */ + export type EnableRequest = { + /** + * Allows callers to disable the promise rejection delay that would + * normally happen, if this is unimportant to what's being tested. + * (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in) + */ + disableRejectionDelay?: boolean | undefined; + }; + /** + * undefined + * @response `FedCm.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `FedCm.disable` + */ + export type DisableRequest = {}; + /** + * undefined + * @response `FedCm.disable` + */ + export type DisableResponse = {}; + /** + * undefined + * @request `FedCm.selectAccount` + */ + export type SelectAccountRequest = { + dialogId: string; + accountIndex: number; + }; + /** + * undefined + * @response `FedCm.selectAccount` + */ + export type SelectAccountResponse = {}; + /** + * undefined + * @request `FedCm.dismissDialog` + */ + export type DismissDialogRequest = { + dialogId: string; + triggerCooldown?: boolean | undefined; + }; + /** + * undefined + * @response `FedCm.dismissDialog` + */ + export type DismissDialogResponse = {}; + /** + * Resets the cooldown time, if any, to allow the next FedCM call to show + * a dialog even if one was recently dismissed by the user. + * @request `FedCm.resetCooldown` + */ + export type ResetCooldownRequest = {}; + /** + * Resets the cooldown time, if any, to allow the next FedCM call to show + * a dialog even if one was recently dismissed by the user. + * @response `FedCm.resetCooldown` + */ + export type ResetCooldownResponse = {}; + } + export namespace Fetch { + /** + * Unique request identifier. + */ + export type RequestId = string; + /** + * Stages of the request to handle. Request will intercept before the request is + * sent. Response will intercept after the response is received (but before response + * body is received). + */ + export type RequestStage = "Request" | "Response"; + export type RequestPattern = { + /** + * Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is + * backslash. Omitting is equivalent to `"*"`. + */ + urlPattern?: string | undefined; + /** + * If set, only requests for matching resource types will be intercepted. + */ + resourceType?: Network.ResourceType | undefined; + /** + * Stage at which to begin intercepting requests. Default is Request. + */ + requestStage?: RequestStage | undefined; + }; + /** + * Response HTTP header entry + */ + export type HeaderEntry = { + name: string; + value: string; + }; + /** + * Authorization challenge for HTTP status code 401 or 407. + */ + export type AuthChallenge = { + /** + * Source of the authentication challenge. + */ + source?: "Server" | "Proxy" | undefined; + /** + * Origin of the challenger. + */ + origin: string; + /** + * The authentication scheme used, such as basic or digest + */ + scheme: string; + /** + * The realm of the challenge. May be empty. + */ + realm: string; + }; + /** + * Response to an AuthChallenge. + */ + export type AuthChallengeResponse = { + /** + * The decision on what to do in response to the authorization challenge. Default means + * deferring to the default behavior of the net stack, which will likely either the Cancel + * authentication or display a popup dialog box. + */ + response: "Default" | "CancelAuth" | "ProvideCredentials"; + /** + * The username to provide, possibly empty. Should only be set if response is + * ProvideCredentials. + */ + username?: string | undefined; + /** + * The password to provide, possibly empty. Should only be set if response is + * ProvideCredentials. + */ + password?: string | undefined; + }; + /** + * Issued when the domain is enabled and the request URL matches the + * specified filter. The request is paused until the client responds + * with one of continueRequest, failRequest or fulfillRequest. + * The stage of the request can be determined by presence of responseErrorReason + * and responseStatusCode -- the request is at the response stage if either + * of these fields is present and in the request stage otherwise. + * Redirect responses and subsequent requests are reported similarly to regular + * responses and requests. Redirect responses may be distinguished by the value + * of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with + * presence of the `location` header. Requests resulting from a redirect will + * have `redirectedRequestId` field set. + * @event `Fetch.requestPaused` + */ + export type RequestPausedEvent = { + /** + * Each request the page makes will have a unique id. + */ + requestId: RequestId; + /** + * The details of the request. + */ + request: Network.Request; + /** + * The id of the frame that initiated the request. + */ + frameId: Page.FrameId; + /** + * How the requested resource will be used. + */ + resourceType: Network.ResourceType; + /** + * Response error if intercepted at response stage. + */ + responseErrorReason?: Network.ErrorReason | undefined; + /** + * Response code if intercepted at response stage. + */ + responseStatusCode?: number | undefined; + /** + * Response status text if intercepted at response stage. + */ + responseStatusText?: string | undefined; + /** + * Response headers if intercepted at the response stage. + */ + responseHeaders?: HeaderEntry[] | undefined; + /** + * If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, + * then this networkId will be the same as the requestId present in the requestWillBeSent event. + */ + networkId?: Network.RequestId | undefined; + /** + * If the request is due to a redirect response from the server, the id of the request that + * has caused the redirect. + */ + redirectedRequestId?: RequestId | undefined; + }; + /** + * Issued when the domain is enabled with handleAuthRequests set to true. + * The request is paused until client responds with continueWithAuth. + * @event `Fetch.authRequired` + */ + export type AuthRequiredEvent = { + /** + * Each request the page makes will have a unique id. + */ + requestId: RequestId; + /** + * The details of the request. + */ + request: Network.Request; + /** + * The id of the frame that initiated the request. + */ + frameId: Page.FrameId; + /** + * How the requested resource will be used. + */ + resourceType: Network.ResourceType; + /** + * Details of the Authorization Challenge encountered. + * If this is set, client should respond with continueRequest that + * contains AuthChallengeResponse. + */ + authChallenge: AuthChallenge; + }; + /** + * Disables the fetch domain. + * @request `Fetch.disable` + */ + export type DisableRequest = {}; + /** + * Disables the fetch domain. + * @response `Fetch.disable` + */ + export type DisableResponse = {}; + /** + * Enables issuing of requestPaused events. A request will be paused until client + * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth. + * @request `Fetch.enable` + */ + export type EnableRequest = { + /** + * If specified, only requests matching any of these patterns will produce + * fetchRequested event and will be paused until clients response. If not set, + * all requests will be affected. + */ + patterns?: RequestPattern[] | undefined; + /** + * If true, authRequired events will be issued and requests will be paused + * expecting a call to continueWithAuth. + */ + handleAuthRequests?: boolean | undefined; + }; + /** + * Enables issuing of requestPaused events. A request will be paused until client + * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth. + * @response `Fetch.enable` + */ + export type EnableResponse = {}; + /** + * Causes the request to fail with specified reason. + * @request `Fetch.failRequest` + */ + export type FailRequestRequest = { + /** + * An id the client received in requestPaused event. + */ + requestId: RequestId; + /** + * Causes the request to fail with the given reason. + */ + errorReason: Network.ErrorReason; + }; + /** + * Causes the request to fail with specified reason. + * @response `Fetch.failRequest` + */ + export type FailRequestResponse = {}; + /** + * Provides response to the request. + * @request `Fetch.fulfillRequest` + */ + export type FulfillRequestRequest = { + /** + * An id the client received in requestPaused event. + */ + requestId: RequestId; + /** + * An HTTP response code. + */ + responseCode: number; + /** + * Response headers. + */ + responseHeaders?: HeaderEntry[] | undefined; + /** + * Alternative way of specifying response headers as a \0-separated + * series of name: value pairs. Prefer the above method unless you + * need to represent some non-UTF8 values that can't be transmitted + * over the protocol as text. (Encoded as a base64 string when passed over JSON) + */ + binaryResponseHeaders?: string | undefined; + /** + * A response body. If absent, original response body will be used if + * the request is intercepted at the response stage and empty body + * will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON) + */ + body?: string | undefined; + /** + * A textual representation of responseCode. + * If absent, a standard phrase matching responseCode is used. + */ + responsePhrase?: string | undefined; + }; + /** + * Provides response to the request. + * @response `Fetch.fulfillRequest` + */ + export type FulfillRequestResponse = {}; + /** + * Continues the request, optionally modifying some of its parameters. + * @request `Fetch.continueRequest` + */ + export type ContinueRequestRequest = { + /** + * An id the client received in requestPaused event. + */ + requestId: RequestId; + /** + * If set, the request url will be modified in a way that's not observable by page. + */ + url?: string | undefined; + /** + * If set, the request method is overridden. + */ + method?: string | undefined; + /** + * If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON) + */ + postData?: string | undefined; + /** + * If set, overrides the request headers. Note that the overrides do not + * extend to subsequent redirect hops, if a redirect happens. Another override + * may be applied to a different request produced by a redirect. + */ + headers?: HeaderEntry[] | undefined; + /** + * If set, overrides response interception behavior for this request. + */ + interceptResponse?: boolean | undefined; + }; + /** + * Continues the request, optionally modifying some of its parameters. + * @response `Fetch.continueRequest` + */ + export type ContinueRequestResponse = {}; + /** + * Continues a request supplying authChallengeResponse following authRequired event. + * @request `Fetch.continueWithAuth` + */ + export type ContinueWithAuthRequest = { + /** + * An id the client received in authRequired event. + */ + requestId: RequestId; + /** + * Response to with an authChallenge. + */ + authChallengeResponse: AuthChallengeResponse; + }; + /** + * Continues a request supplying authChallengeResponse following authRequired event. + * @response `Fetch.continueWithAuth` + */ + export type ContinueWithAuthResponse = {}; + /** + * Continues loading of the paused response, optionally modifying the + * response headers. If either responseCode or headers are modified, all of them + * must be present. + * @request `Fetch.continueResponse` + */ + export type ContinueResponseRequest = { + /** + * An id the client received in requestPaused event. + */ + requestId: RequestId; + /** + * An HTTP response code. If absent, original response code will be used. + */ + responseCode?: number | undefined; + /** + * A textual representation of responseCode. + * If absent, a standard phrase matching responseCode is used. + */ + responsePhrase?: string | undefined; + /** + * Response headers. If absent, original response headers will be used. + */ + responseHeaders?: HeaderEntry[] | undefined; + /** + * Alternative way of specifying response headers as a \0-separated + * series of name: value pairs. Prefer the above method unless you + * need to represent some non-UTF8 values that can't be transmitted + * over the protocol as text. (Encoded as a base64 string when passed over JSON) + */ + binaryResponseHeaders?: string | undefined; + }; + /** + * Continues loading of the paused response, optionally modifying the + * response headers. If either responseCode or headers are modified, all of them + * must be present. + * @response `Fetch.continueResponse` + */ + export type ContinueResponseResponse = {}; + /** + * Causes the body of the response to be received from the server and + * returned as a single string. May only be issued for a request that + * is paused in the Response stage and is mutually exclusive with + * takeResponseBodyForInterceptionAsStream. Calling other methods that + * affect the request or disabling fetch domain before body is received + * results in an undefined behavior. + * Note that the response body is not available for redirects. Requests + * paused in the _redirect received_ state may be differentiated by + * `responseCode` and presence of `location` response header, see + * comments to `requestPaused` for details. + * @request `Fetch.getResponseBody` + */ + export type GetResponseBodyRequest = { + /** + * Identifier for the intercepted request to get body for. + */ + requestId: RequestId; + }; + /** + * Causes the body of the response to be received from the server and + * returned as a single string. May only be issued for a request that + * is paused in the Response stage and is mutually exclusive with + * takeResponseBodyForInterceptionAsStream. Calling other methods that + * affect the request or disabling fetch domain before body is received + * results in an undefined behavior. + * Note that the response body is not available for redirects. Requests + * paused in the _redirect received_ state may be differentiated by + * `responseCode` and presence of `location` response header, see + * comments to `requestPaused` for details. + * @response `Fetch.getResponseBody` + */ + export type GetResponseBodyResponse = { + /** + * Response body. + */ + body: string; + /** + * True, if content was sent as base64. + */ + base64Encoded: boolean; + }; + /** + * Returns a handle to the stream representing the response body. + * The request must be paused in the HeadersReceived stage. + * Note that after this command the request can't be continued + * as is -- client either needs to cancel it or to provide the + * response body. + * The stream only supports sequential read, IO.read will fail if the position + * is specified. + * This method is mutually exclusive with getResponseBody. + * Calling other methods that affect the request or disabling fetch + * domain before body is received results in an undefined behavior. + * @request `Fetch.takeResponseBodyAsStream` + */ + export type TakeResponseBodyAsStreamRequest = { + requestId: RequestId; + }; + /** + * Returns a handle to the stream representing the response body. + * The request must be paused in the HeadersReceived stage. + * Note that after this command the request can't be continued + * as is -- client either needs to cancel it or to provide the + * response body. + * The stream only supports sequential read, IO.read will fail if the position + * is specified. + * This method is mutually exclusive with getResponseBody. + * Calling other methods that affect the request or disabling fetch + * domain before body is received results in an undefined behavior. + * @response `Fetch.takeResponseBodyAsStream` + */ + export type TakeResponseBodyAsStreamResponse = { + stream: IO.StreamHandle; + }; + } + export namespace HeadlessExperimental { + /** + * Encoding options for a screenshot. + */ + export type ScreenshotParams = { + /** + * Image compression format (defaults to png). + */ + format?: "jpeg" | "png" | "webp" | undefined; + /** + * Compression quality from range [0..100] (jpeg and webp only). + */ + quality?: number | undefined; + /** + * Optimize image encoding for speed, not for resulting size (defaults to false) + */ + optimizeForSpeed?: boolean | undefined; + }; + /** + * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a + * screenshot from the resulting frame. Requires that the target was created with enabled + * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also + * https://goo.gle/chrome-headless-rendering for more background. + * @request `HeadlessExperimental.beginFrame` + */ + export type BeginFrameRequest = { + /** + * Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, + * the current time will be used. + */ + frameTimeTicks?: number | undefined; + /** + * The interval between BeginFrames that is reported to the compositor, in milliseconds. + * Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds. + */ + interval?: number | undefined; + /** + * Whether updates should not be committed and drawn onto the display. False by default. If + * true, only side effects of the BeginFrame will be run, such as layout and animations, but + * any visual updates may not be visible on the display or in screenshots. + */ + noDisplayUpdates?: boolean | undefined; + /** + * If set, a screenshot of the frame will be captured and returned in the response. Otherwise, + * no screenshot will be captured. Note that capturing a screenshot can fail, for example, + * during renderer initialization. In such a case, no screenshot data will be returned. + */ + screenshot?: ScreenshotParams | undefined; + }; + /** + * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a + * screenshot from the resulting frame. Requires that the target was created with enabled + * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also + * https://goo.gle/chrome-headless-rendering for more background. + * @response `HeadlessExperimental.beginFrame` + */ + export type BeginFrameResponse = { + /** + * Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the + * display. Reported for diagnostic uses, may be removed in the future. + */ + hasDamage: boolean; + /** + * Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON) + */ + screenshotData?: string | undefined; + }; + /** + * Disables headless events for the target. + * @request `HeadlessExperimental.disable` + */ + export type DisableRequest = {}; + /** + * Disables headless events for the target. + * @response `HeadlessExperimental.disable` + */ + export type DisableResponse = {}; + /** + * Enables headless events for the target. + * @request `HeadlessExperimental.enable` + */ + export type EnableRequest = {}; + /** + * Enables headless events for the target. + * @response `HeadlessExperimental.enable` + */ + export type EnableResponse = {}; + } + export namespace IndexedDB { + /** + * Database with an array of object stores. + */ + export type DatabaseWithObjectStores = { + /** + * Database name. + */ + name: string; + /** + * Database version (type is not 'integer', as the standard + * requires the version number to be 'unsigned long long') + */ + version: number; + /** + * Object stores in this database. + */ + objectStores: ObjectStore[]; + }; + /** + * Object store. + */ + export type ObjectStore = { + /** + * Object store name. + */ + name: string; + /** + * Object store key path. + */ + keyPath: KeyPath; + /** + * If true, object store has auto increment flag set. + */ + autoIncrement: boolean; + /** + * Indexes in this object store. + */ + indexes: ObjectStoreIndex[]; + }; + /** + * Object store index. + */ + export type ObjectStoreIndex = { + /** + * Index name. + */ + name: string; + /** + * Index key path. + */ + keyPath: KeyPath; + /** + * If true, index is unique. + */ + unique: boolean; + /** + * If true, index allows multiple entries for a key. + */ + multiEntry: boolean; + }; + /** + * Key. + */ + export type Key = { + /** + * Key type. + */ + type: "number" | "string" | "date" | "array"; + /** + * Number value. + */ + number?: number | undefined; + /** + * String value. + */ + string?: string | undefined; + /** + * Date value. + */ + date?: number | undefined; + /** + * Array value. + */ + array?: Key[] | undefined; + }; + /** + * Key range. + */ + export type KeyRange = { + /** + * Lower bound. + */ + lower?: Key | undefined; + /** + * Upper bound. + */ + upper?: Key | undefined; + /** + * If true lower bound is open. + */ + lowerOpen: boolean; + /** + * If true upper bound is open. + */ + upperOpen: boolean; + }; + /** + * Data entry. + */ + export type DataEntry = { + /** + * Key object. + */ + key: Runtime.RemoteObject; + /** + * Primary key object. + */ + primaryKey: Runtime.RemoteObject; + /** + * Value object. + */ + value: Runtime.RemoteObject; + }; + /** + * Key path. + */ + export type KeyPath = { + /** + * Key path type. + */ + type: "null" | "string" | "array"; + /** + * String value. + */ + string?: string | undefined; + /** + * Array value. + */ + array?: string[] | undefined; + }; + /** + * Clears all entries from an object store. + * @request `IndexedDB.clearObjectStore` + */ + export type ClearObjectStoreRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * Database name. + */ + databaseName: string; + /** + * Object store name. + */ + objectStoreName: string; + }; + /** + * Clears all entries from an object store. + * @response `IndexedDB.clearObjectStore` + */ + export type ClearObjectStoreResponse = {}; + /** + * Deletes a database. + * @request `IndexedDB.deleteDatabase` + */ + export type DeleteDatabaseRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * Database name. + */ + databaseName: string; + }; + /** + * Deletes a database. + * @response `IndexedDB.deleteDatabase` + */ + export type DeleteDatabaseResponse = {}; + /** + * Delete a range of entries from an object store + * @request `IndexedDB.deleteObjectStoreEntries` + */ + export type DeleteObjectStoreEntriesRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + databaseName: string; + objectStoreName: string; + /** + * Range of entry keys to delete + */ + keyRange: KeyRange; + }; + /** + * Delete a range of entries from an object store + * @response `IndexedDB.deleteObjectStoreEntries` + */ + export type DeleteObjectStoreEntriesResponse = {}; + /** + * Disables events from backend. + * @request `IndexedDB.disable` + */ + export type DisableRequest = {}; + /** + * Disables events from backend. + * @response `IndexedDB.disable` + */ + export type DisableResponse = {}; + /** + * Enables events from backend. + * @request `IndexedDB.enable` + */ + export type EnableRequest = {}; + /** + * Enables events from backend. + * @response `IndexedDB.enable` + */ + export type EnableResponse = {}; + /** + * Requests data from object store or index. + * @request `IndexedDB.requestData` + */ + export type RequestDataRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * Database name. + */ + databaseName: string; + /** + * Object store name. + */ + objectStoreName: string; + /** + * Index name, empty string for object store data requests. + */ + indexName: string; + /** + * Number of records to skip. + */ + skipCount: number; + /** + * Number of records to fetch. + */ + pageSize: number; + /** + * Key range. + */ + keyRange?: KeyRange | undefined; + }; + /** + * Requests data from object store or index. + * @response `IndexedDB.requestData` + */ + export type RequestDataResponse = { + /** + * Array of object store data entries. + */ + objectStoreDataEntries: DataEntry[]; + /** + * If true, there are more entries to fetch in the given range. + */ + hasMore: boolean; + }; + /** + * Gets metadata of an object store. + * @request `IndexedDB.getMetadata` + */ + export type GetMetadataRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * Database name. + */ + databaseName: string; + /** + * Object store name. + */ + objectStoreName: string; + }; + /** + * Gets metadata of an object store. + * @response `IndexedDB.getMetadata` + */ + export type GetMetadataResponse = { + /** + * the entries count + */ + entriesCount: number; + /** + * the current value of key generator, to become the next inserted + * key into the object store. Valid if objectStore.autoIncrement + * is true. + */ + keyGeneratorValue: number; + }; + /** + * Requests database with given name in given frame. + * @request `IndexedDB.requestDatabase` + */ + export type RequestDatabaseRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + /** + * Database name. + */ + databaseName: string; + }; + /** + * Requests database with given name in given frame. + * @response `IndexedDB.requestDatabase` + */ + export type RequestDatabaseResponse = { + /** + * Database with an array of object stores. + */ + databaseWithObjectStores: DatabaseWithObjectStores; + }; + /** + * Requests database names for given security origin. + * @request `IndexedDB.requestDatabaseNames` + */ + export type RequestDatabaseNamesRequest = { + /** + * At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. + * Security origin. + */ + securityOrigin?: string | undefined; + /** + * Storage key. + */ + storageKey?: string | undefined; + /** + * Storage bucket. If not specified, it uses the default bucket. + */ + storageBucket?: Storage.StorageBucket | undefined; + }; + /** + * Requests database names for given security origin. + * @response `IndexedDB.requestDatabaseNames` + */ + export type RequestDatabaseNamesResponse = { + /** + * Database names for origin. + */ + databaseNames: string[]; + }; + } + export namespace Input { + export type TouchPoint = { + /** + * X coordinate of the event relative to the main frame's viewport in CSS pixels. + */ + x: number; + /** + * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to + * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. + */ + y: number; + /** + * X radius of the touch area (default: 1.0). + */ + radiusX?: number | undefined; + /** + * Y radius of the touch area (default: 1.0). + */ + radiusY?: number | undefined; + /** + * Rotation angle (default: 0.0). + */ + rotationAngle?: number | undefined; + /** + * Force (default: 1.0). + */ + force?: number | undefined; + /** + * The normalized tangential pressure, which has a range of [-1,1] (default: 0). + */ + tangentialPressure?: number | undefined; + /** + * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0) + */ + tiltX?: number | undefined; + /** + * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0). + */ + tiltY?: number | undefined; + /** + * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0). + */ + twist?: number | undefined; + /** + * Identifier used to track touch sources between events, must be unique within an event. + */ + id?: number | undefined; + }; + export type GestureSourceType = "default" | "touch" | "mouse"; + export type MouseButton = "none" | "left" | "middle" | "right" | "back" | "forward"; + /** + * UTC time in seconds, counted from January 1, 1970. + */ + export type TimeSinceEpoch = number; + export type DragDataItem = { + /** + * Mime type of the dragged data. + */ + mimeType: string; + /** + * Depending of the value of `mimeType`, it contains the dragged link, + * text, HTML markup or any other data. + */ + data: string; + /** + * Title associated with a link. Only valid when `mimeType` == "text/uri-list". + */ + title?: string | undefined; + /** + * Stores the base URL for the contained markup. Only valid when `mimeType` + * == "text/html". + */ + baseURL?: string | undefined; + }; + export type DragData = { + items: DragDataItem[]; + /** + * List of filenames that should be included when dropping + */ + files?: string[] | undefined; + /** + * Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16 + */ + dragOperationsMask: number; + }; + /** + * Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to + * restore normal drag and drop behavior. + * @event `Input.dragIntercepted` + */ + export type DragInterceptedEvent = { + data: DragData; + }; + /** + * Dispatches a drag event into the page. + * @request `Input.dispatchDragEvent` + */ + export type DispatchDragEventRequest = { + /** + * Type of the drag event. + */ + type: "dragEnter" | "dragOver" | "drop" | "dragCancel"; + /** + * X coordinate of the event relative to the main frame's viewport in CSS pixels. + */ + x: number; + /** + * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to + * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. + */ + y: number; + data: DragData; + /** + * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 + * (default: 0). + */ + modifiers?: number | undefined; + }; + /** + * Dispatches a drag event into the page. + * @response `Input.dispatchDragEvent` + */ + export type DispatchDragEventResponse = {}; + /** + * Dispatches a key event to the page. + * @request `Input.dispatchKeyEvent` + */ + export type DispatchKeyEventRequest = { + /** + * Type of the key event. + */ + type: "keyDown" | "keyUp" | "rawKeyDown" | "char"; + /** + * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 + * (default: 0). + */ + modifiers?: number | undefined; + /** + * Time at which the event occurred. + */ + timestamp?: TimeSinceEpoch | undefined; + /** + * Text as generated by processing a virtual key code with a keyboard layout. Not needed for + * for `keyUp` and `rawKeyDown` events (default: "") + */ + text?: string | undefined; + /** + * Text that would have been generated by the keyboard if no modifiers were pressed (except for + * shift). Useful for shortcut (accelerator) key handling (default: ""). + */ + unmodifiedText?: string | undefined; + /** + * Unique key identifier (e.g., 'U+0041') (default: ""). + */ + keyIdentifier?: string | undefined; + /** + * Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). + */ + code?: string | undefined; + /** + * Unique DOM defined string value describing the meaning of the key in the context of active + * modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). + */ + key?: string | undefined; + /** + * Windows virtual key code (default: 0). + */ + windowsVirtualKeyCode?: number | undefined; + /** + * Native virtual key code (default: 0). + */ + nativeVirtualKeyCode?: number | undefined; + /** + * Whether the event was generated from auto repeat (default: false). + */ + autoRepeat?: boolean | undefined; + /** + * Whether the event was generated from the keypad (default: false). + */ + isKeypad?: boolean | undefined; + /** + * Whether the event was a system key event (default: false). + */ + isSystemKey?: boolean | undefined; + /** + * Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: + * 0). + */ + location?: number | undefined; + /** + * Editing commands to send with the key event (e.g., 'selectAll') (default: []). + * These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding. + * See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names. + */ + commands?: string[] | undefined; + }; + /** + * Dispatches a key event to the page. + * @response `Input.dispatchKeyEvent` + */ + export type DispatchKeyEventResponse = {}; + /** + * This method emulates inserting text that doesn't come from a key press, + * for example an emoji keyboard or an IME. + * @request `Input.insertText` + */ + export type InsertTextRequest = { + /** + * The text to insert. + */ + text: string; + }; + /** + * This method emulates inserting text that doesn't come from a key press, + * for example an emoji keyboard or an IME. + * @response `Input.insertText` + */ + export type InsertTextResponse = {}; + /** + * This method sets the current candidate text for ime. + * Use imeCommitComposition to commit the final text. + * Use imeSetComposition with empty string as text to cancel composition. + * @request `Input.imeSetComposition` + */ + export type ImeSetCompositionRequest = { + /** + * The text to insert + */ + text: string; + /** + * selection start + */ + selectionStart: number; + /** + * selection end + */ + selectionEnd: number; + /** + * replacement start + */ + replacementStart?: number | undefined; + /** + * replacement end + */ + replacementEnd?: number | undefined; + }; + /** + * This method sets the current candidate text for ime. + * Use imeCommitComposition to commit the final text. + * Use imeSetComposition with empty string as text to cancel composition. + * @response `Input.imeSetComposition` + */ + export type ImeSetCompositionResponse = {}; + /** + * Dispatches a mouse event to the page. + * @request `Input.dispatchMouseEvent` + */ + export type DispatchMouseEventRequest = { + /** + * Type of the mouse event. + */ + type: "mousePressed" | "mouseReleased" | "mouseMoved" | "mouseWheel"; + /** + * X coordinate of the event relative to the main frame's viewport in CSS pixels. + */ + x: number; + /** + * Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to + * the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. + */ + y: number; + /** + * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 + * (default: 0). + */ + modifiers?: number | undefined; + /** + * Time at which the event occurred. + */ + timestamp?: TimeSinceEpoch | undefined; + /** + * Mouse button (default: "none"). + */ + button?: MouseButton | undefined; + /** + * A number indicating which buttons are pressed on the mouse when a mouse event is triggered. + * Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. + */ + buttons?: number | undefined; + /** + * Number of times the mouse button was clicked (default: 0). + */ + clickCount?: number | undefined; + /** + * The normalized pressure, which has a range of [0,1] (default: 0). + */ + force?: number | undefined; + /** + * The normalized tangential pressure, which has a range of [-1,1] (default: 0). + */ + tangentialPressure?: number | undefined; + /** + * The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0). + */ + tiltX?: number | undefined; + /** + * The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0). + */ + tiltY?: number | undefined; + /** + * The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0). + */ + twist?: number | undefined; + /** + * X delta in CSS pixels for mouse wheel event (default: 0). + */ + deltaX?: number | undefined; + /** + * Y delta in CSS pixels for mouse wheel event (default: 0). + */ + deltaY?: number | undefined; + /** + * Pointer type (default: "mouse"). + */ + pointerType?: "mouse" | "pen" | undefined; + }; + /** + * Dispatches a mouse event to the page. + * @response `Input.dispatchMouseEvent` + */ + export type DispatchMouseEventResponse = {}; + /** + * Dispatches a touch event to the page. + * @request `Input.dispatchTouchEvent` + */ + export type DispatchTouchEventRequest = { + /** + * Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while + * TouchStart and TouchMove must contains at least one. + */ + type: "touchStart" | "touchEnd" | "touchMove" | "touchCancel"; + /** + * Active touch points on the touch device. One event per any changed point (compared to + * previous touch event in a sequence) is generated, emulating pressing/moving/releasing points + * one by one. + */ + touchPoints: TouchPoint[]; + /** + * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 + * (default: 0). + */ + modifiers?: number | undefined; + /** + * Time at which the event occurred. + */ + timestamp?: TimeSinceEpoch | undefined; + }; + /** + * Dispatches a touch event to the page. + * @response `Input.dispatchTouchEvent` + */ + export type DispatchTouchEventResponse = {}; + /** + * Cancels any active dragging in the page. + * @request `Input.cancelDragging` + */ + export type CancelDraggingRequest = {}; + /** + * Cancels any active dragging in the page. + * @response `Input.cancelDragging` + */ + export type CancelDraggingResponse = {}; + /** + * Emulates touch event from the mouse event parameters. + * @request `Input.emulateTouchFromMouseEvent` + */ + export type EmulateTouchFromMouseEventRequest = { + /** + * Type of the mouse event. + */ + type: "mousePressed" | "mouseReleased" | "mouseMoved" | "mouseWheel"; + /** + * X coordinate of the mouse pointer in DIP. + */ + x: number; + /** + * Y coordinate of the mouse pointer in DIP. + */ + y: number; + /** + * Mouse button. Only "none", "left", "right" are supported. + */ + button: MouseButton; + /** + * Time at which the event occurred (default: current time). + */ + timestamp?: TimeSinceEpoch | undefined; + /** + * X delta in DIP for mouse wheel event (default: 0). + */ + deltaX?: number | undefined; + /** + * Y delta in DIP for mouse wheel event (default: 0). + */ + deltaY?: number | undefined; + /** + * Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 + * (default: 0). + */ + modifiers?: number | undefined; + /** + * Number of times the mouse button was clicked (default: 0). + */ + clickCount?: number | undefined; + }; + /** + * Emulates touch event from the mouse event parameters. + * @response `Input.emulateTouchFromMouseEvent` + */ + export type EmulateTouchFromMouseEventResponse = {}; + /** + * Ignores input events (useful while auditing page). + * @request `Input.setIgnoreInputEvents` + */ + export type SetIgnoreInputEventsRequest = { + /** + * Ignores input events processing when set to true. + */ + ignore: boolean; + }; + /** + * Ignores input events (useful while auditing page). + * @response `Input.setIgnoreInputEvents` + */ + export type SetIgnoreInputEventsResponse = {}; + /** + * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. + * Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`. + * @request `Input.setInterceptDrags` + */ + export type SetInterceptDragsRequest = { + enabled: boolean; + }; + /** + * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. + * Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`. + * @response `Input.setInterceptDrags` + */ + export type SetInterceptDragsResponse = {}; + /** + * Synthesizes a pinch gesture over a time period by issuing appropriate touch events. + * @request `Input.synthesizePinchGesture` + */ + export type SynthesizePinchGestureRequest = { + /** + * X coordinate of the start of the gesture in CSS pixels. + */ + x: number; + /** + * Y coordinate of the start of the gesture in CSS pixels. + */ + y: number; + /** + * Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). + */ + scaleFactor: number; + /** + * Relative pointer speed in pixels per second (default: 800). + */ + relativeSpeed?: number | undefined; + /** + * Which type of input events to be generated (default: 'default', which queries the platform + * for the preferred input type). + */ + gestureSourceType?: GestureSourceType | undefined; + }; + /** + * Synthesizes a pinch gesture over a time period by issuing appropriate touch events. + * @response `Input.synthesizePinchGesture` + */ + export type SynthesizePinchGestureResponse = {}; + /** + * Synthesizes a scroll gesture over a time period by issuing appropriate touch events. + * @request `Input.synthesizeScrollGesture` + */ + export type SynthesizeScrollGestureRequest = { + /** + * X coordinate of the start of the gesture in CSS pixels. + */ + x: number; + /** + * Y coordinate of the start of the gesture in CSS pixels. + */ + y: number; + /** + * The distance to scroll along the X axis (positive to scroll left). + */ + xDistance?: number | undefined; + /** + * The distance to scroll along the Y axis (positive to scroll up). + */ + yDistance?: number | undefined; + /** + * The number of additional pixels to scroll back along the X axis, in addition to the given + * distance. + */ + xOverscroll?: number | undefined; + /** + * The number of additional pixels to scroll back along the Y axis, in addition to the given + * distance. + */ + yOverscroll?: number | undefined; + /** + * Prevent fling (default: true). + */ + preventFling?: boolean | undefined; + /** + * Swipe speed in pixels per second (default: 800). + */ + speed?: number | undefined; + /** + * Which type of input events to be generated (default: 'default', which queries the platform + * for the preferred input type). + */ + gestureSourceType?: GestureSourceType | undefined; + /** + * The number of times to repeat the gesture (default: 0). + */ + repeatCount?: number | undefined; + /** + * The number of milliseconds delay between each repeat. (default: 250). + */ + repeatDelayMs?: number | undefined; + /** + * The name of the interaction markers to generate, if not empty (default: ""). + */ + interactionMarkerName?: string | undefined; + }; + /** + * Synthesizes a scroll gesture over a time period by issuing appropriate touch events. + * @response `Input.synthesizeScrollGesture` + */ + export type SynthesizeScrollGestureResponse = {}; + /** + * Synthesizes a tap gesture over a time period by issuing appropriate touch events. + * @request `Input.synthesizeTapGesture` + */ + export type SynthesizeTapGestureRequest = { + /** + * X coordinate of the start of the gesture in CSS pixels. + */ + x: number; + /** + * Y coordinate of the start of the gesture in CSS pixels. + */ + y: number; + /** + * Duration between touchdown and touchup events in ms (default: 50). + */ + duration?: number | undefined; + /** + * Number of times to perform the tap (e.g. 2 for double tap, default: 1). + */ + tapCount?: number | undefined; + /** + * Which type of input events to be generated (default: 'default', which queries the platform + * for the preferred input type). + */ + gestureSourceType?: GestureSourceType | undefined; + }; + /** + * Synthesizes a tap gesture over a time period by issuing appropriate touch events. + * @response `Input.synthesizeTapGesture` + */ + export type SynthesizeTapGestureResponse = {}; + } + export namespace IO { + /** + * This is either obtained from another method or specified as `blob:<uuid>` where + * `<uuid>` is an UUID of a Blob. + */ + export type StreamHandle = string; + /** + * Close the stream, discard any temporary backing storage. + * @request `IO.close` + */ + export type CloseRequest = { + /** + * Handle of the stream to close. + */ + handle: StreamHandle; + }; + /** + * Close the stream, discard any temporary backing storage. + * @response `IO.close` + */ + export type CloseResponse = {}; + /** + * Read a chunk of the stream + * @request `IO.read` + */ + export type ReadRequest = { + /** + * Handle of the stream to read. + */ + handle: StreamHandle; + /** + * Seek to the specified offset before reading (if not specificed, proceed with offset + * following the last read). Some types of streams may only support sequential reads. + */ + offset?: number | undefined; + /** + * Maximum number of bytes to read (left upon the agent discretion if not specified). + */ + size?: number | undefined; + }; + /** + * Read a chunk of the stream + * @response `IO.read` + */ + export type ReadResponse = { + /** + * Set if the data is base64-encoded + */ + base64Encoded?: boolean | undefined; + /** + * Data that were read. + */ + data: string; + /** + * Set if the end-of-file condition occurred while reading. + */ + eof: boolean; + }; + /** + * Return UUID of Blob object specified by a remote object id. + * @request `IO.resolveBlob` + */ + export type ResolveBlobRequest = { + /** + * Object id of a Blob object wrapper. + */ + objectId: Runtime.RemoteObjectId; + }; + /** + * Return UUID of Blob object specified by a remote object id. + * @response `IO.resolveBlob` + */ + export type ResolveBlobResponse = { + /** + * UUID of the specified Blob. + */ + uuid: string; + }; + } + export namespace LayerTree { + /** + * Unique Layer identifier. + */ + export type LayerId = string; + /** + * Unique snapshot identifier. + */ + export type SnapshotId = string; + /** + * Rectangle where scrolling happens on the main thread. + */ + export type ScrollRect = { + /** + * Rectangle itself. + */ + rect: DOM.Rect; + /** + * Reason for rectangle to force scrolling on the main thread + */ + type: "RepaintsOnScroll" | "TouchEventHandler" | "WheelEventHandler"; + }; + /** + * Sticky position constraints. + */ + export type StickyPositionConstraint = { + /** + * Layout rectangle of the sticky element before being shifted + */ + stickyBoxRect: DOM.Rect; + /** + * Layout rectangle of the containing block of the sticky element + */ + containingBlockRect: DOM.Rect; + /** + * The nearest sticky layer that shifts the sticky box + */ + nearestLayerShiftingStickyBox?: LayerId | undefined; + /** + * The nearest sticky layer that shifts the containing block + */ + nearestLayerShiftingContainingBlock?: LayerId | undefined; + }; + /** + * Serialized fragment of layer picture along with its offset within the layer. + */ + export type PictureTile = { + /** + * Offset from owning layer left boundary + */ + x: number; + /** + * Offset from owning layer top boundary + */ + y: number; + /** + * Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON) + */ + picture: string; + }; + /** + * Information about a compositing layer. + */ + export type Layer = { + /** + * The unique id for this layer. + */ + layerId: LayerId; + /** + * The id of parent (not present for root). + */ + parentLayerId?: LayerId | undefined; + /** + * The backend id for the node associated with this layer. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * Offset from parent layer, X coordinate. + */ + offsetX: number; + /** + * Offset from parent layer, Y coordinate. + */ + offsetY: number; + /** + * Layer width. + */ + width: number; + /** + * Layer height. + */ + height: number; + /** + * Transformation matrix for layer, default is identity matrix + */ + transform?: number[] | undefined; + /** + * Transform anchor point X, absent if no transform specified + */ + anchorX?: number | undefined; + /** + * Transform anchor point Y, absent if no transform specified + */ + anchorY?: number | undefined; + /** + * Transform anchor point Z, absent if no transform specified + */ + anchorZ?: number | undefined; + /** + * Indicates how many time this layer has painted. + */ + paintCount: number; + /** + * Indicates whether this layer hosts any content, rather than being used for + * transform/scrolling purposes only. + */ + drawsContent: boolean; + /** + * Set if layer is not visible. + */ + invisible?: boolean | undefined; + /** + * Rectangles scrolling on main thread only. + */ + scrollRects?: ScrollRect[] | undefined; + /** + * Sticky position constraint information + */ + stickyPositionConstraint?: StickyPositionConstraint | undefined; + }; + /** + * Array of timings, one per paint step. + */ + export type PaintProfile = number[]; + /** + * undefined + * @event `LayerTree.layerPainted` + */ + export type LayerPaintedEvent = { + /** + * The id of the painted layer. + */ + layerId: LayerId; + /** + * Clip rectangle. + */ + clip: DOM.Rect; + }; + /** + * undefined + * @event `LayerTree.layerTreeDidChange` + */ + export type LayerTreeDidChangeEvent = { + /** + * Layer tree, absent if not in the comspositing mode. + */ + layers?: Layer[] | undefined; + }; + /** + * Provides the reasons why the given layer was composited. + * @request `LayerTree.compositingReasons` + */ + export type CompositingReasonsRequest = { + /** + * The id of the layer for which we want to get the reasons it was composited. + */ + layerId: LayerId; + }; + /** + * Provides the reasons why the given layer was composited. + * @response `LayerTree.compositingReasons` + */ + export type CompositingReasonsResponse = { + /** + * A list of strings specifying reasons for the given layer to become composited. + */ + compositingReasons: string[]; + /** + * A list of strings specifying reason IDs for the given layer to become composited. + */ + compositingReasonIds: string[]; + }; + /** + * Disables compositing tree inspection. + * @request `LayerTree.disable` + */ + export type DisableRequest = {}; + /** + * Disables compositing tree inspection. + * @response `LayerTree.disable` + */ + export type DisableResponse = {}; + /** + * Enables compositing tree inspection. + * @request `LayerTree.enable` + */ + export type EnableRequest = {}; + /** + * Enables compositing tree inspection. + * @response `LayerTree.enable` + */ + export type EnableResponse = {}; + /** + * Returns the snapshot identifier. + * @request `LayerTree.loadSnapshot` + */ + export type LoadSnapshotRequest = { + /** + * An array of tiles composing the snapshot. + */ + tiles: PictureTile[]; + }; + /** + * Returns the snapshot identifier. + * @response `LayerTree.loadSnapshot` + */ + export type LoadSnapshotResponse = { + /** + * The id of the snapshot. + */ + snapshotId: SnapshotId; + }; + /** + * Returns the layer snapshot identifier. + * @request `LayerTree.makeSnapshot` + */ + export type MakeSnapshotRequest = { + /** + * The id of the layer. + */ + layerId: LayerId; + }; + /** + * Returns the layer snapshot identifier. + * @response `LayerTree.makeSnapshot` + */ + export type MakeSnapshotResponse = { + /** + * The id of the layer snapshot. + */ + snapshotId: SnapshotId; + }; + /** + * undefined + * @request `LayerTree.profileSnapshot` + */ + export type ProfileSnapshotRequest = { + /** + * The id of the layer snapshot. + */ + snapshotId: SnapshotId; + /** + * The maximum number of times to replay the snapshot (1, if not specified). + */ + minRepeatCount?: number | undefined; + /** + * The minimum duration (in seconds) to replay the snapshot. + */ + minDuration?: number | undefined; + /** + * The clip rectangle to apply when replaying the snapshot. + */ + clipRect?: DOM.Rect | undefined; + }; + /** + * undefined + * @response `LayerTree.profileSnapshot` + */ + export type ProfileSnapshotResponse = { + /** + * The array of paint profiles, one per run. + */ + timings: PaintProfile[]; + }; + /** + * Releases layer snapshot captured by the back-end. + * @request `LayerTree.releaseSnapshot` + */ + export type ReleaseSnapshotRequest = { + /** + * The id of the layer snapshot. + */ + snapshotId: SnapshotId; + }; + /** + * Releases layer snapshot captured by the back-end. + * @response `LayerTree.releaseSnapshot` + */ + export type ReleaseSnapshotResponse = {}; + /** + * Replays the layer snapshot and returns the resulting bitmap. + * @request `LayerTree.replaySnapshot` + */ + export type ReplaySnapshotRequest = { + /** + * The id of the layer snapshot. + */ + snapshotId: SnapshotId; + /** + * The first step to replay from (replay from the very start if not specified). + */ + fromStep?: number | undefined; + /** + * The last step to replay to (replay till the end if not specified). + */ + toStep?: number | undefined; + /** + * The scale to apply while replaying (defaults to 1). + */ + scale?: number | undefined; + }; + /** + * Replays the layer snapshot and returns the resulting bitmap. + * @response `LayerTree.replaySnapshot` + */ + export type ReplaySnapshotResponse = { + /** + * A data: URL for resulting image. + */ + dataURL: string; + }; + /** + * Replays the layer snapshot and returns canvas log. + * @request `LayerTree.snapshotCommandLog` + */ + export type SnapshotCommandLogRequest = { + /** + * The id of the layer snapshot. + */ + snapshotId: SnapshotId; + }; + /** + * Replays the layer snapshot and returns canvas log. + * @response `LayerTree.snapshotCommandLog` + */ + export type SnapshotCommandLogResponse = { + /** + * The array of canvas function calls. + */ + commandLog: Record<string, unknown>[]; + }; + } + export namespace Log { + /** + * Log entry. + */ + export type LogEntry = { + /** + * Log entry source. + */ + source: + | "xml" + | "javascript" + | "network" + | "storage" + | "appcache" + | "rendering" + | "security" + | "deprecation" + | "worker" + | "violation" + | "intervention" + | "recommendation" + | "other"; + /** + * Log entry severity. + */ + level: "verbose" | "info" | "warning" | "error"; + /** + * Logged text. + */ + text: string; + category?: "cors" | undefined; + /** + * Timestamp when this entry was added. + */ + timestamp: Runtime.Timestamp; + /** + * URL of the resource if known. + */ + url?: string | undefined; + /** + * Line number in the resource. + */ + lineNumber?: number | undefined; + /** + * JavaScript stack trace. + */ + stackTrace?: Runtime.StackTrace | undefined; + /** + * Identifier of the network request associated with this entry. + */ + networkRequestId?: Network.RequestId | undefined; + /** + * Identifier of the worker associated with this entry. + */ + workerId?: string | undefined; + /** + * Call arguments. + */ + args?: Runtime.RemoteObject[] | undefined; + }; + /** + * Violation configuration setting. + */ + export type ViolationSetting = { + /** + * Violation type. + */ + name: + | "longTask" + | "longLayout" + | "blockedEvent" + | "blockedParser" + | "discouragedAPIUse" + | "handler" + | "recurringHandler"; + /** + * Time threshold to trigger upon. + */ + threshold: number; + }; + /** + * Issued when new message was logged. + * @event `Log.entryAdded` + */ + export type EntryAddedEvent = { + /** + * The entry. + */ + entry: LogEntry; + }; + /** + * Clears the log. + * @request `Log.clear` + */ + export type ClearRequest = {}; + /** + * Clears the log. + * @response `Log.clear` + */ + export type ClearResponse = {}; + /** + * Disables log domain, prevents further log entries from being reported to the client. + * @request `Log.disable` + */ + export type DisableRequest = {}; + /** + * Disables log domain, prevents further log entries from being reported to the client. + * @response `Log.disable` + */ + export type DisableResponse = {}; + /** + * Enables log domain, sends the entries collected so far to the client by means of the + * `entryAdded` notification. + * @request `Log.enable` + */ + export type EnableRequest = {}; + /** + * Enables log domain, sends the entries collected so far to the client by means of the + * `entryAdded` notification. + * @response `Log.enable` + */ + export type EnableResponse = {}; + /** + * start violation reporting. + * @request `Log.startViolationsReport` + */ + export type StartViolationsReportRequest = { + /** + * Configuration for violations. + */ + config: ViolationSetting[]; + }; + /** + * start violation reporting. + * @response `Log.startViolationsReport` + */ + export type StartViolationsReportResponse = {}; + /** + * Stop violation reporting. + * @request `Log.stopViolationsReport` + */ + export type StopViolationsReportRequest = {}; + /** + * Stop violation reporting. + * @response `Log.stopViolationsReport` + */ + export type StopViolationsReportResponse = {}; + } + export namespace Media { + /** + * Players will get an ID that is unique within the agent context. + */ + export type PlayerId = string; + export type Timestamp = number; + /** + * Have one type per entry in MediaLogRecord::Type + * Corresponds to kMessage + */ + export type PlayerMessage = { + /** + * Keep in sync with MediaLogMessageLevel + * We are currently keeping the message level 'error' separate from the + * PlayerError type because right now they represent different things, + * this one being a DVLOG(ERROR) style log message that gets printed + * based on what log level is selected in the UI, and the other is a + * representation of a media::PipelineStatus object. Soon however we're + * going to be moving away from using PipelineStatus for errors and + * introducing a new error type which should hopefully let us integrate + * the error log level into the PlayerError type. + */ + level: "error" | "warning" | "info" | "debug"; + message: string; + }; + /** + * Corresponds to kMediaPropertyChange + */ + export type PlayerProperty = { + name: string; + value: string; + }; + /** + * Corresponds to kMediaEventTriggered + */ + export type PlayerEvent = { + timestamp: Timestamp; + value: string; + }; + /** + * Represents logged source line numbers reported in an error. + * NOTE: file and line are from chromium c++ implementation code, not js. + */ + export type PlayerErrorSourceLocation = { + file: string; + line: number; + }; + /** + * Corresponds to kMediaError + */ + export type PlayerError = { + errorType: string; + /** + * Code is the numeric enum entry for a specific set of error codes, such + * as PipelineStatusCodes in media/base/pipeline_status.h + */ + code: number; + /** + * A trace of where this error was caused / where it passed through. + */ + stack: PlayerErrorSourceLocation[]; + /** + * Errors potentially have a root cause error, ie, a DecoderError might be + * caused by an WindowsError + */ + cause: PlayerError[]; + /** + * Extra data attached to an error, such as an HRESULT, Video Codec, etc. + */ + data: Record<string, unknown>; + }; + /** + * This can be called multiple times, and can be used to set / override / + * remove player properties. A null propValue indicates removal. + * @event `Media.playerPropertiesChanged` + */ + export type PlayerPropertiesChangedEvent = { + playerId: PlayerId; + properties: PlayerProperty[]; + }; + /** + * Send events as a list, allowing them to be batched on the browser for less + * congestion. If batched, events must ALWAYS be in chronological order. + * @event `Media.playerEventsAdded` + */ + export type PlayerEventsAddedEvent = { + playerId: PlayerId; + events: PlayerEvent[]; + }; + /** + * Send a list of any messages that need to be delivered. + * @event `Media.playerMessagesLogged` + */ + export type PlayerMessagesLoggedEvent = { + playerId: PlayerId; + messages: PlayerMessage[]; + }; + /** + * Send a list of any errors that need to be delivered. + * @event `Media.playerErrorsRaised` + */ + export type PlayerErrorsRaisedEvent = { + playerId: PlayerId; + errors: PlayerError[]; + }; + /** + * Called whenever a player is created, or when a new agent joins and receives + * a list of active players. If an agent is restored, it will receive the full + * list of player ids and all events again. + * @event `Media.playersCreated` + */ + export type PlayersCreatedEvent = { + players: PlayerId[]; + }; + /** + * Enables the Media domain + * @request `Media.enable` + */ + export type EnableRequest = {}; + /** + * Enables the Media domain + * @response `Media.enable` + */ + export type EnableResponse = {}; + /** + * Disables the Media domain. + * @request `Media.disable` + */ + export type DisableRequest = {}; + /** + * Disables the Media domain. + * @response `Media.disable` + */ + export type DisableResponse = {}; + } + export namespace Overlay { + /** + * Configuration data for drawing the source order of an elements children. + */ + export type SourceOrderConfig = { + /** + * the color to outline the givent element in. + */ + parentOutlineColor: DOM.RGBA; + /** + * the color to outline the child elements in. + */ + childOutlineColor: DOM.RGBA; + }; + /** + * Configuration data for the highlighting of Grid elements. + */ + export type GridHighlightConfig = { + /** + * Whether the extension lines from grid cells to the rulers should be shown (default: false). + */ + showGridExtensionLines?: boolean | undefined; + /** + * Show Positive line number labels (default: false). + */ + showPositiveLineNumbers?: boolean | undefined; + /** + * Show Negative line number labels (default: false). + */ + showNegativeLineNumbers?: boolean | undefined; + /** + * Show area name labels (default: false). + */ + showAreaNames?: boolean | undefined; + /** + * Show line name labels (default: false). + */ + showLineNames?: boolean | undefined; + /** + * Show track size labels (default: false). + */ + showTrackSizes?: boolean | undefined; + /** + * The grid container border highlight color (default: transparent). + */ + gridBorderColor?: DOM.RGBA | undefined; + /** + * The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead. + */ + cellBorderColor?: DOM.RGBA | undefined; + /** + * The row line color (default: transparent). + */ + rowLineColor?: DOM.RGBA | undefined; + /** + * The column line color (default: transparent). + */ + columnLineColor?: DOM.RGBA | undefined; + /** + * Whether the grid border is dashed (default: false). + */ + gridBorderDash?: boolean | undefined; + /** + * Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead. + */ + cellBorderDash?: boolean | undefined; + /** + * Whether row lines are dashed (default: false). + */ + rowLineDash?: boolean | undefined; + /** + * Whether column lines are dashed (default: false). + */ + columnLineDash?: boolean | undefined; + /** + * The row gap highlight fill color (default: transparent). + */ + rowGapColor?: DOM.RGBA | undefined; + /** + * The row gap hatching fill color (default: transparent). + */ + rowHatchColor?: DOM.RGBA | undefined; + /** + * The column gap highlight fill color (default: transparent). + */ + columnGapColor?: DOM.RGBA | undefined; + /** + * The column gap hatching fill color (default: transparent). + */ + columnHatchColor?: DOM.RGBA | undefined; + /** + * The named grid areas border color (Default: transparent). + */ + areaBorderColor?: DOM.RGBA | undefined; + /** + * The grid container background color (Default: transparent). + */ + gridBackgroundColor?: DOM.RGBA | undefined; + }; + /** + * Configuration data for the highlighting of Flex container elements. + */ + export type FlexContainerHighlightConfig = { + /** + * The style of the container border + */ + containerBorder?: LineStyle | undefined; + /** + * The style of the separator between lines + */ + lineSeparator?: LineStyle | undefined; + /** + * The style of the separator between items + */ + itemSeparator?: LineStyle | undefined; + /** + * Style of content-distribution space on the main axis (justify-content). + */ + mainDistributedSpace?: BoxStyle | undefined; + /** + * Style of content-distribution space on the cross axis (align-content). + */ + crossDistributedSpace?: BoxStyle | undefined; + /** + * Style of empty space caused by row gaps (gap/row-gap). + */ + rowGapSpace?: BoxStyle | undefined; + /** + * Style of empty space caused by columns gaps (gap/column-gap). + */ + columnGapSpace?: BoxStyle | undefined; + /** + * Style of the self-alignment line (align-items). + */ + crossAlignment?: LineStyle | undefined; + }; + /** + * Configuration data for the highlighting of Flex item elements. + */ + export type FlexItemHighlightConfig = { + /** + * Style of the box representing the item's base size + */ + baseSizeBox?: BoxStyle | undefined; + /** + * Style of the border around the box representing the item's base size + */ + baseSizeBorder?: LineStyle | undefined; + /** + * Style of the arrow representing if the item grew or shrank + */ + flexibilityArrow?: LineStyle | undefined; + }; + /** + * Style information for drawing a line. + */ + export type LineStyle = { + /** + * The color of the line (default: transparent) + */ + color?: DOM.RGBA | undefined; + /** + * The line pattern (default: solid) + */ + pattern?: "dashed" | "dotted" | undefined; + }; + /** + * Style information for drawing a box. + */ + export type BoxStyle = { + /** + * The background color for the box (default: transparent) + */ + fillColor?: DOM.RGBA | undefined; + /** + * The hatching color for the box (default: transparent) + */ + hatchColor?: DOM.RGBA | undefined; + }; + export type ContrastAlgorithm = "aa" | "aaa" | "apca"; + /** + * Configuration data for the highlighting of page elements. + */ + export type HighlightConfig = { + /** + * Whether the node info tooltip should be shown (default: false). + */ + showInfo?: boolean | undefined; + /** + * Whether the node styles in the tooltip (default: false). + */ + showStyles?: boolean | undefined; + /** + * Whether the rulers should be shown (default: false). + */ + showRulers?: boolean | undefined; + /** + * Whether the a11y info should be shown (default: true). + */ + showAccessibilityInfo?: boolean | undefined; + /** + * Whether the extension lines from node to the rulers should be shown (default: false). + */ + showExtensionLines?: boolean | undefined; + /** + * The content box highlight fill color (default: transparent). + */ + contentColor?: DOM.RGBA | undefined; + /** + * The padding highlight fill color (default: transparent). + */ + paddingColor?: DOM.RGBA | undefined; + /** + * The border highlight fill color (default: transparent). + */ + borderColor?: DOM.RGBA | undefined; + /** + * The margin highlight fill color (default: transparent). + */ + marginColor?: DOM.RGBA | undefined; + /** + * The event target element highlight fill color (default: transparent). + */ + eventTargetColor?: DOM.RGBA | undefined; + /** + * The shape outside fill color (default: transparent). + */ + shapeColor?: DOM.RGBA | undefined; + /** + * The shape margin fill color (default: transparent). + */ + shapeMarginColor?: DOM.RGBA | undefined; + /** + * The grid layout color (default: transparent). + */ + cssGridColor?: DOM.RGBA | undefined; + /** + * The color format used to format color styles (default: hex). + */ + colorFormat?: ColorFormat | undefined; + /** + * The grid layout highlight configuration (default: all transparent). + */ + gridHighlightConfig?: GridHighlightConfig | undefined; + /** + * The flex container highlight configuration (default: all transparent). + */ + flexContainerHighlightConfig?: FlexContainerHighlightConfig | undefined; + /** + * The flex item highlight configuration (default: all transparent). + */ + flexItemHighlightConfig?: FlexItemHighlightConfig | undefined; + /** + * The contrast algorithm to use for the contrast ratio (default: aa). + */ + contrastAlgorithm?: ContrastAlgorithm | undefined; + /** + * The container query container highlight configuration (default: all transparent). + */ + containerQueryContainerHighlightConfig?: ContainerQueryContainerHighlightConfig | undefined; + }; + export type ColorFormat = "rgb" | "hsl" | "hwb" | "hex"; + /** + * Configurations for Persistent Grid Highlight + */ + export type GridNodeHighlightConfig = { + /** + * A descriptor for the highlight appearance. + */ + gridHighlightConfig: GridHighlightConfig; + /** + * Identifier of the node to highlight. + */ + nodeId: DOM.NodeId; + }; + export type FlexNodeHighlightConfig = { + /** + * A descriptor for the highlight appearance of flex containers. + */ + flexContainerHighlightConfig: FlexContainerHighlightConfig; + /** + * Identifier of the node to highlight. + */ + nodeId: DOM.NodeId; + }; + export type ScrollSnapContainerHighlightConfig = { + /** + * The style of the snapport border (default: transparent) + */ + snapportBorder?: LineStyle | undefined; + /** + * The style of the snap area border (default: transparent) + */ + snapAreaBorder?: LineStyle | undefined; + /** + * The margin highlight fill color (default: transparent). + */ + scrollMarginColor?: DOM.RGBA | undefined; + /** + * The padding highlight fill color (default: transparent). + */ + scrollPaddingColor?: DOM.RGBA | undefined; + }; + export type ScrollSnapHighlightConfig = { + /** + * A descriptor for the highlight appearance of scroll snap containers. + */ + scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig; + /** + * Identifier of the node to highlight. + */ + nodeId: DOM.NodeId; + }; + /** + * Configuration for dual screen hinge + */ + export type HingeConfig = { + /** + * A rectangle represent hinge + */ + rect: DOM.Rect; + /** + * The content box highlight fill color (default: a dark color). + */ + contentColor?: DOM.RGBA | undefined; + /** + * The content box highlight outline color (default: transparent). + */ + outlineColor?: DOM.RGBA | undefined; + }; + export type ContainerQueryHighlightConfig = { + /** + * A descriptor for the highlight appearance of container query containers. + */ + containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig; + /** + * Identifier of the container node to highlight. + */ + nodeId: DOM.NodeId; + }; + export type ContainerQueryContainerHighlightConfig = { + /** + * The style of the container border. + */ + containerBorder?: LineStyle | undefined; + /** + * The style of the descendants' borders. + */ + descendantBorder?: LineStyle | undefined; + }; + export type IsolatedElementHighlightConfig = { + /** + * A descriptor for the highlight appearance of an element in isolation mode. + */ + isolationModeHighlightConfig: IsolationModeHighlightConfig; + /** + * Identifier of the isolated element to highlight. + */ + nodeId: DOM.NodeId; + }; + export type IsolationModeHighlightConfig = { + /** + * The fill color of the resizers (default: transparent). + */ + resizerColor?: DOM.RGBA | undefined; + /** + * The fill color for resizer handles (default: transparent). + */ + resizerHandleColor?: DOM.RGBA | undefined; + /** + * The fill color for the mask covering non-isolated elements (default: transparent). + */ + maskColor?: DOM.RGBA | undefined; + }; + export type InspectMode = + | "searchForNode" + | "searchForUAShadowDOM" + | "captureAreaScreenshot" + | "showDistances" + | "none"; + /** + * Fired when the node should be inspected. This happens after call to `setInspectMode` or when + * user manually inspects an element. + * @event `Overlay.inspectNodeRequested` + */ + export type InspectNodeRequestedEvent = { + /** + * Id of the node to inspect. + */ + backendNodeId: DOM.BackendNodeId; + }; + /** + * Fired when the node should be highlighted. This happens after call to `setInspectMode`. + * @event `Overlay.nodeHighlightRequested` + */ + export type NodeHighlightRequestedEvent = { + nodeId: DOM.NodeId; + }; + /** + * Fired when user asks to capture screenshot of some area on the page. + * @event `Overlay.screenshotRequested` + */ + export type ScreenshotRequestedEvent = { + /** + * Viewport to capture, in device independent pixels (dip). + */ + viewport: Page.Viewport; + }; + /** + * Fired when user cancels the inspect mode. + * @event `Overlay.inspectModeCanceled` + */ + export type InspectModeCanceledEvent = {}; + /** + * Disables domain notifications. + * @request `Overlay.disable` + */ + export type DisableRequest = {}; + /** + * Disables domain notifications. + * @response `Overlay.disable` + */ + export type DisableResponse = {}; + /** + * Enables domain notifications. + * @request `Overlay.enable` + */ + export type EnableRequest = {}; + /** + * Enables domain notifications. + * @response `Overlay.enable` + */ + export type EnableResponse = {}; + /** + * For testing. + * @request `Overlay.getHighlightObjectForTest` + */ + export type GetHighlightObjectForTestRequest = { + /** + * Id of the node to get highlight object for. + */ + nodeId: DOM.NodeId; + /** + * Whether to include distance info. + */ + includeDistance?: boolean | undefined; + /** + * Whether to include style info. + */ + includeStyle?: boolean | undefined; + /** + * The color format to get config with (default: hex). + */ + colorFormat?: ColorFormat | undefined; + /** + * Whether to show accessibility info (default: true). + */ + showAccessibilityInfo?: boolean | undefined; + }; + /** + * For testing. + * @response `Overlay.getHighlightObjectForTest` + */ + export type GetHighlightObjectForTestResponse = { + /** + * Highlight data for the node. + */ + highlight: Record<string, unknown>; + }; + /** + * For Persistent Grid testing. + * @request `Overlay.getGridHighlightObjectsForTest` + */ + export type GetGridHighlightObjectsForTestRequest = { + /** + * Ids of the node to get highlight object for. + */ + nodeIds: DOM.NodeId[]; + }; + /** + * For Persistent Grid testing. + * @response `Overlay.getGridHighlightObjectsForTest` + */ + export type GetGridHighlightObjectsForTestResponse = { + /** + * Grid Highlight data for the node ids provided. + */ + highlights: Record<string, unknown>; + }; + /** + * For Source Order Viewer testing. + * @request `Overlay.getSourceOrderHighlightObjectForTest` + */ + export type GetSourceOrderHighlightObjectForTestRequest = { + /** + * Id of the node to highlight. + */ + nodeId: DOM.NodeId; + }; + /** + * For Source Order Viewer testing. + * @response `Overlay.getSourceOrderHighlightObjectForTest` + */ + export type GetSourceOrderHighlightObjectForTestResponse = { + /** + * Source order highlight data for the node id provided. + */ + highlight: Record<string, unknown>; + }; + /** + * Hides any highlight. + * @request `Overlay.hideHighlight` + */ + export type HideHighlightRequest = {}; + /** + * Hides any highlight. + * @response `Overlay.hideHighlight` + */ + export type HideHighlightResponse = {}; + /** + * Highlights owner element of the frame with given id. + * Deprecated: Doesn't work reliablity and cannot be fixed due to process + * separatation (the owner node might be in a different process). Determine + * the owner node in the client and use highlightNode. + * @request `Overlay.highlightFrame` + */ + export type HighlightFrameRequest = { + /** + * Identifier of the frame to highlight. + */ + frameId: Page.FrameId; + /** + * The content box highlight fill color (default: transparent). + */ + contentColor?: DOM.RGBA | undefined; + /** + * The content box highlight outline color (default: transparent). + */ + contentOutlineColor?: DOM.RGBA | undefined; + }; + /** + * Highlights owner element of the frame with given id. + * Deprecated: Doesn't work reliablity and cannot be fixed due to process + * separatation (the owner node might be in a different process). Determine + * the owner node in the client and use highlightNode. + * @response `Overlay.highlightFrame` + */ + export type HighlightFrameResponse = {}; + /** + * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or + * objectId must be specified. + * @request `Overlay.highlightNode` + */ + export type HighlightNodeRequest = { + /** + * A descriptor for the highlight appearance. + */ + highlightConfig: HighlightConfig; + /** + * Identifier of the node to highlight. + */ + nodeId?: DOM.NodeId | undefined; + /** + * Identifier of the backend node to highlight. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * JavaScript object id of the node to be highlighted. + */ + objectId?: Runtime.RemoteObjectId | undefined; + /** + * Selectors to highlight relevant nodes. + */ + selector?: string | undefined; + }; + /** + * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or + * objectId must be specified. + * @response `Overlay.highlightNode` + */ + export type HighlightNodeResponse = {}; + /** + * Highlights given quad. Coordinates are absolute with respect to the main frame viewport. + * @request `Overlay.highlightQuad` + */ + export type HighlightQuadRequest = { + /** + * Quad to highlight + */ + quad: DOM.Quad; + /** + * The highlight fill color (default: transparent). + */ + color?: DOM.RGBA | undefined; + /** + * The highlight outline color (default: transparent). + */ + outlineColor?: DOM.RGBA | undefined; + }; + /** + * Highlights given quad. Coordinates are absolute with respect to the main frame viewport. + * @response `Overlay.highlightQuad` + */ + export type HighlightQuadResponse = {}; + /** + * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + * @request `Overlay.highlightRect` + */ + export type HighlightRectRequest = { + /** + * X coordinate + */ + x: number; + /** + * Y coordinate + */ + y: number; + /** + * Rectangle width + */ + width: number; + /** + * Rectangle height + */ + height: number; + /** + * The highlight fill color (default: transparent). + */ + color?: DOM.RGBA | undefined; + /** + * The highlight outline color (default: transparent). + */ + outlineColor?: DOM.RGBA | undefined; + }; + /** + * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. + * @response `Overlay.highlightRect` + */ + export type HighlightRectResponse = {}; + /** + * Highlights the source order of the children of the DOM node with given id or with the given + * JavaScript object wrapper. Either nodeId or objectId must be specified. + * @request `Overlay.highlightSourceOrder` + */ + export type HighlightSourceOrderRequest = { + /** + * A descriptor for the appearance of the overlay drawing. + */ + sourceOrderConfig: SourceOrderConfig; + /** + * Identifier of the node to highlight. + */ + nodeId?: DOM.NodeId | undefined; + /** + * Identifier of the backend node to highlight. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + /** + * JavaScript object id of the node to be highlighted. + */ + objectId?: Runtime.RemoteObjectId | undefined; + }; + /** + * Highlights the source order of the children of the DOM node with given id or with the given + * JavaScript object wrapper. Either nodeId or objectId must be specified. + * @response `Overlay.highlightSourceOrder` + */ + export type HighlightSourceOrderResponse = {}; + /** + * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. + * Backend then generates 'inspectNodeRequested' event upon element selection. + * @request `Overlay.setInspectMode` + */ + export type SetInspectModeRequest = { + /** + * Set an inspection mode. + */ + mode: InspectMode; + /** + * A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled + * == false`. + */ + highlightConfig?: HighlightConfig | undefined; + }; + /** + * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. + * Backend then generates 'inspectNodeRequested' event upon element selection. + * @response `Overlay.setInspectMode` + */ + export type SetInspectModeResponse = {}; + /** + * Highlights owner element of all frames detected to be ads. + * @request `Overlay.setShowAdHighlights` + */ + export type SetShowAdHighlightsRequest = { + /** + * True for showing ad highlights + */ + show: boolean; + }; + /** + * Highlights owner element of all frames detected to be ads. + * @response `Overlay.setShowAdHighlights` + */ + export type SetShowAdHighlightsResponse = {}; + /** + * undefined + * @request `Overlay.setPausedInDebuggerMessage` + */ + export type SetPausedInDebuggerMessageRequest = { + /** + * The message to display, also triggers resume and step over controls. + */ + message?: string | undefined; + }; + /** + * undefined + * @response `Overlay.setPausedInDebuggerMessage` + */ + export type SetPausedInDebuggerMessageResponse = {}; + /** + * Requests that backend shows debug borders on layers + * @request `Overlay.setShowDebugBorders` + */ + export type SetShowDebugBordersRequest = { + /** + * True for showing debug borders + */ + show: boolean; + }; + /** + * Requests that backend shows debug borders on layers + * @response `Overlay.setShowDebugBorders` + */ + export type SetShowDebugBordersResponse = {}; + /** + * Requests that backend shows the FPS counter + * @request `Overlay.setShowFPSCounter` + */ + export type SetShowFPSCounterRequest = { + /** + * True for showing the FPS counter + */ + show: boolean; + }; + /** + * Requests that backend shows the FPS counter + * @response `Overlay.setShowFPSCounter` + */ + export type SetShowFPSCounterResponse = {}; + /** + * Highlight multiple elements with the CSS Grid overlay. + * @request `Overlay.setShowGridOverlays` + */ + export type SetShowGridOverlaysRequest = { + /** + * An array of node identifiers and descriptors for the highlight appearance. + */ + gridNodeHighlightConfigs: GridNodeHighlightConfig[]; + }; + /** + * Highlight multiple elements with the CSS Grid overlay. + * @response `Overlay.setShowGridOverlays` + */ + export type SetShowGridOverlaysResponse = {}; + /** + * undefined + * @request `Overlay.setShowFlexOverlays` + */ + export type SetShowFlexOverlaysRequest = { + /** + * An array of node identifiers and descriptors for the highlight appearance. + */ + flexNodeHighlightConfigs: FlexNodeHighlightConfig[]; + }; + /** + * undefined + * @response `Overlay.setShowFlexOverlays` + */ + export type SetShowFlexOverlaysResponse = {}; + /** + * undefined + * @request `Overlay.setShowScrollSnapOverlays` + */ + export type SetShowScrollSnapOverlaysRequest = { + /** + * An array of node identifiers and descriptors for the highlight appearance. + */ + scrollSnapHighlightConfigs: ScrollSnapHighlightConfig[]; + }; + /** + * undefined + * @response `Overlay.setShowScrollSnapOverlays` + */ + export type SetShowScrollSnapOverlaysResponse = {}; + /** + * undefined + * @request `Overlay.setShowContainerQueryOverlays` + */ + export type SetShowContainerQueryOverlaysRequest = { + /** + * An array of node identifiers and descriptors for the highlight appearance. + */ + containerQueryHighlightConfigs: ContainerQueryHighlightConfig[]; + }; + /** + * undefined + * @response `Overlay.setShowContainerQueryOverlays` + */ + export type SetShowContainerQueryOverlaysResponse = {}; + /** + * Requests that backend shows paint rectangles + * @request `Overlay.setShowPaintRects` + */ + export type SetShowPaintRectsRequest = { + /** + * True for showing paint rectangles + */ + result: boolean; + }; + /** + * Requests that backend shows paint rectangles + * @response `Overlay.setShowPaintRects` + */ + export type SetShowPaintRectsResponse = {}; + /** + * Requests that backend shows layout shift regions + * @request `Overlay.setShowLayoutShiftRegions` + */ + export type SetShowLayoutShiftRegionsRequest = { + /** + * True for showing layout shift regions + */ + result: boolean; + }; + /** + * Requests that backend shows layout shift regions + * @response `Overlay.setShowLayoutShiftRegions` + */ + export type SetShowLayoutShiftRegionsResponse = {}; + /** + * Requests that backend shows scroll bottleneck rects + * @request `Overlay.setShowScrollBottleneckRects` + */ + export type SetShowScrollBottleneckRectsRequest = { + /** + * True for showing scroll bottleneck rects + */ + show: boolean; + }; + /** + * Requests that backend shows scroll bottleneck rects + * @response `Overlay.setShowScrollBottleneckRects` + */ + export type SetShowScrollBottleneckRectsResponse = {}; + /** + * Deprecated, no longer has any effect. + * @request `Overlay.setShowHitTestBorders` + */ + export type SetShowHitTestBordersRequest = { + /** + * True for showing hit-test borders + */ + show: boolean; + }; + /** + * Deprecated, no longer has any effect. + * @response `Overlay.setShowHitTestBorders` + */ + export type SetShowHitTestBordersResponse = {}; + /** + * Request that backend shows an overlay with web vital metrics. + * @request `Overlay.setShowWebVitals` + */ + export type SetShowWebVitalsRequest = { + show: boolean; + }; + /** + * Request that backend shows an overlay with web vital metrics. + * @response `Overlay.setShowWebVitals` + */ + export type SetShowWebVitalsResponse = {}; + /** + * Paints viewport size upon main frame resize. + * @request `Overlay.setShowViewportSizeOnResize` + */ + export type SetShowViewportSizeOnResizeRequest = { + /** + * Whether to paint size or not. + */ + show: boolean; + }; + /** + * Paints viewport size upon main frame resize. + * @response `Overlay.setShowViewportSizeOnResize` + */ + export type SetShowViewportSizeOnResizeResponse = {}; + /** + * Add a dual screen device hinge + * @request `Overlay.setShowHinge` + */ + export type SetShowHingeRequest = { + /** + * hinge data, null means hideHinge + */ + hingeConfig?: HingeConfig | undefined; + }; + /** + * Add a dual screen device hinge + * @response `Overlay.setShowHinge` + */ + export type SetShowHingeResponse = {}; + /** + * Show elements in isolation mode with overlays. + * @request `Overlay.setShowIsolatedElements` + */ + export type SetShowIsolatedElementsRequest = { + /** + * An array of node identifiers and descriptors for the highlight appearance. + */ + isolatedElementHighlightConfigs: IsolatedElementHighlightConfig[]; + }; + /** + * Show elements in isolation mode with overlays. + * @response `Overlay.setShowIsolatedElements` + */ + export type SetShowIsolatedElementsResponse = {}; + } + export namespace Page { + /** + * Unique frame identifier. + */ + export type FrameId = string; + /** + * Indicates whether a frame has been identified as an ad. + */ + export type AdFrameType = "none" | "child" | "root"; + export type AdFrameExplanation = "ParentIsAd" | "CreatedByAdScript" | "MatchedBlockingRule"; + /** + * Indicates whether a frame has been identified as an ad and why. + */ + export type AdFrameStatus = { + adFrameType: AdFrameType; + explanations?: AdFrameExplanation[] | undefined; + }; + /** + * Identifies the bottom-most script which caused the frame to be labelled + * as an ad. + */ + export type AdScriptId = { + /** + * Script Id of the bottom-most script which caused the frame to be labelled + * as an ad. + */ + scriptId: Runtime.ScriptId; + /** + * Id of adScriptId's debugger. + */ + debuggerId: Runtime.UniqueDebuggerId; + }; + /** + * Indicates whether the frame is a secure context and why it is the case. + */ + export type SecureContextType = "Secure" | "SecureLocalhost" | "InsecureScheme" | "InsecureAncestor"; + /** + * Indicates whether the frame is cross-origin isolated and why it is the case. + */ + export type CrossOriginIsolatedContextType = "Isolated" | "NotIsolated" | "NotIsolatedFeatureDisabled"; + export type GatedAPIFeatures = + | "SharedArrayBuffers" + | "SharedArrayBuffersTransferAllowed" + | "PerformanceMeasureMemory" + | "PerformanceProfile"; + /** + * All Permissions Policy features. This enum should match the one defined + * in third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5. + */ + export type PermissionsPolicyFeature = + | "accelerometer" + | "ambient-light-sensor" + | "attribution-reporting" + | "autoplay" + | "bluetooth" + | "browsing-topics" + | "camera" + | "ch-dpr" + | "ch-device-memory" + | "ch-downlink" + | "ch-ect" + | "ch-prefers-color-scheme" + | "ch-prefers-reduced-motion" + | "ch-rtt" + | "ch-save-data" + | "ch-ua" + | "ch-ua-arch" + | "ch-ua-bitness" + | "ch-ua-platform" + | "ch-ua-model" + | "ch-ua-mobile" + | "ch-ua-form-factor" + | "ch-ua-full-version" + | "ch-ua-full-version-list" + | "ch-ua-platform-version" + | "ch-ua-wow64" + | "ch-viewport-height" + | "ch-viewport-width" + | "ch-width" + | "clipboard-read" + | "clipboard-write" + | "compute-pressure" + | "cross-origin-isolated" + | "direct-sockets" + | "display-capture" + | "document-domain" + | "encrypted-media" + | "execution-while-out-of-viewport" + | "execution-while-not-rendered" + | "focus-without-user-activation" + | "fullscreen" + | "frobulate" + | "gamepad" + | "geolocation" + | "gyroscope" + | "hid" + | "identity-credentials-get" + | "idle-detection" + | "interest-cohort" + | "join-ad-interest-group" + | "keyboard-map" + | "local-fonts" + | "magnetometer" + | "microphone" + | "midi" + | "otp-credentials" + | "payment" + | "picture-in-picture" + | "private-aggregation" + | "private-state-token-issuance" + | "private-state-token-redemption" + | "publickey-credentials-get" + | "run-ad-auction" + | "screen-wake-lock" + | "serial" + | "shared-autofill" + | "shared-storage" + | "shared-storage-select-url" + | "smart-card" + | "storage-access" + | "sync-xhr" + | "unload" + | "usb" + | "vertical-scroll" + | "web-share" + | "window-management" + | "window-placement" + | "xr-spatial-tracking"; + /** + * Reason for a permissions policy feature to be disabled. + */ + export type PermissionsPolicyBlockReason = "Header" | "IframeAttribute" | "InFencedFrameTree" | "InIsolatedApp"; + export type PermissionsPolicyBlockLocator = { + frameId: FrameId; + blockReason: PermissionsPolicyBlockReason; + }; + export type PermissionsPolicyFeatureState = { + feature: PermissionsPolicyFeature; + allowed: boolean; + locator?: PermissionsPolicyBlockLocator | undefined; + }; + /** + * Origin Trial(https://www.chromium.org/blink/origin-trials) support. + * Status for an Origin Trial token. + */ + export type OriginTrialTokenStatus = + | "Success" + | "NotSupported" + | "Insecure" + | "Expired" + | "WrongOrigin" + | "InvalidSignature" + | "Malformed" + | "WrongVersion" + | "FeatureDisabled" + | "TokenDisabled" + | "FeatureDisabledForUser" + | "UnknownTrial"; + /** + * Status for an Origin Trial. + */ + export type OriginTrialStatus = "Enabled" | "ValidTokenNotProvided" | "OSNotSupported" | "TrialNotAllowed"; + export type OriginTrialUsageRestriction = "None" | "Subset"; + export type OriginTrialToken = { + origin: string; + matchSubDomains: boolean; + trialName: string; + expiryTime: Network.TimeSinceEpoch; + isThirdParty: boolean; + usageRestriction: OriginTrialUsageRestriction; + }; + export type OriginTrialTokenWithStatus = { + rawTokenText: string; + /** + * `parsedToken` is present only when the token is extractable and + * parsable. + */ + parsedToken?: OriginTrialToken | undefined; + status: OriginTrialTokenStatus; + }; + export type OriginTrial = { + trialName: string; + status: OriginTrialStatus; + tokensWithStatus: OriginTrialTokenWithStatus[]; + }; + /** + * Information about the Frame on the page. + */ + export type Frame = { + /** + * Frame unique identifier. + */ + id: FrameId; + /** + * Parent frame identifier. + */ + parentId?: FrameId | undefined; + /** + * Identifier of the loader associated with this frame. + */ + loaderId: Network.LoaderId; + /** + * Frame's name as specified in the tag. + */ + name?: string | undefined; + /** + * Frame document's URL without fragment. + */ + url: string; + /** + * Frame document's URL fragment including the '#'. + */ + urlFragment?: string | undefined; + /** + * Frame document's registered domain, taking the public suffixes list into account. + * Extracted from the Frame's url. + * Example URLs: http://www.google.com/file.html -> "google.com" + * http://a.b.co.uk/file.html -> "b.co.uk" + */ + domainAndRegistry: string; + /** + * Frame document's security origin. + */ + securityOrigin: string; + /** + * Frame document's mimeType as determined by the browser. + */ + mimeType: string; + /** + * If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment. + */ + unreachableUrl?: string | undefined; + /** + * Indicates whether this frame was tagged as an ad and why. + */ + adFrameStatus?: AdFrameStatus | undefined; + /** + * Indicates whether the main document is a secure context and explains why that is the case. + */ + secureContextType: SecureContextType; + /** + * Indicates whether this is a cross origin isolated context. + */ + crossOriginIsolatedContextType: CrossOriginIsolatedContextType; + /** + * Indicated which gated APIs / features are available. + */ + gatedAPIFeatures: GatedAPIFeatures[]; + }; + /** + * Information about the Resource on the page. + */ + export type FrameResource = { + /** + * Resource URL. + */ + url: string; + /** + * Type of this resource. + */ + type: Network.ResourceType; + /** + * Resource mimeType as determined by the browser. + */ + mimeType: string; + /** + * last-modified timestamp as reported by server. + */ + lastModified?: Network.TimeSinceEpoch | undefined; + /** + * Resource content size. + */ + contentSize?: number | undefined; + /** + * True if the resource failed to load. + */ + failed?: boolean | undefined; + /** + * True if the resource was canceled during loading. + */ + canceled?: boolean | undefined; + }; + /** + * Information about the Frame hierarchy along with their cached resources. + */ + export type FrameResourceTree = { + /** + * Frame information for this tree item. + */ + frame: Frame; + /** + * Child frames. + */ + childFrames?: FrameResourceTree[] | undefined; + /** + * Information about frame resources. + */ + resources: FrameResource[]; + }; + /** + * Information about the Frame hierarchy. + */ + export type FrameTree = { + /** + * Frame information for this tree item. + */ + frame: Frame; + /** + * Child frames. + */ + childFrames?: FrameTree[] | undefined; + }; + /** + * Unique script identifier. + */ + export type ScriptIdentifier = string; + /** + * Transition type. + */ + export type TransitionType = + | "link" + | "typed" + | "address_bar" + | "auto_bookmark" + | "auto_subframe" + | "manual_subframe" + | "generated" + | "auto_toplevel" + | "form_submit" + | "reload" + | "keyword" + | "keyword_generated" + | "other"; + /** + * Navigation history entry. + */ + export type NavigationEntry = { + /** + * Unique id of the navigation history entry. + */ + id: number; + /** + * URL of the navigation history entry. + */ + url: string; + /** + * URL that the user typed in the url bar. + */ + userTypedURL: string; + /** + * Title of the navigation history entry. + */ + title: string; + /** + * Transition type. + */ + transitionType: TransitionType; + }; + /** + * Screencast frame metadata. + */ + export type ScreencastFrameMetadata = { + /** + * Top offset in DIP. + */ + offsetTop: number; + /** + * Page scale factor. + */ + pageScaleFactor: number; + /** + * Device screen width in DIP. + */ + deviceWidth: number; + /** + * Device screen height in DIP. + */ + deviceHeight: number; + /** + * Position of horizontal scroll in CSS pixels. + */ + scrollOffsetX: number; + /** + * Position of vertical scroll in CSS pixels. + */ + scrollOffsetY: number; + /** + * Frame swap timestamp. + */ + timestamp?: Network.TimeSinceEpoch | undefined; + }; + /** + * Javascript dialog type. + */ + export type DialogType = "alert" | "confirm" | "prompt" | "beforeunload"; + /** + * Error while paring app manifest. + */ + export type AppManifestError = { + /** + * Error message. + */ + message: string; + /** + * If criticial, this is a non-recoverable parse error. + */ + critical: number; + /** + * Error line. + */ + line: number; + /** + * Error column. + */ + column: number; + }; + /** + * Parsed app manifest properties. + */ + export type AppManifestParsedProperties = { + /** + * Computed scope value + */ + scope: string; + }; + /** + * Layout viewport position and dimensions. + */ + export type LayoutViewport = { + /** + * Horizontal offset relative to the document (CSS pixels). + */ + pageX: number; + /** + * Vertical offset relative to the document (CSS pixels). + */ + pageY: number; + /** + * Width (CSS pixels), excludes scrollbar if present. + */ + clientWidth: number; + /** + * Height (CSS pixels), excludes scrollbar if present. + */ + clientHeight: number; + }; + /** + * Visual viewport position, dimensions, and scale. + */ + export type VisualViewport = { + /** + * Horizontal offset relative to the layout viewport (CSS pixels). + */ + offsetX: number; + /** + * Vertical offset relative to the layout viewport (CSS pixels). + */ + offsetY: number; + /** + * Horizontal offset relative to the document (CSS pixels). + */ + pageX: number; + /** + * Vertical offset relative to the document (CSS pixels). + */ + pageY: number; + /** + * Width (CSS pixels), excludes scrollbar if present. + */ + clientWidth: number; + /** + * Height (CSS pixels), excludes scrollbar if present. + */ + clientHeight: number; + /** + * Scale relative to the ideal viewport (size at width=device-width). + */ + scale: number; + /** + * Page zoom factor (CSS to device independent pixels ratio). + */ + zoom?: number | undefined; + }; + /** + * Viewport for capturing screenshot. + */ + export type Viewport = { + /** + * X offset in device independent pixels (dip). + */ + x: number; + /** + * Y offset in device independent pixels (dip). + */ + y: number; + /** + * Rectangle width in device independent pixels (dip). + */ + width: number; + /** + * Rectangle height in device independent pixels (dip). + */ + height: number; + /** + * Page scale factor. + */ + scale: number; + }; + /** + * Generic font families collection. + */ + export type FontFamilies = { + /** + * The standard font-family. + */ + standard?: string | undefined; + /** + * The fixed font-family. + */ + fixed?: string | undefined; + /** + * The serif font-family. + */ + serif?: string | undefined; + /** + * The sansSerif font-family. + */ + sansSerif?: string | undefined; + /** + * The cursive font-family. + */ + cursive?: string | undefined; + /** + * The fantasy font-family. + */ + fantasy?: string | undefined; + /** + * The math font-family. + */ + math?: string | undefined; + }; + /** + * Font families collection for a script. + */ + export type ScriptFontFamilies = { + /** + * Name of the script which these font families are defined for. + */ + script: string; + /** + * Generic font families collection for the script. + */ + fontFamilies: FontFamilies; + }; + /** + * Default font sizes. + */ + export type FontSizes = { + /** + * Default standard font size. + */ + standard?: number | undefined; + /** + * Default fixed font size. + */ + fixed?: number | undefined; + }; + export type ClientNavigationReason = + | "formSubmissionGet" + | "formSubmissionPost" + | "httpHeaderRefresh" + | "scriptInitiated" + | "metaTagRefresh" + | "pageBlockInterstitial" + | "reload" + | "anchorClick"; + export type ClientNavigationDisposition = "currentTab" | "newTab" | "newWindow" | "download"; + export type InstallabilityErrorArgument = { + /** + * Argument name (e.g. name:'minimum-icon-size-in-pixels'). + */ + name: string; + /** + * Argument value (e.g. value:'64'). + */ + value: string; + }; + /** + * The installability error + */ + export type InstallabilityError = { + /** + * The error id (e.g. 'manifest-missing-suitable-icon'). + */ + errorId: string; + /** + * The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}). + */ + errorArguments: InstallabilityErrorArgument[]; + }; + /** + * The referring-policy used for the navigation. + */ + export type ReferrerPolicy = + | "noReferrer" + | "noReferrerWhenDowngrade" + | "origin" + | "originWhenCrossOrigin" + | "sameOrigin" + | "strictOrigin" + | "strictOriginWhenCrossOrigin" + | "unsafeUrl"; + /** + * Per-script compilation cache parameters for `Page.produceCompilationCache` + */ + export type CompilationCacheParams = { + /** + * The URL of the script to produce a compilation cache entry for. + */ + url: string; + /** + * A hint to the backend whether eager compilation is recommended. + * (the actual compilation mode used is upon backend discretion). + */ + eager?: boolean | undefined; + }; + /** + * Enum of possible auto-reponse for permisison / prompt dialogs. + */ + export type AutoResponseMode = "none" | "autoAccept" | "autoReject" | "autoOptOut"; + /** + * The type of a frameNavigated event. + */ + export type NavigationType = "Navigation" | "BackForwardCacheRestore"; + /** + * List of not restored reasons for back-forward cache. + */ + export type BackForwardCacheNotRestoredReason = + | "NotPrimaryMainFrame" + | "BackForwardCacheDisabled" + | "RelatedActiveContentsExist" + | "HTTPStatusNotOK" + | "SchemeNotHTTPOrHTTPS" + | "Loading" + | "WasGrantedMediaAccess" + | "DisableForRenderFrameHostCalled" + | "DomainNotAllowed" + | "HTTPMethodNotGET" + | "SubframeIsNavigating" + | "Timeout" + | "CacheLimit" + | "JavaScriptExecution" + | "RendererProcessKilled" + | "RendererProcessCrashed" + | "SchedulerTrackedFeatureUsed" + | "ConflictingBrowsingInstance" + | "CacheFlushed" + | "ServiceWorkerVersionActivation" + | "SessionRestored" + | "ServiceWorkerPostMessage" + | "EnteredBackForwardCacheBeforeServiceWorkerHostAdded" + | "RenderFrameHostReused_SameSite" + | "RenderFrameHostReused_CrossSite" + | "ServiceWorkerClaim" + | "IgnoreEventAndEvict" + | "HaveInnerContents" + | "TimeoutPuttingInCache" + | "BackForwardCacheDisabledByLowMemory" + | "BackForwardCacheDisabledByCommandLine" + | "NetworkRequestDatapipeDrainedAsBytesConsumer" + | "NetworkRequestRedirected" + | "NetworkRequestTimeout" + | "NetworkExceedsBufferLimit" + | "NavigationCancelledWhileRestoring" + | "NotMostRecentNavigationEntry" + | "BackForwardCacheDisabledForPrerender" + | "UserAgentOverrideDiffers" + | "ForegroundCacheLimit" + | "BrowsingInstanceNotSwapped" + | "BackForwardCacheDisabledForDelegate" + | "UnloadHandlerExistsInMainFrame" + | "UnloadHandlerExistsInSubFrame" + | "ServiceWorkerUnregistration" + | "CacheControlNoStore" + | "CacheControlNoStoreCookieModified" + | "CacheControlNoStoreHTTPOnlyCookieModified" + | "NoResponseHead" + | "Unknown" + | "ActivationNavigationsDisallowedForBug1234857" + | "ErrorDocument" + | "FencedFramesEmbedder" + | "CookieDisabled" + | "HTTPAuthRequired" + | "CookieFlushed" + | "WebSocket" + | "WebTransport" + | "WebRTC" + | "MainResourceHasCacheControlNoStore" + | "MainResourceHasCacheControlNoCache" + | "SubresourceHasCacheControlNoStore" + | "SubresourceHasCacheControlNoCache" + | "ContainsPlugins" + | "DocumentLoaded" + | "DedicatedWorkerOrWorklet" + | "OutstandingNetworkRequestOthers" + | "RequestedMIDIPermission" + | "RequestedAudioCapturePermission" + | "RequestedVideoCapturePermission" + | "RequestedBackForwardCacheBlockedSensors" + | "RequestedBackgroundWorkPermission" + | "BroadcastChannel" + | "WebXR" + | "SharedWorker" + | "WebLocks" + | "WebHID" + | "WebShare" + | "RequestedStorageAccessGrant" + | "WebNfc" + | "OutstandingNetworkRequestFetch" + | "OutstandingNetworkRequestXHR" + | "AppBanner" + | "Printing" + | "WebDatabase" + | "PictureInPicture" + | "Portal" + | "SpeechRecognizer" + | "IdleManager" + | "PaymentManager" + | "SpeechSynthesis" + | "KeyboardLock" + | "WebOTPService" + | "OutstandingNetworkRequestDirectSocket" + | "InjectedJavascript" + | "InjectedStyleSheet" + | "KeepaliveRequest" + | "IndexedDBEvent" + | "Dummy" + | "JsNetworkRequestReceivedCacheControlNoStoreResource" + | "WebRTCSticky" + | "WebTransportSticky" + | "WebSocketSticky" + | "ContentSecurityHandler" + | "ContentWebAuthenticationAPI" + | "ContentFileChooser" + | "ContentSerial" + | "ContentFileSystemAccess" + | "ContentMediaDevicesDispatcherHost" + | "ContentWebBluetooth" + | "ContentWebUSB" + | "ContentMediaSessionService" + | "ContentScreenReader" + | "EmbedderPopupBlockerTabHelper" + | "EmbedderSafeBrowsingTriggeredPopupBlocker" + | "EmbedderSafeBrowsingThreatDetails" + | "EmbedderAppBannerManager" + | "EmbedderDomDistillerViewerSource" + | "EmbedderDomDistillerSelfDeletingRequestDelegate" + | "EmbedderOomInterventionTabHelper" + | "EmbedderOfflinePage" + | "EmbedderChromePasswordManagerClientBindCredentialManager" + | "EmbedderPermissionRequestManager" + | "EmbedderModalDialog" + | "EmbedderExtensions" + | "EmbedderExtensionMessaging" + | "EmbedderExtensionMessagingForOpenPort" + | "EmbedderExtensionSentMessageToCachedFrame"; + /** + * Types of not restored reasons for back-forward cache. + */ + export type BackForwardCacheNotRestoredReasonType = "SupportPending" | "PageSupportNeeded" | "Circumstantial"; + export type BackForwardCacheNotRestoredExplanation = { + /** + * Type of the reason + */ + type: BackForwardCacheNotRestoredReasonType; + /** + * Not restored reason + */ + reason: BackForwardCacheNotRestoredReason; + /** + * Context associated with the reason. The meaning of this context is + * dependent on the reason: + * - EmbedderExtensionSentMessageToCachedFrame: the extension ID. + */ + context?: string | undefined; + }; + export type BackForwardCacheNotRestoredExplanationTree = { + /** + * URL of each frame + */ + url: string; + /** + * Not restored reasons of each frame + */ + explanations: BackForwardCacheNotRestoredExplanation[]; + /** + * Array of children frame + */ + children: BackForwardCacheNotRestoredExplanationTree[]; + }; + /** + * undefined + * @event `Page.domContentEventFired` + */ + export type DomContentEventFiredEvent = { + timestamp: Network.MonotonicTime; + }; + /** + * Emitted only when `page.interceptFileChooser` is enabled. + * @event `Page.fileChooserOpened` + */ + export type FileChooserOpenedEvent = { + /** + * Id of the frame containing input node. + */ + frameId: FrameId; + /** + * Input mode. + */ + mode: "selectSingle" | "selectMultiple"; + /** + * Input node id. Only present for file choosers opened via an `<input type="file">` element. + */ + backendNodeId?: DOM.BackendNodeId | undefined; + }; + /** + * Fired when frame has been attached to its parent. + * @event `Page.frameAttached` + */ + export type FrameAttachedEvent = { + /** + * Id of the frame that has been attached. + */ + frameId: FrameId; + /** + * Parent frame identifier. + */ + parentFrameId: FrameId; + /** + * JavaScript stack trace of when frame was attached, only set if frame initiated from script. + */ + stack?: Runtime.StackTrace | undefined; + }; + /** + * Fired when frame no longer has a scheduled navigation. + * @event `Page.frameClearedScheduledNavigation` + */ + export type FrameClearedScheduledNavigationEvent = { + /** + * Id of the frame that has cleared its scheduled navigation. + */ + frameId: FrameId; + }; + /** + * Fired when frame has been detached from its parent. + * @event `Page.frameDetached` + */ + export type FrameDetachedEvent = { + /** + * Id of the frame that has been detached. + */ + frameId: FrameId; + reason: "remove" | "swap"; + }; + /** + * Fired once navigation of the frame has completed. Frame is now associated with the new loader. + * @event `Page.frameNavigated` + */ + export type FrameNavigatedEvent = { + /** + * Frame object. + */ + frame: Frame; + type: NavigationType; + }; + /** + * Fired when opening document to write to. + * @event `Page.documentOpened` + */ + export type DocumentOpenedEvent = { + /** + * Frame object. + */ + frame: Frame; + }; + /** + * undefined + * @event `Page.frameResized` + */ + export type FrameResizedEvent = {}; + /** + * Fired when a renderer-initiated navigation is requested. + * Navigation may still be cancelled after the event is issued. + * @event `Page.frameRequestedNavigation` + */ + export type FrameRequestedNavigationEvent = { + /** + * Id of the frame that is being navigated. + */ + frameId: FrameId; + /** + * The reason for the navigation. + */ + reason: ClientNavigationReason; + /** + * The destination URL for the requested navigation. + */ + url: string; + /** + * The disposition for the navigation. + */ + disposition: ClientNavigationDisposition; + }; + /** + * Fired when frame schedules a potential navigation. + * @event `Page.frameScheduledNavigation` + */ + export type FrameScheduledNavigationEvent = { + /** + * Id of the frame that has scheduled a navigation. + */ + frameId: FrameId; + /** + * Delay (in seconds) until the navigation is scheduled to begin. The navigation is not + * guaranteed to start. + */ + delay: number; + /** + * The reason for the navigation. + */ + reason: ClientNavigationReason; + /** + * The destination URL for the scheduled navigation. + */ + url: string; + }; + /** + * Fired when frame has started loading. + * @event `Page.frameStartedLoading` + */ + export type FrameStartedLoadingEvent = { + /** + * Id of the frame that has started loading. + */ + frameId: FrameId; + }; + /** + * Fired when frame has stopped loading. + * @event `Page.frameStoppedLoading` + */ + export type FrameStoppedLoadingEvent = { + /** + * Id of the frame that has stopped loading. + */ + frameId: FrameId; + }; + /** + * Fired when page is about to start a download. + * Deprecated. Use Browser.downloadWillBegin instead. + * @event `Page.downloadWillBegin` + */ + export type DownloadWillBeginEvent = { + /** + * Id of the frame that caused download to begin. + */ + frameId: FrameId; + /** + * Global unique identifier of the download. + */ + guid: string; + /** + * URL of the resource being downloaded. + */ + url: string; + /** + * Suggested file name of the resource (the actual name of the file saved on disk may differ). + */ + suggestedFilename: string; + }; + /** + * Fired when download makes progress. Last call has |done| == true. + * Deprecated. Use Browser.downloadProgress instead. + * @event `Page.downloadProgress` + */ + export type DownloadProgressEvent = { + /** + * Global unique identifier of the download. + */ + guid: string; + /** + * Total expected bytes to download. + */ + totalBytes: number; + /** + * Total bytes received. + */ + receivedBytes: number; + /** + * Download status. + */ + state: "inProgress" | "completed" | "canceled"; + }; + /** + * Fired when interstitial page was hidden + * @event `Page.interstitialHidden` + */ + export type InterstitialHiddenEvent = {}; + /** + * Fired when interstitial page was shown + * @event `Page.interstitialShown` + */ + export type InterstitialShownEvent = {}; + /** + * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been + * closed. + * @event `Page.javascriptDialogClosed` + */ + export type JavascriptDialogClosedEvent = { + /** + * Whether dialog was confirmed. + */ + result: boolean; + /** + * User input in case of prompt. + */ + userInput: string; + }; + /** + * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to + * open. + * @event `Page.javascriptDialogOpening` + */ + export type JavascriptDialogOpeningEvent = { + /** + * Frame url. + */ + url: string; + /** + * Message that will be displayed by the dialog. + */ + message: string; + /** + * Dialog type. + */ + type: DialogType; + /** + * True iff browser is capable showing or acting on the given dialog. When browser has no + * dialog handler for given target, calling alert while Page domain is engaged will stall + * the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. + */ + hasBrowserHandler: boolean; + /** + * Default dialog prompt. + */ + defaultPrompt?: string | undefined; + }; + /** + * Fired for top level page lifecycle events such as navigation, load, paint, etc. + * @event `Page.lifecycleEvent` + */ + export type LifecycleEventEvent = { + /** + * Id of the frame. + */ + frameId: FrameId; + /** + * Loader identifier. Empty string if the request is fetched from worker. + */ + loaderId: Network.LoaderId; + name: string; + timestamp: Network.MonotonicTime; + }; + /** + * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do + * not assume any ordering with the Page.frameNavigated event. This event is fired only for + * main-frame history navigation where the document changes (non-same-document navigations), + * when bfcache navigation fails. + * @event `Page.backForwardCacheNotUsed` + */ + export type BackForwardCacheNotUsedEvent = { + /** + * The loader id for the associated navgation. + */ + loaderId: Network.LoaderId; + /** + * The frame id of the associated frame. + */ + frameId: FrameId; + /** + * Array of reasons why the page could not be cached. This must not be empty. + */ + notRestoredExplanations: BackForwardCacheNotRestoredExplanation[]; + /** + * Tree structure of reasons why the page could not be cached for each frame. + */ + notRestoredExplanationsTree?: BackForwardCacheNotRestoredExplanationTree | undefined; + }; + /** + * undefined + * @event `Page.loadEventFired` + */ + export type LoadEventFiredEvent = { + timestamp: Network.MonotonicTime; + }; + /** + * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. + * @event `Page.navigatedWithinDocument` + */ + export type NavigatedWithinDocumentEvent = { + /** + * Id of the frame. + */ + frameId: FrameId; + /** + * Frame's new url. + */ + url: string; + }; + /** + * Compressed image data requested by the `startScreencast`. + * @event `Page.screencastFrame` + */ + export type ScreencastFrameEvent = { + /** + * Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON) + */ + data: string; + /** + * Screencast frame metadata. + */ + metadata: ScreencastFrameMetadata; + /** + * Frame number. + */ + sessionId: number; + }; + /** + * Fired when the page with currently enabled screencast was shown or hidden `. + * @event `Page.screencastVisibilityChanged` + */ + export type ScreencastVisibilityChangedEvent = { + /** + * True if the page is visible. + */ + visible: boolean; + }; + /** + * Fired when a new window is going to be opened, via window.open(), link click, form submission, + * etc. + * @event `Page.windowOpen` + */ + export type WindowOpenEvent = { + /** + * The URL for the new window. + */ + url: string; + /** + * Window name. + */ + windowName: string; + /** + * An array of enabled window features. + */ + windowFeatures: string[]; + /** + * Whether or not it was triggered by user gesture. + */ + userGesture: boolean; + }; + /** + * Issued for every compilation cache generated. Is only available + * if Page.setGenerateCompilationCache is enabled. + * @event `Page.compilationCacheProduced` + */ + export type CompilationCacheProducedEvent = { + url: string; + /** + * Base64-encoded data (Encoded as a base64 string when passed over JSON) + */ + data: string; + }; + /** + * Deprecated, please use addScriptToEvaluateOnNewDocument instead. + * @request `Page.addScriptToEvaluateOnLoad` + */ + export type AddScriptToEvaluateOnLoadRequest = { + scriptSource: string; + }; + /** + * Deprecated, please use addScriptToEvaluateOnNewDocument instead. + * @response `Page.addScriptToEvaluateOnLoad` + */ + export type AddScriptToEvaluateOnLoadResponse = { + /** + * Identifier of the added script. + */ + identifier: ScriptIdentifier; + }; + /** + * Evaluates given script in every frame upon creation (before loading frame's scripts). + * @request `Page.addScriptToEvaluateOnNewDocument` + */ + export type AddScriptToEvaluateOnNewDocumentRequest = { + source: string; + /** + * If specified, creates an isolated world with the given name and evaluates given script in it. + * This world name will be used as the ExecutionContextDescription::name when the corresponding + * event is emitted. + */ + worldName?: string | undefined; + /** + * Specifies whether command line API should be available to the script, defaults + * to false. + */ + includeCommandLineAPI?: boolean | undefined; + /** + * If true, runs the script immediately on existing execution contexts or worlds. + * Default: false. + */ + runImmediately?: boolean | undefined; + }; + /** + * Evaluates given script in every frame upon creation (before loading frame's scripts). + * @response `Page.addScriptToEvaluateOnNewDocument` + */ + export type AddScriptToEvaluateOnNewDocumentResponse = { + /** + * Identifier of the added script. + */ + identifier: ScriptIdentifier; + }; + /** + * Brings page to front (activates tab). + * @request `Page.bringToFront` + */ + export type BringToFrontRequest = {}; + /** + * Brings page to front (activates tab). + * @response `Page.bringToFront` + */ + export type BringToFrontResponse = {}; + /** + * Capture page screenshot. + * @request `Page.captureScreenshot` + */ + export type CaptureScreenshotRequest = { + /** + * Image compression format (defaults to png). + */ + format?: "jpeg" | "png" | "webp" | undefined; + /** + * Compression quality from range [0..100] (jpeg only). + */ + quality?: number | undefined; + /** + * Capture the screenshot of a given region only. + */ + clip?: Viewport | undefined; + /** + * Capture the screenshot from the surface, rather than the view. Defaults to true. + */ + fromSurface?: boolean | undefined; + /** + * Capture the screenshot beyond the viewport. Defaults to false. + */ + captureBeyondViewport?: boolean | undefined; + /** + * Optimize image encoding for speed, not for resulting size (defaults to false) + */ + optimizeForSpeed?: boolean | undefined; + }; + /** + * Capture page screenshot. + * @response `Page.captureScreenshot` + */ + export type CaptureScreenshotResponse = { + /** + * Base64-encoded image data. (Encoded as a base64 string when passed over JSON) + */ + data: string; + }; + /** + * Returns a snapshot of the page as a string. For MHTML format, the serialization includes + * iframes, shadow DOM, external resources, and element-inline styles. + * @request `Page.captureSnapshot` + */ + export type CaptureSnapshotRequest = { + /** + * Format (defaults to mhtml). + */ + format?: "mhtml" | undefined; + }; + /** + * Returns a snapshot of the page as a string. For MHTML format, the serialization includes + * iframes, shadow DOM, external resources, and element-inline styles. + * @response `Page.captureSnapshot` + */ + export type CaptureSnapshotResponse = { + /** + * Serialized page data. + */ + data: string; + }; + /** + * Clears the overridden device metrics. + * @request `Page.clearDeviceMetricsOverride` + */ + export type ClearDeviceMetricsOverrideRequest = {}; + /** + * Clears the overridden device metrics. + * @response `Page.clearDeviceMetricsOverride` + */ + export type ClearDeviceMetricsOverrideResponse = {}; + /** + * Clears the overridden Device Orientation. + * @request `Page.clearDeviceOrientationOverride` + */ + export type ClearDeviceOrientationOverrideRequest = {}; + /** + * Clears the overridden Device Orientation. + * @response `Page.clearDeviceOrientationOverride` + */ + export type ClearDeviceOrientationOverrideResponse = {}; + /** + * Clears the overridden Geolocation Position and Error. + * @request `Page.clearGeolocationOverride` + */ + export type ClearGeolocationOverrideRequest = {}; + /** + * Clears the overridden Geolocation Position and Error. + * @response `Page.clearGeolocationOverride` + */ + export type ClearGeolocationOverrideResponse = {}; + /** + * Creates an isolated world for the given frame. + * @request `Page.createIsolatedWorld` + */ + export type CreateIsolatedWorldRequest = { + /** + * Id of the frame in which the isolated world should be created. + */ + frameId: FrameId; + /** + * An optional name which is reported in the Execution Context. + */ + worldName?: string | undefined; + /** + * Whether or not universal access should be granted to the isolated world. This is a powerful + * option, use with caution. + */ + grantUniveralAccess?: boolean | undefined; + }; + /** + * Creates an isolated world for the given frame. + * @response `Page.createIsolatedWorld` + */ + export type CreateIsolatedWorldResponse = { + /** + * Execution context of the isolated world. + */ + executionContextId: Runtime.ExecutionContextId; + }; + /** + * Deletes browser cookie with given name, domain and path. + * @request `Page.deleteCookie` + */ + export type DeleteCookieRequest = { + /** + * Name of the cookie to remove. + */ + cookieName: string; + /** + * URL to match cooke domain and path. + */ + url: string; + }; + /** + * Deletes browser cookie with given name, domain and path. + * @response `Page.deleteCookie` + */ + export type DeleteCookieResponse = {}; + /** + * Disables page domain notifications. + * @request `Page.disable` + */ + export type DisableRequest = {}; + /** + * Disables page domain notifications. + * @response `Page.disable` + */ + export type DisableResponse = {}; + /** + * Enables page domain notifications. + * @request `Page.enable` + */ + export type EnableRequest = {}; + /** + * Enables page domain notifications. + * @response `Page.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `Page.getAppManifest` + */ + export type GetAppManifestRequest = {}; + /** + * undefined + * @response `Page.getAppManifest` + */ + export type GetAppManifestResponse = { + /** + * Manifest location. + */ + url: string; + errors: AppManifestError[]; + /** + * Manifest content. + */ + data?: string | undefined; + /** + * Parsed manifest properties + */ + parsed?: AppManifestParsedProperties | undefined; + }; + /** + * undefined + * @request `Page.getInstallabilityErrors` + */ + export type GetInstallabilityErrorsRequest = {}; + /** + * undefined + * @response `Page.getInstallabilityErrors` + */ + export type GetInstallabilityErrorsResponse = { + installabilityErrors: InstallabilityError[]; + }; + /** + * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation. + * @request `Page.getManifestIcons` + */ + export type GetManifestIconsRequest = {}; + /** + * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation. + * @response `Page.getManifestIcons` + */ + export type GetManifestIconsResponse = { + primaryIcon?: string | undefined; + }; + /** + * Returns the unique (PWA) app id. + * Only returns values if the feature flag 'WebAppEnableManifestId' is enabled + * @request `Page.getAppId` + */ + export type GetAppIdRequest = {}; + /** + * Returns the unique (PWA) app id. + * Only returns values if the feature flag 'WebAppEnableManifestId' is enabled + * @response `Page.getAppId` + */ + export type GetAppIdResponse = { + /** + * App id, either from manifest's id attribute or computed from start_url + */ + appId?: string | undefined; + /** + * Recommendation for manifest's id attribute to match current id computed from start_url + */ + recommendedId?: string | undefined; + }; + /** + * undefined + * @request `Page.getAdScriptId` + */ + export type GetAdScriptIdRequest = { + frameId: FrameId; + }; + /** + * undefined + * @response `Page.getAdScriptId` + */ + export type GetAdScriptIdResponse = { + /** + * Identifies the bottom-most script which caused the frame to be labelled + * as an ad. Only sent if frame is labelled as an ad and id is available. + */ + adScriptId?: AdScriptId | undefined; + }; + /** + * Returns all browser cookies for the page and all of its subframes. Depending + * on the backend support, will return detailed cookie information in the + * `cookies` field. + * @request `Page.getCookies` + */ + export type GetCookiesRequest = {}; + /** + * Returns all browser cookies for the page and all of its subframes. Depending + * on the backend support, will return detailed cookie information in the + * `cookies` field. + * @response `Page.getCookies` + */ + export type GetCookiesResponse = { + /** + * Array of cookie objects. + */ + cookies: Network.Cookie[]; + }; + /** + * Returns present frame tree structure. + * @request `Page.getFrameTree` + */ + export type GetFrameTreeRequest = {}; + /** + * Returns present frame tree structure. + * @response `Page.getFrameTree` + */ + export type GetFrameTreeResponse = { + /** + * Present frame tree structure. + */ + frameTree: FrameTree; + }; + /** + * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. + * @request `Page.getLayoutMetrics` + */ + export type GetLayoutMetricsRequest = {}; + /** + * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. + * @response `Page.getLayoutMetrics` + */ + export type GetLayoutMetricsResponse = { + /** + * Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead. + */ + layoutViewport: LayoutViewport; + /** + * Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead. + */ + visualViewport: VisualViewport; + /** + * Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead. + */ + contentSize: DOM.Rect; + /** + * Metrics relating to the layout viewport in CSS pixels. + */ + cssLayoutViewport: LayoutViewport; + /** + * Metrics relating to the visual viewport in CSS pixels. + */ + cssVisualViewport: VisualViewport; + /** + * Size of scrollable area in CSS pixels. + */ + cssContentSize: DOM.Rect; + }; + /** + * Returns navigation history for the current page. + * @request `Page.getNavigationHistory` + */ + export type GetNavigationHistoryRequest = {}; + /** + * Returns navigation history for the current page. + * @response `Page.getNavigationHistory` + */ + export type GetNavigationHistoryResponse = { + /** + * Index of the current navigation history entry. + */ + currentIndex: number; + /** + * Array of navigation history entries. + */ + entries: NavigationEntry[]; + }; + /** + * Resets navigation history for the current page. + * @request `Page.resetNavigationHistory` + */ + export type ResetNavigationHistoryRequest = {}; + /** + * Resets navigation history for the current page. + * @response `Page.resetNavigationHistory` + */ + export type ResetNavigationHistoryResponse = {}; + /** + * Returns content of the given resource. + * @request `Page.getResourceContent` + */ + export type GetResourceContentRequest = { + /** + * Frame id to get resource for. + */ + frameId: FrameId; + /** + * URL of the resource to get content for. + */ + url: string; + }; + /** + * Returns content of the given resource. + * @response `Page.getResourceContent` + */ + export type GetResourceContentResponse = { + /** + * Resource content. + */ + content: string; + /** + * True, if content was served as base64. + */ + base64Encoded: boolean; + }; + /** + * Returns present frame / resource tree structure. + * @request `Page.getResourceTree` + */ + export type GetResourceTreeRequest = {}; + /** + * Returns present frame / resource tree structure. + * @response `Page.getResourceTree` + */ + export type GetResourceTreeResponse = { + /** + * Present frame / resource tree structure. + */ + frameTree: FrameResourceTree; + }; + /** + * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). + * @request `Page.handleJavaScriptDialog` + */ + export type HandleJavaScriptDialogRequest = { + /** + * Whether to accept or dismiss the dialog. + */ + accept: boolean; + /** + * The text to enter into the dialog prompt before accepting. Used only if this is a prompt + * dialog. + */ + promptText?: string | undefined; + }; + /** + * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). + * @response `Page.handleJavaScriptDialog` + */ + export type HandleJavaScriptDialogResponse = {}; + /** + * Navigates current page to the given URL. + * @request `Page.navigate` + */ + export type NavigateRequest = { + /** + * URL to navigate the page to. + */ + url: string; + /** + * Referrer URL. + */ + referrer?: string | undefined; + /** + * Intended transition type. + */ + transitionType?: TransitionType | undefined; + /** + * Frame id to navigate, if not specified navigates the top frame. + */ + frameId?: FrameId | undefined; + /** + * Referrer-policy used for the navigation. + */ + referrerPolicy?: ReferrerPolicy | undefined; + }; + /** + * Navigates current page to the given URL. + * @response `Page.navigate` + */ + export type NavigateResponse = { + /** + * Frame id that has navigated (or failed to navigate) + */ + frameId: FrameId; + /** + * Loader identifier. This is omitted in case of same-document navigation, + * as the previously committed loaderId would not change. + */ + loaderId?: Network.LoaderId | undefined; + /** + * User friendly error message, present if and only if navigation has failed. + */ + errorText?: string | undefined; + }; + /** + * Navigates current page to the given history entry. + * @request `Page.navigateToHistoryEntry` + */ + export type NavigateToHistoryEntryRequest = { + /** + * Unique id of the entry to navigate to. + */ + entryId: number; + }; + /** + * Navigates current page to the given history entry. + * @response `Page.navigateToHistoryEntry` + */ + export type NavigateToHistoryEntryResponse = {}; + /** + * Print page as PDF. + * @request `Page.printToPDF` + */ + export type PrintToPDFRequest = { + /** + * Paper orientation. Defaults to false. + */ + landscape?: boolean | undefined; + /** + * Display header and footer. Defaults to false. + */ + displayHeaderFooter?: boolean | undefined; + /** + * Print background graphics. Defaults to false. + */ + printBackground?: boolean | undefined; + /** + * Scale of the webpage rendering. Defaults to 1. + */ + scale?: number | undefined; + /** + * Paper width in inches. Defaults to 8.5 inches. + */ + paperWidth?: number | undefined; + /** + * Paper height in inches. Defaults to 11 inches. + */ + paperHeight?: number | undefined; + /** + * Top margin in inches. Defaults to 1cm (~0.4 inches). + */ + marginTop?: number | undefined; + /** + * Bottom margin in inches. Defaults to 1cm (~0.4 inches). + */ + marginBottom?: number | undefined; + /** + * Left margin in inches. Defaults to 1cm (~0.4 inches). + */ + marginLeft?: number | undefined; + /** + * Right margin in inches. Defaults to 1cm (~0.4 inches). + */ + marginRight?: number | undefined; + /** + * Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are + * printed in the document order, not in the order specified, and no + * more than once. + * Defaults to empty string, which implies the entire document is printed. + * The page numbers are quietly capped to actual page count of the + * document, and ranges beyond the end of the document are ignored. + * If this results in no pages to print, an error is reported. + * It is an error to specify a range with start greater than end. + */ + pageRanges?: string | undefined; + /** + * HTML template for the print header. Should be valid HTML markup with following + * classes used to inject printing values into them: + * - `date`: formatted print date + * - `title`: document title + * - `url`: document location + * - `pageNumber`: current page number + * - `totalPages`: total pages in the document + * + * For example, `<span class=title></span>` would generate span containing the title. + */ + headerTemplate?: string | undefined; + /** + * HTML template for the print footer. Should use the same format as the `headerTemplate`. + */ + footerTemplate?: string | undefined; + /** + * Whether or not to prefer page size as defined by css. Defaults to false, + * in which case the content will be scaled to fit the paper size. + */ + preferCSSPageSize?: boolean | undefined; + /** + * return as stream + */ + transferMode?: "ReturnAsBase64" | "ReturnAsStream" | undefined; + /** + * Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice. + */ + generateTaggedPDF?: boolean | undefined; + }; + /** + * Print page as PDF. + * @response `Page.printToPDF` + */ + export type PrintToPDFResponse = { + /** + * Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON) + */ + data: string; + /** + * A handle of the stream that holds resulting PDF data. + */ + stream?: IO.StreamHandle | undefined; + }; + /** + * Reloads given page optionally ignoring the cache. + * @request `Page.reload` + */ + export type ReloadRequest = { + /** + * If true, browser cache is ignored (as if the user pressed Shift+refresh). + */ + ignoreCache?: boolean | undefined; + /** + * If set, the script will be injected into all frames of the inspected page after reload. + * Argument will be ignored if reloading dataURL origin. + */ + scriptToEvaluateOnLoad?: string | undefined; + }; + /** + * Reloads given page optionally ignoring the cache. + * @response `Page.reload` + */ + export type ReloadResponse = {}; + /** + * Deprecated, please use removeScriptToEvaluateOnNewDocument instead. + * @request `Page.removeScriptToEvaluateOnLoad` + */ + export type RemoveScriptToEvaluateOnLoadRequest = { + identifier: ScriptIdentifier; + }; + /** + * Deprecated, please use removeScriptToEvaluateOnNewDocument instead. + * @response `Page.removeScriptToEvaluateOnLoad` + */ + export type RemoveScriptToEvaluateOnLoadResponse = {}; + /** + * Removes given script from the list. + * @request `Page.removeScriptToEvaluateOnNewDocument` + */ + export type RemoveScriptToEvaluateOnNewDocumentRequest = { + identifier: ScriptIdentifier; + }; + /** + * Removes given script from the list. + * @response `Page.removeScriptToEvaluateOnNewDocument` + */ + export type RemoveScriptToEvaluateOnNewDocumentResponse = {}; + /** + * Acknowledges that a screencast frame has been received by the frontend. + * @request `Page.screencastFrameAck` + */ + export type ScreencastFrameAckRequest = { + /** + * Frame number. + */ + sessionId: number; + }; + /** + * Acknowledges that a screencast frame has been received by the frontend. + * @response `Page.screencastFrameAck` + */ + export type ScreencastFrameAckResponse = {}; + /** + * Searches for given string in resource content. + * @request `Page.searchInResource` + */ + export type SearchInResourceRequest = { + /** + * Frame id for resource to search in. + */ + frameId: FrameId; + /** + * URL of the resource to search in. + */ + url: string; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean | undefined; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean | undefined; + }; + /** + * Searches for given string in resource content. + * @response `Page.searchInResource` + */ + export type SearchInResourceResponse = { + /** + * List of search matches. + */ + result: Debugger.SearchMatch[]; + }; + /** + * Enable Chrome's experimental ad filter on all sites. + * @request `Page.setAdBlockingEnabled` + */ + export type SetAdBlockingEnabledRequest = { + /** + * Whether to block ads. + */ + enabled: boolean; + }; + /** + * Enable Chrome's experimental ad filter on all sites. + * @response `Page.setAdBlockingEnabled` + */ + export type SetAdBlockingEnabledResponse = {}; + /** + * Enable page Content Security Policy by-passing. + * @request `Page.setBypassCSP` + */ + export type SetBypassCSPRequest = { + /** + * Whether to bypass page CSP. + */ + enabled: boolean; + }; + /** + * Enable page Content Security Policy by-passing. + * @response `Page.setBypassCSP` + */ + export type SetBypassCSPResponse = {}; + /** + * Get Permissions Policy state on given frame. + * @request `Page.getPermissionsPolicyState` + */ + export type GetPermissionsPolicyStateRequest = { + frameId: FrameId; + }; + /** + * Get Permissions Policy state on given frame. + * @response `Page.getPermissionsPolicyState` + */ + export type GetPermissionsPolicyStateResponse = { + states: PermissionsPolicyFeatureState[]; + }; + /** + * Get Origin Trials on given frame. + * @request `Page.getOriginTrials` + */ + export type GetOriginTrialsRequest = { + frameId: FrameId; + }; + /** + * Get Origin Trials on given frame. + * @response `Page.getOriginTrials` + */ + export type GetOriginTrialsResponse = { + originTrials: OriginTrial[]; + }; + /** + * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, + * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media + * query results). + * @request `Page.setDeviceMetricsOverride` + */ + export type SetDeviceMetricsOverrideRequest = { + /** + * Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. + */ + width: number; + /** + * Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. + */ + height: number; + /** + * Overriding device scale factor value. 0 disables the override. + */ + deviceScaleFactor: number; + /** + * Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text + * autosizing and more. + */ + mobile: boolean; + /** + * Scale to apply to resulting view image. + */ + scale?: number | undefined; + /** + * Overriding screen width value in pixels (minimum 0, maximum 10000000). + */ + screenWidth?: number | undefined; + /** + * Overriding screen height value in pixels (minimum 0, maximum 10000000). + */ + screenHeight?: number | undefined; + /** + * Overriding view X position on screen in pixels (minimum 0, maximum 10000000). + */ + positionX?: number | undefined; + /** + * Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). + */ + positionY?: number | undefined; + /** + * Do not set visible view size, rely upon explicit setVisibleSize call. + */ + dontSetVisibleSize?: boolean | undefined; + /** + * Screen orientation override. + */ + screenOrientation?: Emulation.ScreenOrientation | undefined; + /** + * The viewport dimensions and scale. If not set, the override is cleared. + */ + viewport?: Viewport | undefined; + }; + /** + * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, + * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media + * query results). + * @response `Page.setDeviceMetricsOverride` + */ + export type SetDeviceMetricsOverrideResponse = {}; + /** + * Overrides the Device Orientation. + * @request `Page.setDeviceOrientationOverride` + */ + export type SetDeviceOrientationOverrideRequest = { + /** + * Mock alpha + */ + alpha: number; + /** + * Mock beta + */ + beta: number; + /** + * Mock gamma + */ + gamma: number; + }; + /** + * Overrides the Device Orientation. + * @response `Page.setDeviceOrientationOverride` + */ + export type SetDeviceOrientationOverrideResponse = {}; + /** + * Set generic font families. + * @request `Page.setFontFamilies` + */ + export type SetFontFamiliesRequest = { + /** + * Specifies font families to set. If a font family is not specified, it won't be changed. + */ + fontFamilies: FontFamilies; + /** + * Specifies font families to set for individual scripts. + */ + forScripts?: ScriptFontFamilies[] | undefined; + }; + /** + * Set generic font families. + * @response `Page.setFontFamilies` + */ + export type SetFontFamiliesResponse = {}; + /** + * Set default font sizes. + * @request `Page.setFontSizes` + */ + export type SetFontSizesRequest = { + /** + * Specifies font sizes to set. If a font size is not specified, it won't be changed. + */ + fontSizes: FontSizes; + }; + /** + * Set default font sizes. + * @response `Page.setFontSizes` + */ + export type SetFontSizesResponse = {}; + /** + * Sets given markup as the document's HTML. + * @request `Page.setDocumentContent` + */ + export type SetDocumentContentRequest = { + /** + * Frame id to set HTML for. + */ + frameId: FrameId; + /** + * HTML content to set. + */ + html: string; + }; + /** + * Sets given markup as the document's HTML. + * @response `Page.setDocumentContent` + */ + export type SetDocumentContentResponse = {}; + /** + * Set the behavior when downloading a file. + * @request `Page.setDownloadBehavior` + */ + export type SetDownloadBehaviorRequest = { + /** + * Whether to allow all or deny all download requests, or use default Chrome behavior if + * available (otherwise deny). + */ + behavior: "deny" | "allow" | "default"; + /** + * The default path to save downloaded files to. This is required if behavior is set to 'allow' + */ + downloadPath?: string | undefined; + }; + /** + * Set the behavior when downloading a file. + * @response `Page.setDownloadBehavior` + */ + export type SetDownloadBehaviorResponse = {}; + /** + * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position + * unavailable. + * @request `Page.setGeolocationOverride` + */ + export type SetGeolocationOverrideRequest = { + /** + * Mock latitude + */ + latitude?: number | undefined; + /** + * Mock longitude + */ + longitude?: number | undefined; + /** + * Mock accuracy + */ + accuracy?: number | undefined; + }; + /** + * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position + * unavailable. + * @response `Page.setGeolocationOverride` + */ + export type SetGeolocationOverrideResponse = {}; + /** + * Controls whether page will emit lifecycle events. + * @request `Page.setLifecycleEventsEnabled` + */ + export type SetLifecycleEventsEnabledRequest = { + /** + * If true, starts emitting lifecycle events. + */ + enabled: boolean; + }; + /** + * Controls whether page will emit lifecycle events. + * @response `Page.setLifecycleEventsEnabled` + */ + export type SetLifecycleEventsEnabledResponse = {}; + /** + * Toggles mouse event-based touch event emulation. + * @request `Page.setTouchEmulationEnabled` + */ + export type SetTouchEmulationEnabledRequest = { + /** + * Whether the touch event emulation should be enabled. + */ + enabled: boolean; + /** + * Touch/gesture events configuration. Default: current platform. + */ + configuration?: "mobile" | "desktop" | undefined; + }; + /** + * Toggles mouse event-based touch event emulation. + * @response `Page.setTouchEmulationEnabled` + */ + export type SetTouchEmulationEnabledResponse = {}; + /** + * Starts sending each frame using the `screencastFrame` event. + * @request `Page.startScreencast` + */ + export type StartScreencastRequest = { + /** + * Image compression format. + */ + format?: "jpeg" | "png" | undefined; + /** + * Compression quality from range [0..100]. + */ + quality?: number | undefined; + /** + * Maximum screenshot width. + */ + maxWidth?: number | undefined; + /** + * Maximum screenshot height. + */ + maxHeight?: number | undefined; + /** + * Send every n-th frame. + */ + everyNthFrame?: number | undefined; + }; + /** + * Starts sending each frame using the `screencastFrame` event. + * @response `Page.startScreencast` + */ + export type StartScreencastResponse = {}; + /** + * Force the page stop all navigations and pending resource fetches. + * @request `Page.stopLoading` + */ + export type StopLoadingRequest = {}; + /** + * Force the page stop all navigations and pending resource fetches. + * @response `Page.stopLoading` + */ + export type StopLoadingResponse = {}; + /** + * Crashes renderer on the IO thread, generates minidumps. + * @request `Page.crash` + */ + export type CrashRequest = {}; + /** + * Crashes renderer on the IO thread, generates minidumps. + * @response `Page.crash` + */ + export type CrashResponse = {}; + /** + * Tries to close page, running its beforeunload hooks, if any. + * @request `Page.close` + */ + export type CloseRequest = {}; + /** + * Tries to close page, running its beforeunload hooks, if any. + * @response `Page.close` + */ + export type CloseResponse = {}; + /** + * Tries to update the web lifecycle state of the page. + * It will transition the page to the given state according to: + * https://github.com/WICG/web-lifecycle/ + * @request `Page.setWebLifecycleState` + */ + export type SetWebLifecycleStateRequest = { + /** + * Target lifecycle state + */ + state: "frozen" | "active"; + }; + /** + * Tries to update the web lifecycle state of the page. + * It will transition the page to the given state according to: + * https://github.com/WICG/web-lifecycle/ + * @response `Page.setWebLifecycleState` + */ + export type SetWebLifecycleStateResponse = {}; + /** + * Stops sending each frame in the `screencastFrame`. + * @request `Page.stopScreencast` + */ + export type StopScreencastRequest = {}; + /** + * Stops sending each frame in the `screencastFrame`. + * @response `Page.stopScreencast` + */ + export type StopScreencastResponse = {}; + /** + * Requests backend to produce compilation cache for the specified scripts. + * `scripts` are appeneded to the list of scripts for which the cache + * would be produced. The list may be reset during page navigation. + * When script with a matching URL is encountered, the cache is optionally + * produced upon backend discretion, based on internal heuristics. + * See also: `Page.compilationCacheProduced`. + * @request `Page.produceCompilationCache` + */ + export type ProduceCompilationCacheRequest = { + scripts: CompilationCacheParams[]; + }; + /** + * Requests backend to produce compilation cache for the specified scripts. + * `scripts` are appeneded to the list of scripts for which the cache + * would be produced. The list may be reset during page navigation. + * When script with a matching URL is encountered, the cache is optionally + * produced upon backend discretion, based on internal heuristics. + * See also: `Page.compilationCacheProduced`. + * @response `Page.produceCompilationCache` + */ + export type ProduceCompilationCacheResponse = {}; + /** + * Seeds compilation cache for given url. Compilation cache does not survive + * cross-process navigation. + * @request `Page.addCompilationCache` + */ + export type AddCompilationCacheRequest = { + url: string; + /** + * Base64-encoded data (Encoded as a base64 string when passed over JSON) + */ + data: string; + }; + /** + * Seeds compilation cache for given url. Compilation cache does not survive + * cross-process navigation. + * @response `Page.addCompilationCache` + */ + export type AddCompilationCacheResponse = {}; + /** + * Clears seeded compilation cache. + * @request `Page.clearCompilationCache` + */ + export type ClearCompilationCacheRequest = {}; + /** + * Clears seeded compilation cache. + * @response `Page.clearCompilationCache` + */ + export type ClearCompilationCacheResponse = {}; + /** + * Sets the Secure Payment Confirmation transaction mode. + * https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode + * @request `Page.setSPCTransactionMode` + */ + export type SetSPCTransactionModeRequest = { + mode: AutoResponseMode; + }; + /** + * Sets the Secure Payment Confirmation transaction mode. + * https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode + * @response `Page.setSPCTransactionMode` + */ + export type SetSPCTransactionModeResponse = {}; + /** + * Extensions for Custom Handlers API: + * https://html.spec.whatwg.org/multipage/system-state.html#rph-automation + * @request `Page.setRPHRegistrationMode` + */ + export type SetRPHRegistrationModeRequest = { + mode: AutoResponseMode; + }; + /** + * Extensions for Custom Handlers API: + * https://html.spec.whatwg.org/multipage/system-state.html#rph-automation + * @response `Page.setRPHRegistrationMode` + */ + export type SetRPHRegistrationModeResponse = {}; + /** + * Generates a report for testing. + * @request `Page.generateTestReport` + */ + export type GenerateTestReportRequest = { + /** + * Message to be displayed in the report. + */ + message: string; + /** + * Specifies the endpoint group to deliver the report to. + */ + group?: string | undefined; + }; + /** + * Generates a report for testing. + * @response `Page.generateTestReport` + */ + export type GenerateTestReportResponse = {}; + /** + * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. + * @request `Page.waitForDebugger` + */ + export type WaitForDebuggerRequest = {}; + /** + * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. + * @response `Page.waitForDebugger` + */ + export type WaitForDebuggerResponse = {}; + /** + * Intercept file chooser requests and transfer control to protocol clients. + * When file chooser interception is enabled, native file chooser dialog is not shown. + * Instead, a protocol event `Page.fileChooserOpened` is emitted. + * @request `Page.setInterceptFileChooserDialog` + */ + export type SetInterceptFileChooserDialogRequest = { + enabled: boolean; + }; + /** + * Intercept file chooser requests and transfer control to protocol clients. + * When file chooser interception is enabled, native file chooser dialog is not shown. + * Instead, a protocol event `Page.fileChooserOpened` is emitted. + * @response `Page.setInterceptFileChooserDialog` + */ + export type SetInterceptFileChooserDialogResponse = {}; + /** + * Enable/disable prerendering manually. + * + * This command is a short-term solution for https://crbug.com/1440085. + * See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA + * for more details. + * + * TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets. + * @request `Page.setPrerenderingAllowed` + */ + export type SetPrerenderingAllowedRequest = { + isAllowed: boolean; + }; + /** + * Enable/disable prerendering manually. + * + * This command is a short-term solution for https://crbug.com/1440085. + * See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA + * for more details. + * + * TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets. + * @response `Page.setPrerenderingAllowed` + */ + export type SetPrerenderingAllowedResponse = {}; + } + export namespace Performance { + /** + * Run-time execution metric. + */ + export type Metric = { + /** + * Metric name. + */ + name: string; + /** + * Metric value. + */ + value: number; + }; + /** + * Current values of the metrics. + * @event `Performance.metrics` + */ + export type MetricsEvent = { + /** + * Current values of the metrics. + */ + metrics: Metric[]; + /** + * Timestamp title. + */ + title: string; + }; + /** + * Disable collecting and reporting metrics. + * @request `Performance.disable` + */ + export type DisableRequest = {}; + /** + * Disable collecting and reporting metrics. + * @response `Performance.disable` + */ + export type DisableResponse = {}; + /** + * Enable collecting and reporting metrics. + * @request `Performance.enable` + */ + export type EnableRequest = { + /** + * Time domain to use for collecting and reporting duration metrics. + */ + timeDomain?: "timeTicks" | "threadTicks" | undefined; + }; + /** + * Enable collecting and reporting metrics. + * @response `Performance.enable` + */ + export type EnableResponse = {}; + /** + * Sets time domain to use for collecting and reporting duration metrics. + * Note that this must be called before enabling metrics collection. Calling + * this method while metrics collection is enabled returns an error. + * @request `Performance.setTimeDomain` + */ + export type SetTimeDomainRequest = { + /** + * Time domain + */ + timeDomain: "timeTicks" | "threadTicks"; + }; + /** + * Sets time domain to use for collecting and reporting duration metrics. + * Note that this must be called before enabling metrics collection. Calling + * this method while metrics collection is enabled returns an error. + * @response `Performance.setTimeDomain` + */ + export type SetTimeDomainResponse = {}; + /** + * Retrieve current values of run-time metrics. + * @request `Performance.getMetrics` + */ + export type GetMetricsRequest = {}; + /** + * Retrieve current values of run-time metrics. + * @response `Performance.getMetrics` + */ + export type GetMetricsResponse = { + /** + * Current values for run-time metrics. + */ + metrics: Metric[]; + }; + } + export namespace PerformanceTimeline { + /** + * See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl + */ + export type LargestContentfulPaint = { + renderTime: Network.TimeSinceEpoch; + loadTime: Network.TimeSinceEpoch; + /** + * The number of pixels being painted. + */ + size: number; + /** + * The id attribute of the element, if available. + */ + elementId?: string | undefined; + /** + * The URL of the image (may be trimmed). + */ + url?: string | undefined; + nodeId?: DOM.BackendNodeId | undefined; + }; + export type LayoutShiftAttribution = { + previousRect: DOM.Rect; + currentRect: DOM.Rect; + nodeId?: DOM.BackendNodeId | undefined; + }; + /** + * See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl + */ + export type LayoutShift = { + /** + * Score increment produced by this event. + */ + value: number; + hadRecentInput: boolean; + lastInputTime: Network.TimeSinceEpoch; + sources: LayoutShiftAttribution[]; + }; + export type TimelineEvent = { + /** + * Identifies the frame that this event is related to. Empty for non-frame targets. + */ + frameId: Page.FrameId; + /** + * The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype + * This determines which of the optional "details" fiedls is present. + */ + type: string; + /** + * Name may be empty depending on the type. + */ + name: string; + /** + * Time in seconds since Epoch, monotonically increasing within document lifetime. + */ + time: Network.TimeSinceEpoch; + /** + * Event duration, if applicable. + */ + duration?: number | undefined; + lcpDetails?: LargestContentfulPaint | undefined; + layoutShiftDetails?: LayoutShift | undefined; + }; + /** + * Sent when a performance timeline event is added. See reportPerformanceTimeline method. + * @event `PerformanceTimeline.timelineEventAdded` + */ + export type TimelineEventAddedEvent = { + event: TimelineEvent; + }; + /** + * Previously buffered events would be reported before method returns. + * See also: timelineEventAdded + * @request `PerformanceTimeline.enable` + */ + export type EnableRequest = { + /** + * The types of event to report, as specified in + * https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype + * The specified filter overrides any previous filters, passing empty + * filter disables recording. + * Note that not all types exposed to the web platform are currently supported. + */ + eventTypes: string[]; + }; + /** + * Previously buffered events would be reported before method returns. + * See also: timelineEventAdded + * @response `PerformanceTimeline.enable` + */ + export type EnableResponse = {}; + } + export namespace Preload { + /** + * Unique id + */ + export type RuleSetId = string; + /** + * Corresponds to SpeculationRuleSet + */ + export type RuleSet = { + id: RuleSetId; + /** + * Identifies a document which the rule set is associated with. + */ + loaderId: Network.LoaderId; + /** + * Source text of JSON representing the rule set. If it comes from + * `<script>` tag, it is the textContent of the node. Note that it is + * a JSON for valid case. + * + * See also: + * - https://wicg.github.io/nav-speculation/speculation-rules.html + * - https://github.com/WICG/nav-speculation/blob/main/triggers.md + */ + sourceText: string; + /** + * A speculation rule set is either added through an inline + * `<script>` tag or through an external resource via the + * 'Speculation-Rules' HTTP header. For the first case, we include + * the BackendNodeId of the relevant `<script>` tag. For the second + * case, we include the external URL where the rule set was loaded + * from, and also RequestId if Network domain is enabled. + * + * See also: + * - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script + * - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header + */ + backendNodeId?: DOM.BackendNodeId | undefined; + url?: string | undefined; + requestId?: Network.RequestId | undefined; + /** + * Error information + * `errorMessage` is null iff `errorType` is null. + */ + errorType?: RuleSetErrorType | undefined; + /** + * TODO(https://crbug.com/1425354): Replace this property with structured error. + */ + errorMessage?: string | undefined; + }; + export type RuleSetErrorType = "SourceIsNotJsonObject" | "InvalidRulesSkipped"; + /** + * The type of preloading attempted. It corresponds to + * mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it + * isn't being used by clients). + */ + export type SpeculationAction = "Prefetch" | "Prerender"; + /** + * Corresponds to mojom::SpeculationTargetHint. + * See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints + */ + export type SpeculationTargetHint = "Blank" | "Self"; + /** + * A key that identifies a preloading attempt. + * + * The url used is the url specified by the trigger (i.e. the initial URL), and + * not the final url that is navigated to. For example, prerendering allows + * same-origin main frame navigations during the attempt, but the attempt is + * still keyed with the initial URL. + */ + export type PreloadingAttemptKey = { + loaderId: Network.LoaderId; + action: SpeculationAction; + url: string; + targetHint?: SpeculationTargetHint | undefined; + }; + /** + * Lists sources for a preloading attempt, specifically the ids of rule sets + * that had a speculation rule that triggered the attempt, and the + * BackendNodeIds of <a href> or <area href> elements that triggered the + * attempt (in the case of attempts triggered by a document rule). It is + * possible for mulitple rule sets and links to trigger a single attempt. + */ + export type PreloadingAttemptSource = { + key: PreloadingAttemptKey; + ruleSetIds: RuleSetId[]; + nodeIds: DOM.BackendNodeId[]; + }; + /** + * List of FinalStatus reasons for Prerender2. + */ + export type PrerenderFinalStatus = + | "Activated" + | "Destroyed" + | "LowEndDevice" + | "InvalidSchemeRedirect" + | "InvalidSchemeNavigation" + | "InProgressNavigation" + | "NavigationRequestBlockedByCsp" + | "MainFrameNavigation" + | "MojoBinderPolicy" + | "RendererProcessCrashed" + | "RendererProcessKilled" + | "Download" + | "TriggerDestroyed" + | "NavigationNotCommitted" + | "NavigationBadHttpStatus" + | "ClientCertRequested" + | "NavigationRequestNetworkError" + | "MaxNumOfRunningPrerendersExceeded" + | "CancelAllHostsForTesting" + | "DidFailLoad" + | "Stop" + | "SslCertificateError" + | "LoginAuthRequested" + | "UaChangeRequiresReload" + | "BlockedByClient" + | "AudioOutputDeviceRequested" + | "MixedContent" + | "TriggerBackgrounded" + | "MemoryLimitExceeded" + | "FailToGetMemoryUsage" + | "DataSaverEnabled" + | "HasEffectiveUrl" + | "ActivatedBeforeStarted" + | "InactivePageRestriction" + | "StartFailed" + | "TimeoutBackgrounded" + | "CrossSiteRedirectInInitialNavigation" + | "CrossSiteNavigationInInitialNavigation" + | "SameSiteCrossOriginRedirectNotOptInInInitialNavigation" + | "SameSiteCrossOriginNavigationNotOptInInInitialNavigation" + | "ActivationNavigationParameterMismatch" + | "ActivatedInBackground" + | "EmbedderHostDisallowed" + | "ActivationNavigationDestroyedBeforeSuccess" + | "TabClosedByUserGesture" + | "TabClosedWithoutUserGesture" + | "PrimaryMainFrameRendererProcessCrashed" + | "PrimaryMainFrameRendererProcessKilled" + | "ActivationFramePolicyNotCompatible" + | "PreloadingDisabled" + | "BatterySaverEnabled" + | "ActivatedDuringMainFrameNavigation" + | "PreloadingUnsupportedByWebContents" + | "CrossSiteRedirectInMainFrameNavigation" + | "CrossSiteNavigationInMainFrameNavigation" + | "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation" + | "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation" + | "MemoryPressureOnTrigger" + | "MemoryPressureAfterTriggered" + | "PrerenderingDisabledByDevTools" + | "ResourceLoadBlockedByClient" + | "SpeculationRuleRemoved" + | "ActivatedWithAuxiliaryBrowsingContexts"; + /** + * Preloading status values, see also PreloadingTriggeringOutcome. This + * status is shared by prefetchStatusUpdated and prerenderStatusUpdated. + */ + export type PreloadingStatus = "Pending" | "Running" | "Ready" | "Success" | "Failure" | "NotSupported"; + /** + * TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and + * filter out the ones that aren't necessary to the developers. + */ + export type PrefetchStatus = + | "PrefetchAllowed" + | "PrefetchFailedIneligibleRedirect" + | "PrefetchFailedInvalidRedirect" + | "PrefetchFailedMIMENotSupported" + | "PrefetchFailedNetError" + | "PrefetchFailedNon2XX" + | "PrefetchFailedPerPageLimitExceeded" + | "PrefetchEvicted" + | "PrefetchHeldback" + | "PrefetchIneligibleRetryAfter" + | "PrefetchIsPrivacyDecoy" + | "PrefetchIsStale" + | "PrefetchNotEligibleBrowserContextOffTheRecord" + | "PrefetchNotEligibleDataSaverEnabled" + | "PrefetchNotEligibleExistingProxy" + | "PrefetchNotEligibleHostIsNonUnique" + | "PrefetchNotEligibleNonDefaultStoragePartition" + | "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy" + | "PrefetchNotEligibleSchemeIsNotHttps" + | "PrefetchNotEligibleUserHasCookies" + | "PrefetchNotEligibleUserHasServiceWorker" + | "PrefetchNotEligibleBatterySaverEnabled" + | "PrefetchNotEligiblePreloadingDisabled" + | "PrefetchNotFinishedInTime" + | "PrefetchNotStarted" + | "PrefetchNotUsedCookiesChanged" + | "PrefetchProxyNotAvailable" + | "PrefetchResponseUsed" + | "PrefetchSuccessfulButNotUsed" + | "PrefetchNotUsedProbeFailed"; + /** + * Upsert. Currently, it is only emitted when a rule set added. + * @event `Preload.ruleSetUpdated` + */ + export type RuleSetUpdatedEvent = { + ruleSet: RuleSet; + }; + /** + * undefined + * @event `Preload.ruleSetRemoved` + */ + export type RuleSetRemovedEvent = { + id: RuleSetId; + }; + /** + * Fired when a prerender attempt is completed. + * @event `Preload.prerenderAttemptCompleted` + */ + export type PrerenderAttemptCompletedEvent = { + key: PreloadingAttemptKey; + /** + * The frame id of the frame initiating prerendering. + */ + initiatingFrameId: Page.FrameId; + prerenderingUrl: string; + finalStatus: PrerenderFinalStatus; + /** + * This is used to give users more information about the name of the API call + * that is incompatible with prerender and has caused the cancellation of the attempt + */ + disallowedApiMethod?: string | undefined; + }; + /** + * Fired when a preload enabled state is updated. + * @event `Preload.preloadEnabledStateUpdated` + */ + export type PreloadEnabledStateUpdatedEvent = { + disabledByPreference: boolean; + disabledByDataSaver: boolean; + disabledByBatterySaver: boolean; + disabledByHoldbackPrefetchSpeculationRules: boolean; + disabledByHoldbackPrerenderSpeculationRules: boolean; + }; + /** + * Fired when a prefetch attempt is updated. + * @event `Preload.prefetchStatusUpdated` + */ + export type PrefetchStatusUpdatedEvent = { + key: PreloadingAttemptKey; + /** + * The frame id of the frame initiating prefetch. + */ + initiatingFrameId: Page.FrameId; + prefetchUrl: string; + status: PreloadingStatus; + prefetchStatus: PrefetchStatus; + requestId: Network.RequestId; + }; + /** + * Fired when a prerender attempt is updated. + * @event `Preload.prerenderStatusUpdated` + */ + export type PrerenderStatusUpdatedEvent = { + key: PreloadingAttemptKey; + status: PreloadingStatus; + prerenderStatus?: PrerenderFinalStatus | undefined; + /** + * This is used to give users more information about the name of Mojo interface + * that is incompatible with prerender and has caused the cancellation of the attempt. + */ + disallowedMojoInterface?: string | undefined; + }; + /** + * Send a list of sources for all preloading attempts in a document. + * @event `Preload.preloadingAttemptSourcesUpdated` + */ + export type PreloadingAttemptSourcesUpdatedEvent = { + loaderId: Network.LoaderId; + preloadingAttemptSources: PreloadingAttemptSource[]; + }; + /** + * undefined + * @request `Preload.enable` + */ + export type EnableRequest = {}; + /** + * undefined + * @response `Preload.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `Preload.disable` + */ + export type DisableRequest = {}; + /** + * undefined + * @response `Preload.disable` + */ + export type DisableResponse = {}; + } + export namespace Schema { + /** + * Description of the protocol domain. + */ + export type Domain = { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + }; + /** + * Returns supported domains. + * @request `Schema.getDomains` + */ + export type GetDomainsRequest = {}; + /** + * Returns supported domains. + * @response `Schema.getDomains` + */ + export type GetDomainsResponse = { + /** + * List of supported domains. + */ + domains: Domain[]; + }; + } + export namespace Security { + /** + * An internal certificate ID value. + */ + export type CertificateId = number; + /** + * A description of mixed content (HTTP resources on HTTPS pages), as defined by + * https://www.w3.org/TR/mixed-content/#categories + */ + export type MixedContentType = "blockable" | "optionally-blockable" | "none"; + /** + * The security level of a page or resource. + */ + export type SecurityState = "unknown" | "neutral" | "insecure" | "secure" | "info" | "insecure-broken"; + /** + * Details about the security state of the page certificate. + */ + export type CertificateSecurityState = { + /** + * Protocol name (e.g. "TLS 1.2" or "QUIC"). + */ + protocol: string; + /** + * Key Exchange used by the connection, or the empty string if not applicable. + */ + keyExchange: string; + /** + * (EC)DH group used by the connection, if applicable. + */ + keyExchangeGroup?: string | undefined; + /** + * Cipher name. + */ + cipher: string; + /** + * TLS MAC. Note that AEAD ciphers do not have separate MACs. + */ + mac?: string | undefined; + /** + * Page certificate. + */ + certificate: string[]; + /** + * Certificate subject name. + */ + subjectName: string; + /** + * Name of the issuing CA. + */ + issuer: string; + /** + * Certificate valid from date. + */ + validFrom: Network.TimeSinceEpoch; + /** + * Certificate valid to (expiration) date + */ + validTo: Network.TimeSinceEpoch; + /** + * The highest priority network error code, if the certificate has an error. + */ + certificateNetworkError?: string | undefined; + /** + * True if the certificate uses a weak signature aglorithm. + */ + certificateHasWeakSignature: boolean; + /** + * True if the certificate has a SHA1 signature in the chain. + */ + certificateHasSha1Signature: boolean; + /** + * True if modern SSL + */ + modernSSL: boolean; + /** + * True if the connection is using an obsolete SSL protocol. + */ + obsoleteSslProtocol: boolean; + /** + * True if the connection is using an obsolete SSL key exchange. + */ + obsoleteSslKeyExchange: boolean; + /** + * True if the connection is using an obsolete SSL cipher. + */ + obsoleteSslCipher: boolean; + /** + * True if the connection is using an obsolete SSL signature. + */ + obsoleteSslSignature: boolean; + }; + export type SafetyTipStatus = "badReputation" | "lookalike"; + export type SafetyTipInfo = { + /** + * Describes whether the page triggers any safety tips or reputation warnings. Default is unknown. + */ + safetyTipStatus: SafetyTipStatus; + /** + * The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches. + */ + safeUrl?: string | undefined; + }; + /** + * Security state information about the page. + */ + export type VisibleSecurityState = { + /** + * The security level of the page. + */ + securityState: SecurityState; + /** + * Security state details about the page certificate. + */ + certificateSecurityState?: CertificateSecurityState | undefined; + /** + * The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown. + */ + safetyTipInfo?: SafetyTipInfo | undefined; + /** + * Array of security state issues ids. + */ + securityStateIssueIds: string[]; + }; + /** + * An explanation of an factor contributing to the security state. + */ + export type SecurityStateExplanation = { + /** + * Security state representing the severity of the factor being explained. + */ + securityState: SecurityState; + /** + * Title describing the type of factor. + */ + title: string; + /** + * Short phrase describing the type of factor. + */ + summary: string; + /** + * Full text explanation of the factor. + */ + description: string; + /** + * The type of mixed content described by the explanation. + */ + mixedContentType: MixedContentType; + /** + * Page certificate. + */ + certificate: string[]; + /** + * Recommendations to fix any issues. + */ + recommendations?: string[] | undefined; + }; + /** + * Information about insecure content on the page. + */ + export type InsecureContentStatus = { + /** + * Always false. + */ + ranMixedContent: boolean; + /** + * Always false. + */ + displayedMixedContent: boolean; + /** + * Always false. + */ + containedMixedForm: boolean; + /** + * Always false. + */ + ranContentWithCertErrors: boolean; + /** + * Always false. + */ + displayedContentWithCertErrors: boolean; + /** + * Always set to unknown. + */ + ranInsecureContentStyle: SecurityState; + /** + * Always set to unknown. + */ + displayedInsecureContentStyle: SecurityState; + }; + /** + * The action to take when a certificate error occurs. continue will continue processing the + * request and cancel will cancel the request. + */ + export type CertificateErrorAction = "continue" | "cancel"; + /** + * There is a certificate error. If overriding certificate errors is enabled, then it should be + * handled with the `handleCertificateError` command. Note: this event does not fire if the + * certificate error has been allowed internally. Only one client per target should override + * certificate errors at the same time. + * @event `Security.certificateError` + */ + export type CertificateErrorEvent = { + /** + * The ID of the event. + */ + eventId: number; + /** + * The type of the error. + */ + errorType: string; + /** + * The url that was requested. + */ + requestURL: string; + }; + /** + * The security state of the page changed. + * @event `Security.visibleSecurityStateChanged` + */ + export type VisibleSecurityStateChangedEvent = { + /** + * Security state information about the page. + */ + visibleSecurityState: VisibleSecurityState; + }; + /** + * The security state of the page changed. No longer being sent. + * @event `Security.securityStateChanged` + */ + export type SecurityStateChangedEvent = { + /** + * Security state. + */ + securityState: SecurityState; + /** + * True if the page was loaded over cryptographic transport such as HTTPS. + */ + schemeIsCryptographic: boolean; + /** + * Previously a list of explanations for the security state. Now always + * empty. + */ + explanations: SecurityStateExplanation[]; + /** + * Information about insecure content on the page. + */ + insecureContentStatus: InsecureContentStatus; + /** + * Overrides user-visible description of the state. Always omitted. + */ + summary?: string | undefined; + }; + /** + * Disables tracking security state changes. + * @request `Security.disable` + */ + export type DisableRequest = {}; + /** + * Disables tracking security state changes. + * @response `Security.disable` + */ + export type DisableResponse = {}; + /** + * Enables tracking security state changes. + * @request `Security.enable` + */ + export type EnableRequest = {}; + /** + * Enables tracking security state changes. + * @response `Security.enable` + */ + export type EnableResponse = {}; + /** + * Enable/disable whether all certificate errors should be ignored. + * @request `Security.setIgnoreCertificateErrors` + */ + export type SetIgnoreCertificateErrorsRequest = { + /** + * If true, all certificate errors will be ignored. + */ + ignore: boolean; + }; + /** + * Enable/disable whether all certificate errors should be ignored. + * @response `Security.setIgnoreCertificateErrors` + */ + export type SetIgnoreCertificateErrorsResponse = {}; + /** + * Handles a certificate error that fired a certificateError event. + * @request `Security.handleCertificateError` + */ + export type HandleCertificateErrorRequest = { + /** + * The ID of the event. + */ + eventId: number; + /** + * The action to take on the certificate error. + */ + action: CertificateErrorAction; + }; + /** + * Handles a certificate error that fired a certificateError event. + * @response `Security.handleCertificateError` + */ + export type HandleCertificateErrorResponse = {}; + /** + * Enable/disable overriding certificate errors. If enabled, all certificate error events need to + * be handled by the DevTools client and should be answered with `handleCertificateError` commands. + * @request `Security.setOverrideCertificateErrors` + */ + export type SetOverrideCertificateErrorsRequest = { + /** + * If true, certificate errors will be overridden. + */ + override: boolean; + }; + /** + * Enable/disable overriding certificate errors. If enabled, all certificate error events need to + * be handled by the DevTools client and should be answered with `handleCertificateError` commands. + * @response `Security.setOverrideCertificateErrors` + */ + export type SetOverrideCertificateErrorsResponse = {}; + } + export namespace ServiceWorker { + export type RegistrationID = string; + /** + * ServiceWorker registration. + */ + export type ServiceWorkerRegistration = { + registrationId: RegistrationID; + scopeURL: string; + isDeleted: boolean; + }; + export type ServiceWorkerVersionRunningStatus = "stopped" | "starting" | "running" | "stopping"; + export type ServiceWorkerVersionStatus = + | "new" + | "installing" + | "installed" + | "activating" + | "activated" + | "redundant"; + /** + * ServiceWorker version. + */ + export type ServiceWorkerVersion = { + versionId: string; + registrationId: RegistrationID; + scriptURL: string; + runningStatus: ServiceWorkerVersionRunningStatus; + status: ServiceWorkerVersionStatus; + /** + * The Last-Modified header value of the main script. + */ + scriptLastModified?: number | undefined; + /** + * The time at which the response headers of the main script were received from the server. + * For cached script it is the last time the cache entry was validated. + */ + scriptResponseTime?: number | undefined; + controlledClients?: Target.TargetID[] | undefined; + targetId?: Target.TargetID | undefined; + }; + /** + * ServiceWorker error message. + */ + export type ServiceWorkerErrorMessage = { + errorMessage: string; + registrationId: RegistrationID; + versionId: string; + sourceURL: string; + lineNumber: number; + columnNumber: number; + }; + /** + * undefined + * @event `ServiceWorker.workerErrorReported` + */ + export type WorkerErrorReportedEvent = { + errorMessage: ServiceWorkerErrorMessage; + }; + /** + * undefined + * @event `ServiceWorker.workerRegistrationUpdated` + */ + export type WorkerRegistrationUpdatedEvent = { + registrations: ServiceWorkerRegistration[]; + }; + /** + * undefined + * @event `ServiceWorker.workerVersionUpdated` + */ + export type WorkerVersionUpdatedEvent = { + versions: ServiceWorkerVersion[]; + }; + /** + * undefined + * @request `ServiceWorker.deliverPushMessage` + */ + export type DeliverPushMessageRequest = { + origin: string; + registrationId: RegistrationID; + data: string; + }; + /** + * undefined + * @response `ServiceWorker.deliverPushMessage` + */ + export type DeliverPushMessageResponse = {}; + /** + * undefined + * @request `ServiceWorker.disable` + */ + export type DisableRequest = {}; + /** + * undefined + * @response `ServiceWorker.disable` + */ + export type DisableResponse = {}; + /** + * undefined + * @request `ServiceWorker.dispatchSyncEvent` + */ + export type DispatchSyncEventRequest = { + origin: string; + registrationId: RegistrationID; + tag: string; + lastChance: boolean; + }; + /** + * undefined + * @response `ServiceWorker.dispatchSyncEvent` + */ + export type DispatchSyncEventResponse = {}; + /** + * undefined + * @request `ServiceWorker.dispatchPeriodicSyncEvent` + */ + export type DispatchPeriodicSyncEventRequest = { + origin: string; + registrationId: RegistrationID; + tag: string; + }; + /** + * undefined + * @response `ServiceWorker.dispatchPeriodicSyncEvent` + */ + export type DispatchPeriodicSyncEventResponse = {}; + /** + * undefined + * @request `ServiceWorker.enable` + */ + export type EnableRequest = {}; + /** + * undefined + * @response `ServiceWorker.enable` + */ + export type EnableResponse = {}; + /** + * undefined + * @request `ServiceWorker.inspectWorker` + */ + export type InspectWorkerRequest = { + versionId: string; + }; + /** + * undefined + * @response `ServiceWorker.inspectWorker` + */ + export type InspectWorkerResponse = {}; + /** + * undefined + * @request `ServiceWorker.setForceUpdateOnPageLoad` + */ + export type SetForceUpdateOnPageLoadRequest = { + forceUpdateOnPageLoad: boolean; + }; + /** + * undefined + * @response `ServiceWorker.setForceUpdateOnPageLoad` + */ + export type SetForceUpdateOnPageLoadResponse = {}; + /** + * undefined + * @request `ServiceWorker.skipWaiting` + */ + export type SkipWaitingRequest = { + scopeURL: string; + }; + /** + * undefined + * @response `ServiceWorker.skipWaiting` + */ + export type SkipWaitingResponse = {}; + /** + * undefined + * @request `ServiceWorker.startWorker` + */ + export type StartWorkerRequest = { + scopeURL: string; + }; + /** + * undefined + * @response `ServiceWorker.startWorker` + */ + export type StartWorkerResponse = {}; + /** + * undefined + * @request `ServiceWorker.stopAllWorkers` + */ + export type StopAllWorkersRequest = {}; + /** + * undefined + * @response `ServiceWorker.stopAllWorkers` + */ + export type StopAllWorkersResponse = {}; + /** + * undefined + * @request `ServiceWorker.stopWorker` + */ + export type StopWorkerRequest = { + versionId: string; + }; + /** + * undefined + * @response `ServiceWorker.stopWorker` + */ + export type StopWorkerResponse = {}; + /** + * undefined + * @request `ServiceWorker.unregister` + */ + export type UnregisterRequest = { + scopeURL: string; + }; + /** + * undefined + * @response `ServiceWorker.unregister` + */ + export type UnregisterResponse = {}; + /** + * undefined + * @request `ServiceWorker.updateRegistration` + */ + export type UpdateRegistrationRequest = { + scopeURL: string; + }; + /** + * undefined + * @response `ServiceWorker.updateRegistration` + */ + export type UpdateRegistrationResponse = {}; + } + export namespace Storage { + export type SerializedStorageKey = string; + /** + * Enum of possible storage types. + */ + export type StorageType = + | "appcache" + | "cookies" + | "file_systems" + | "indexeddb" + | "local_storage" + | "shader_cache" + | "websql" + | "service_workers" + | "cache_storage" + | "interest_groups" + | "shared_storage" + | "storage_buckets" + | "all" + | "other"; + /** + * Usage for a storage type. + */ + export type UsageForType = { + /** + * Name of storage type. + */ + storageType: StorageType; + /** + * Storage usage (bytes). + */ + usage: number; + }; + /** + * Pair of issuer origin and number of available (signed, but not used) Trust + * Tokens from that issuer. + */ + export type TrustTokens = { + issuerOrigin: string; + count: number; + }; + /** + * Enum of interest group access types. + */ + export type InterestGroupAccessType = "join" | "leave" | "update" | "loaded" | "bid" | "win"; + /** + * Ad advertising element inside an interest group. + */ + export type InterestGroupAd = { + renderUrl: string; + metadata?: string | undefined; + }; + /** + * The full details of an interest group. + */ + export type InterestGroupDetails = { + ownerOrigin: string; + name: string; + expirationTime: Network.TimeSinceEpoch; + joiningOrigin: string; + biddingUrl?: string | undefined; + biddingWasmHelperUrl?: string | undefined; + updateUrl?: string | undefined; + trustedBiddingSignalsUrl?: string | undefined; + trustedBiddingSignalsKeys: string[]; + userBiddingSignals?: string | undefined; + ads: InterestGroupAd[]; + adComponents: InterestGroupAd[]; + }; + /** + * Enum of shared storage access types. + */ + export type SharedStorageAccessType = + | "documentAddModule" + | "documentSelectURL" + | "documentRun" + | "documentSet" + | "documentAppend" + | "documentDelete" + | "documentClear" + | "workletSet" + | "workletAppend" + | "workletDelete" + | "workletClear" + | "workletGet" + | "workletKeys" + | "workletEntries" + | "workletLength" + | "workletRemainingBudget"; + /** + * Struct for a single key-value pair in an origin's shared storage. + */ + export type SharedStorageEntry = { + key: string; + value: string; + }; + /** + * Details for an origin's shared storage. + */ + export type SharedStorageMetadata = { + creationTime: Network.TimeSinceEpoch; + length: number; + remainingBudget: number; + }; + /** + * Pair of reporting metadata details for a candidate URL for `selectURL()`. + */ + export type SharedStorageReportingMetadata = { + eventType: string; + reportingUrl: string; + }; + /** + * Bundles a candidate URL with its reporting metadata. + */ + export type SharedStorageUrlWithMetadata = { + /** + * Spec of candidate URL. + */ + url: string; + /** + * Any associated reporting metadata. + */ + reportingMetadata: SharedStorageReportingMetadata[]; + }; + /** + * Bundles the parameters for shared storage access events whose + * presence/absence can vary according to SharedStorageAccessType. + */ + export type SharedStorageAccessParams = { + /** + * Spec of the module script URL. + * Present only for SharedStorageAccessType.documentAddModule. + */ + scriptSourceUrl?: string | undefined; + /** + * Name of the registered operation to be run. + * Present only for SharedStorageAccessType.documentRun and + * SharedStorageAccessType.documentSelectURL. + */ + operationName?: string | undefined; + /** + * The operation's serialized data in bytes (converted to a string). + * Present only for SharedStorageAccessType.documentRun and + * SharedStorageAccessType.documentSelectURL. + */ + serializedData?: string | undefined; + /** + * Array of candidate URLs' specs, along with any associated metadata. + * Present only for SharedStorageAccessType.documentSelectURL. + */ + urlsWithMetadata?: SharedStorageUrlWithMetadata[] | undefined; + /** + * Key for a specific entry in an origin's shared storage. + * Present only for SharedStorageAccessType.documentSet, + * SharedStorageAccessType.documentAppend, + * SharedStorageAccessType.documentDelete, + * SharedStorageAccessType.workletSet, + * SharedStorageAccessType.workletAppend, + * SharedStorageAccessType.workletDelete, and + * SharedStorageAccessType.workletGet. + */ + key?: string | undefined; + /** + * Value for a specific entry in an origin's shared storage. + * Present only for SharedStorageAccessType.documentSet, + * SharedStorageAccessType.documentAppend, + * SharedStorageAccessType.workletSet, and + * SharedStorageAccessType.workletAppend. + */ + value?: string | undefined; + /** + * Whether or not to set an entry for a key if that key is already present. + * Present only for SharedStorageAccessType.documentSet and + * SharedStorageAccessType.workletSet. + */ + ignoreIfPresent?: boolean | undefined; + }; + export type StorageBucketsDurability = "relaxed" | "strict"; + export type StorageBucket = { + storageKey: SerializedStorageKey; + /** + * If not specified, it is the default bucket of the storageKey. + */ + name?: string | undefined; + }; + export type StorageBucketInfo = { + bucket: StorageBucket; + id: string; + expiration: Network.TimeSinceEpoch; + /** + * Storage quota (bytes). + */ + quota: number; + persistent: boolean; + durability: StorageBucketsDurability; + }; + export type AttributionReportingSourceType = "navigation" | "event"; + export type UnsignedInt64AsBase10 = string; + export type UnsignedInt128AsBase16 = string; + export type SignedInt64AsBase10 = string; + export type AttributionReportingFilterDataEntry = { + key: string; + values: string[]; + }; + export type AttributionReportingAggregationKeysEntry = { + key: string; + value: UnsignedInt128AsBase16; + }; + export type AttributionReportingSourceRegistration = { + time: Network.TimeSinceEpoch; + /** + * duration in seconds + */ + expiry?: number | undefined; + /** + * duration in seconds + */ + eventReportWindow?: number | undefined; + /** + * duration in seconds + */ + aggregatableReportWindow?: number | undefined; + type: AttributionReportingSourceType; + sourceOrigin: string; + reportingOrigin: string; + destinationSites: string[]; + eventId: UnsignedInt64AsBase10; + priority: SignedInt64AsBase10; + filterData: AttributionReportingFilterDataEntry[]; + aggregationKeys: AttributionReportingAggregationKeysEntry[]; + debugKey?: UnsignedInt64AsBase10 | undefined; + }; + export type AttributionReportingSourceRegistrationResult = + | "success" + | "internalError" + | "insufficientSourceCapacity" + | "insufficientUniqueDestinationCapacity" + | "excessiveReportingOrigins" + | "prohibitedByBrowserPolicy" + | "successNoised" + | "destinationReportingLimitReached" + | "destinationGlobalLimitReached" + | "destinationBothLimitsReached" + | "reportingOriginsPerSiteLimitReached" + | "exceedsMaxChannelCapacity"; + /** + * A cache's contents have been modified. + * @event `Storage.cacheStorageContentUpdated` + */ + export type CacheStorageContentUpdatedEvent = { + /** + * Origin to update. + */ + origin: string; + /** + * Storage key to update. + */ + storageKey: string; + /** + * Storage bucket to update. + */ + bucketId: string; + /** + * Name of cache in origin. + */ + cacheName: string; + }; + /** + * A cache has been added/deleted. + * @event `Storage.cacheStorageListUpdated` + */ + export type CacheStorageListUpdatedEvent = { + /** + * Origin to update. + */ + origin: string; + /** + * Storage key to update. + */ + storageKey: string; + /** + * Storage bucket to update. + */ + bucketId: string; + }; + /** + * The origin's IndexedDB object store has been modified. + * @event `Storage.indexedDBContentUpdated` + */ + export type IndexedDBContentUpdatedEvent = { + /** + * Origin to update. + */ + origin: string; + /** + * Storage key to update. + */ + storageKey: string; + /** + * Storage bucket to update. + */ + bucketId: string; + /** + * Database to update. + */ + databaseName: string; + /** + * ObjectStore to update. + */ + objectStoreName: string; + }; + /** + * The origin's IndexedDB database list has been modified. + * @event `Storage.indexedDBListUpdated` + */ + export type IndexedDBListUpdatedEvent = { + /** + * Origin to update. + */ + origin: string; + /** + * Storage key to update. + */ + storageKey: string; + /** + * Storage bucket to update. + */ + bucketId: string; + }; + /** + * One of the interest groups was accessed by the associated page. + * @event `Storage.interestGroupAccessed` + */ + export type InterestGroupAccessedEvent = { + accessTime: Network.TimeSinceEpoch; + type: InterestGroupAccessType; + ownerOrigin: string; + name: string; + }; + /** + * Shared storage was accessed by the associated page. + * The following parameters are included in all events. + * @event `Storage.sharedStorageAccessed` + */ + export type SharedStorageAccessedEvent = { + /** + * Time of the access. + */ + accessTime: Network.TimeSinceEpoch; + /** + * Enum value indicating the Shared Storage API method invoked. + */ + type: SharedStorageAccessType; + /** + * DevTools Frame Token for the primary frame tree's root. + */ + mainFrameId: Page.FrameId; + /** + * Serialized origin for the context that invoked the Shared Storage API. + */ + ownerOrigin: string; + /** + * The sub-parameters warapped by `params` are all optional and their + * presence/absence depends on `type`. + */ + params: SharedStorageAccessParams; + }; + /** + * undefined + * @event `Storage.storageBucketCreatedOrUpdated` + */ + export type StorageBucketCreatedOrUpdatedEvent = { + bucketInfo: StorageBucketInfo; + }; + /** + * undefined + * @event `Storage.storageBucketDeleted` + */ + export type StorageBucketDeletedEvent = { + bucketId: string; + }; + /** + * TODO(crbug.com/1458532): Add other Attribution Reporting events, e.g. + * trigger registration. + * @event `Storage.attributionReportingSourceRegistered` + */ + export type AttributionReportingSourceRegisteredEvent = { + registration: AttributionReportingSourceRegistration; + result: AttributionReportingSourceRegistrationResult; + }; + /** + * Returns a storage key given a frame id. + * @request `Storage.getStorageKeyForFrame` + */ + export type GetStorageKeyForFrameRequest = { + frameId: Page.FrameId; + }; + /** + * Returns a storage key given a frame id. + * @response `Storage.getStorageKeyForFrame` + */ + export type GetStorageKeyForFrameResponse = { + storageKey: SerializedStorageKey; + }; + /** + * Clears storage for origin. + * @request `Storage.clearDataForOrigin` + */ + export type ClearDataForOriginRequest = { + /** + * Security origin. + */ + origin: string; + /** + * Comma separated list of StorageType to clear. + */ + storageTypes: string; + }; + /** + * Clears storage for origin. + * @response `Storage.clearDataForOrigin` + */ + export type ClearDataForOriginResponse = {}; + /** + * Clears storage for storage key. + * @request `Storage.clearDataForStorageKey` + */ + export type ClearDataForStorageKeyRequest = { + /** + * Storage key. + */ + storageKey: string; + /** + * Comma separated list of StorageType to clear. + */ + storageTypes: string; + }; + /** + * Clears storage for storage key. + * @response `Storage.clearDataForStorageKey` + */ + export type ClearDataForStorageKeyResponse = {}; + /** + * Returns all browser cookies. + * @request `Storage.getCookies` + */ + export type GetCookiesRequest = { + /** + * Browser context to use when called on the browser endpoint. + */ + browserContextId?: Browser.BrowserContextID | undefined; + }; + /** + * Returns all browser cookies. + * @response `Storage.getCookies` + */ + export type GetCookiesResponse = { + /** + * Array of cookie objects. + */ + cookies: Network.Cookie[]; + }; + /** + * Sets given cookies. + * @request `Storage.setCookies` + */ + export type SetCookiesRequest = { + /** + * Cookies to be set. + */ + cookies: Network.CookieParam[]; + /** + * Browser context to use when called on the browser endpoint. + */ + browserContextId?: Browser.BrowserContextID | undefined; + }; + /** + * Sets given cookies. + * @response `Storage.setCookies` + */ + export type SetCookiesResponse = {}; + /** + * Clears cookies. + * @request `Storage.clearCookies` + */ + export type ClearCookiesRequest = { + /** + * Browser context to use when called on the browser endpoint. + */ + browserContextId?: Browser.BrowserContextID | undefined; + }; + /** + * Clears cookies. + * @response `Storage.clearCookies` + */ + export type ClearCookiesResponse = {}; + /** + * Returns usage and quota in bytes. + * @request `Storage.getUsageAndQuota` + */ + export type GetUsageAndQuotaRequest = { + /** + * Security origin. + */ + origin: string; + }; + /** + * Returns usage and quota in bytes. + * @response `Storage.getUsageAndQuota` + */ + export type GetUsageAndQuotaResponse = { + /** + * Storage usage (bytes). + */ + usage: number; + /** + * Storage quota (bytes). + */ + quota: number; + /** + * Whether or not the origin has an active storage quota override + */ + overrideActive: boolean; + /** + * Storage usage per type (bytes). + */ + usageBreakdown: UsageForType[]; + }; + /** + * Override quota for the specified origin + * @request `Storage.overrideQuotaForOrigin` + */ + export type OverrideQuotaForOriginRequest = { + /** + * Security origin. + */ + origin: string; + /** + * The quota size (in bytes) to override the original quota with. + * If this is called multiple times, the overridden quota will be equal to + * the quotaSize provided in the final call. If this is called without + * specifying a quotaSize, the quota will be reset to the default value for + * the specified origin. If this is called multiple times with different + * origins, the override will be maintained for each origin until it is + * disabled (called without a quotaSize). + */ + quotaSize?: number | undefined; + }; + /** + * Override quota for the specified origin + * @response `Storage.overrideQuotaForOrigin` + */ + export type OverrideQuotaForOriginResponse = {}; + /** + * Registers origin to be notified when an update occurs to its cache storage list. + * @request `Storage.trackCacheStorageForOrigin` + */ + export type TrackCacheStorageForOriginRequest = { + /** + * Security origin. + */ + origin: string; + }; + /** + * Registers origin to be notified when an update occurs to its cache storage list. + * @response `Storage.trackCacheStorageForOrigin` + */ + export type TrackCacheStorageForOriginResponse = {}; + /** + * Registers storage key to be notified when an update occurs to its cache storage list. + * @request `Storage.trackCacheStorageForStorageKey` + */ + export type TrackCacheStorageForStorageKeyRequest = { + /** + * Storage key. + */ + storageKey: string; + }; + /** + * Registers storage key to be notified when an update occurs to its cache storage list. + * @response `Storage.trackCacheStorageForStorageKey` + */ + export type TrackCacheStorageForStorageKeyResponse = {}; + /** + * Registers origin to be notified when an update occurs to its IndexedDB. + * @request `Storage.trackIndexedDBForOrigin` + */ + export type TrackIndexedDBForOriginRequest = { + /** + * Security origin. + */ + origin: string; + }; + /** + * Registers origin to be notified when an update occurs to its IndexedDB. + * @response `Storage.trackIndexedDBForOrigin` + */ + export type TrackIndexedDBForOriginResponse = {}; + /** + * Registers storage key to be notified when an update occurs to its IndexedDB. + * @request `Storage.trackIndexedDBForStorageKey` + */ + export type TrackIndexedDBForStorageKeyRequest = { + /** + * Storage key. + */ + storageKey: string; + }; + /** + * Registers storage key to be notified when an update occurs to its IndexedDB. + * @response `Storage.trackIndexedDBForStorageKey` + */ + export type TrackIndexedDBForStorageKeyResponse = {}; + /** + * Unregisters origin from receiving notifications for cache storage. + * @request `Storage.untrackCacheStorageForOrigin` + */ + export type UntrackCacheStorageForOriginRequest = { + /** + * Security origin. + */ + origin: string; + }; + /** + * Unregisters origin from receiving notifications for cache storage. + * @response `Storage.untrackCacheStorageForOrigin` + */ + export type UntrackCacheStorageForOriginResponse = {}; + /** + * Unregisters storage key from receiving notifications for cache storage. + * @request `Storage.untrackCacheStorageForStorageKey` + */ + export type UntrackCacheStorageForStorageKeyRequest = { + /** + * Storage key. + */ + storageKey: string; + }; + /** + * Unregisters storage key from receiving notifications for cache storage. + * @response `Storage.untrackCacheStorageForStorageKey` + */ + export type UntrackCacheStorageForStorageKeyResponse = {}; + /** + * Unregisters origin from receiving notifications for IndexedDB. + * @request `Storage.untrackIndexedDBForOrigin` + */ + export type UntrackIndexedDBForOriginRequest = { + /** + * Security origin. + */ + origin: string; + }; + /** + * Unregisters origin from receiving notifications for IndexedDB. + * @response `Storage.untrackIndexedDBForOrigin` + */ + export type UntrackIndexedDBForOriginResponse = {}; + /** + * Unregisters storage key from receiving notifications for IndexedDB. + * @request `Storage.untrackIndexedDBForStorageKey` + */ + export type UntrackIndexedDBForStorageKeyRequest = { + /** + * Storage key. + */ + storageKey: string; + }; + /** + * Unregisters storage key from receiving notifications for IndexedDB. + * @response `Storage.untrackIndexedDBForStorageKey` + */ + export type UntrackIndexedDBForStorageKeyResponse = {}; + /** + * Returns the number of stored Trust Tokens per issuer for the + * current browsing context. + * @request `Storage.getTrustTokens` + */ + export type GetTrustTokensRequest = {}; + /** + * Returns the number of stored Trust Tokens per issuer for the + * current browsing context. + * @response `Storage.getTrustTokens` + */ + export type GetTrustTokensResponse = { + tokens: TrustTokens[]; + }; + /** + * Removes all Trust Tokens issued by the provided issuerOrigin. + * Leaves other stored data, including the issuer's Redemption Records, intact. + * @request `Storage.clearTrustTokens` + */ + export type ClearTrustTokensRequest = { + issuerOrigin: string; + }; + /** + * Removes all Trust Tokens issued by the provided issuerOrigin. + * Leaves other stored data, including the issuer's Redemption Records, intact. + * @response `Storage.clearTrustTokens` + */ + export type ClearTrustTokensResponse = { + /** + * True if any tokens were deleted, false otherwise. + */ + didDeleteTokens: boolean; + }; + /** + * Gets details for a named interest group. + * @request `Storage.getInterestGroupDetails` + */ + export type GetInterestGroupDetailsRequest = { + ownerOrigin: string; + name: string; + }; + /** + * Gets details for a named interest group. + * @response `Storage.getInterestGroupDetails` + */ + export type GetInterestGroupDetailsResponse = { + details: InterestGroupDetails; + }; + /** + * Enables/Disables issuing of interestGroupAccessed events. + * @request `Storage.setInterestGroupTracking` + */ + export type SetInterestGroupTrackingRequest = { + enable: boolean; + }; + /** + * Enables/Disables issuing of interestGroupAccessed events. + * @response `Storage.setInterestGroupTracking` + */ + export type SetInterestGroupTrackingResponse = {}; + /** + * Gets metadata for an origin's shared storage. + * @request `Storage.getSharedStorageMetadata` + */ + export type GetSharedStorageMetadataRequest = { + ownerOrigin: string; + }; + /** + * Gets metadata for an origin's shared storage. + * @response `Storage.getSharedStorageMetadata` + */ + export type GetSharedStorageMetadataResponse = { + metadata: SharedStorageMetadata; + }; + /** + * Gets the entries in an given origin's shared storage. + * @request `Storage.getSharedStorageEntries` + */ + export type GetSharedStorageEntriesRequest = { + ownerOrigin: string; + }; + /** + * Gets the entries in an given origin's shared storage. + * @response `Storage.getSharedStorageEntries` + */ + export type GetSharedStorageEntriesResponse = { + entries: SharedStorageEntry[]; + }; + /** + * Sets entry with `key` and `value` for a given origin's shared storage. + * @request `Storage.setSharedStorageEntry` + */ + export type SetSharedStorageEntryRequest = { + ownerOrigin: string; + key: string; + value: string; + /** + * If `ignoreIfPresent` is included and true, then only sets the entry if + * `key` doesn't already exist. + */ + ignoreIfPresent?: boolean | undefined; + }; + /** + * Sets entry with `key` and `value` for a given origin's shared storage. + * @response `Storage.setSharedStorageEntry` + */ + export type SetSharedStorageEntryResponse = {}; + /** + * Deletes entry for `key` (if it exists) for a given origin's shared storage. + * @request `Storage.deleteSharedStorageEntry` + */ + export type DeleteSharedStorageEntryRequest = { + ownerOrigin: string; + key: string; + }; + /** + * Deletes entry for `key` (if it exists) for a given origin's shared storage. + * @response `Storage.deleteSharedStorageEntry` + */ + export type DeleteSharedStorageEntryResponse = {}; + /** + * Clears all entries for a given origin's shared storage. + * @request `Storage.clearSharedStorageEntries` + */ + export type ClearSharedStorageEntriesRequest = { + ownerOrigin: string; + }; + /** + * Clears all entries for a given origin's shared storage. + * @response `Storage.clearSharedStorageEntries` + */ + export type ClearSharedStorageEntriesResponse = {}; + /** + * Resets the budget for `ownerOrigin` by clearing all budget withdrawals. + * @request `Storage.resetSharedStorageBudget` + */ + export type ResetSharedStorageBudgetRequest = { + ownerOrigin: string; + }; + /** + * Resets the budget for `ownerOrigin` by clearing all budget withdrawals. + * @response `Storage.resetSharedStorageBudget` + */ + export type ResetSharedStorageBudgetResponse = {}; + /** + * Enables/disables issuing of sharedStorageAccessed events. + * @request `Storage.setSharedStorageTracking` + */ + export type SetSharedStorageTrackingRequest = { + enable: boolean; + }; + /** + * Enables/disables issuing of sharedStorageAccessed events. + * @response `Storage.setSharedStorageTracking` + */ + export type SetSharedStorageTrackingResponse = {}; + /** + * Set tracking for a storage key's buckets. + * @request `Storage.setStorageBucketTracking` + */ + export type SetStorageBucketTrackingRequest = { + storageKey: string; + enable: boolean; + }; + /** + * Set tracking for a storage key's buckets. + * @response `Storage.setStorageBucketTracking` + */ + export type SetStorageBucketTrackingResponse = {}; + /** + * Deletes the Storage Bucket with the given storage key and bucket name. + * @request `Storage.deleteStorageBucket` + */ + export type DeleteStorageBucketRequest = { + bucket: StorageBucket; + }; + /** + * Deletes the Storage Bucket with the given storage key and bucket name. + * @response `Storage.deleteStorageBucket` + */ + export type DeleteStorageBucketResponse = {}; + /** + * Deletes state for sites identified as potential bounce trackers, immediately. + * @request `Storage.runBounceTrackingMitigations` + */ + export type RunBounceTrackingMitigationsRequest = {}; + /** + * Deletes state for sites identified as potential bounce trackers, immediately. + * @response `Storage.runBounceTrackingMitigations` + */ + export type RunBounceTrackingMitigationsResponse = { + deletedSites: string[]; + }; + /** + * https://wicg.github.io/attribution-reporting-api/ + * @request `Storage.setAttributionReportingLocalTestingMode` + */ + export type SetAttributionReportingLocalTestingModeRequest = { + /** + * If enabled, noise is suppressed and reports are sent immediately. + */ + enabled: boolean; + }; + /** + * https://wicg.github.io/attribution-reporting-api/ + * @response `Storage.setAttributionReportingLocalTestingMode` + */ + export type SetAttributionReportingLocalTestingModeResponse = {}; + /** + * Enables/disables issuing of Attribution Reporting events. + * @request `Storage.setAttributionReportingTracking` + */ + export type SetAttributionReportingTrackingRequest = { + enable: boolean; + }; + /** + * Enables/disables issuing of Attribution Reporting events. + * @response `Storage.setAttributionReportingTracking` + */ + export type SetAttributionReportingTrackingResponse = {}; + } + export namespace SystemInfo { + /** + * Describes a single graphics processor (GPU). + */ + export type GPUDevice = { + /** + * PCI ID of the GPU vendor, if available; 0 otherwise. + */ + vendorId: number; + /** + * PCI ID of the GPU device, if available; 0 otherwise. + */ + deviceId: number; + /** + * Sub sys ID of the GPU, only available on Windows. + */ + subSysId?: number | undefined; + /** + * Revision of the GPU, only available on Windows. + */ + revision?: number | undefined; + /** + * String description of the GPU vendor, if the PCI ID is not available. + */ + vendorString: string; + /** + * String description of the GPU device, if the PCI ID is not available. + */ + deviceString: string; + /** + * String description of the GPU driver vendor. + */ + driverVendor: string; + /** + * String description of the GPU driver version. + */ + driverVersion: string; + }; + /** + * Describes the width and height dimensions of an entity. + */ + export type Size = { + /** + * Width in pixels. + */ + width: number; + /** + * Height in pixels. + */ + height: number; + }; + /** + * Describes a supported video decoding profile with its associated minimum and + * maximum resolutions. + */ + export type VideoDecodeAcceleratorCapability = { + /** + * Video codec profile that is supported, e.g. VP9 Profile 2. + */ + profile: string; + /** + * Maximum video dimensions in pixels supported for this |profile|. + */ + maxResolution: Size; + /** + * Minimum video dimensions in pixels supported for this |profile|. + */ + minResolution: Size; + }; + /** + * Describes a supported video encoding profile with its associated maximum + * resolution and maximum framerate. + */ + export type VideoEncodeAcceleratorCapability = { + /** + * Video codec profile that is supported, e.g H264 Main. + */ + profile: string; + /** + * Maximum video dimensions in pixels supported for this |profile|. + */ + maxResolution: Size; + /** + * Maximum encoding framerate in frames per second supported for this + * |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, + * 24000/1001 fps, etc. + */ + maxFramerateNumerator: number; + maxFramerateDenominator: number; + }; + /** + * YUV subsampling type of the pixels of a given image. + */ + export type SubsamplingFormat = "yuv420" | "yuv422" | "yuv444"; + /** + * Image format of a given image. + */ + export type ImageType = "jpeg" | "webp" | "unknown"; + /** + * Describes a supported image decoding profile with its associated minimum and + * maximum resolutions and subsampling. + */ + export type ImageDecodeAcceleratorCapability = { + /** + * Image coded, e.g. Jpeg. + */ + imageType: ImageType; + /** + * Maximum supported dimensions of the image in pixels. + */ + maxDimensions: Size; + /** + * Minimum supported dimensions of the image in pixels. + */ + minDimensions: Size; + /** + * Optional array of supported subsampling formats, e.g. 4:2:0, if known. + */ + subsamplings: SubsamplingFormat[]; + }; + /** + * Provides information about the GPU(s) on the system. + */ + export type GPUInfo = { + /** + * The graphics devices on the system. Element 0 is the primary GPU. + */ + devices: GPUDevice[]; + /** + * An optional dictionary of additional GPU related attributes. + */ + auxAttributes?: Record<string, unknown> | undefined; + /** + * An optional dictionary of graphics features and their status. + */ + featureStatus?: Record<string, unknown> | undefined; + /** + * An optional array of GPU driver bug workarounds. + */ + driverBugWorkarounds: string[]; + /** + * Supported accelerated video decoding capabilities. + */ + videoDecoding: VideoDecodeAcceleratorCapability[]; + /** + * Supported accelerated video encoding capabilities. + */ + videoEncoding: VideoEncodeAcceleratorCapability[]; + /** + * Supported accelerated image decoding capabilities. + */ + imageDecoding: ImageDecodeAcceleratorCapability[]; + }; + /** + * Represents process info. + */ + export type ProcessInfo = { + /** + * Specifies process type. + */ + type: string; + /** + * Specifies process id. + */ + id: number; + /** + * Specifies cumulative CPU usage in seconds across all threads of the + * process since the process start. + */ + cpuTime: number; + }; + /** + * Returns information about the system. + * @request `SystemInfo.getInfo` + */ + export type GetInfoRequest = {}; + /** + * Returns information about the system. + * @response `SystemInfo.getInfo` + */ + export type GetInfoResponse = { + /** + * Information about the GPUs on the system. + */ + gpu: GPUInfo; + /** + * A platform-dependent description of the model of the machine. On Mac OS, this is, for + * example, 'MacBookPro'. Will be the empty string if not supported. + */ + modelName: string; + /** + * A platform-dependent description of the version of the machine. On Mac OS, this is, for + * example, '10.1'. Will be the empty string if not supported. + */ + modelVersion: string; + /** + * The command line string used to launch the browser. Will be the empty string if not + * supported. + */ + commandLine: string; + }; + /** + * Returns information about the feature state. + * @request `SystemInfo.getFeatureState` + */ + export type GetFeatureStateRequest = { + featureState: string; + }; + /** + * Returns information about the feature state. + * @response `SystemInfo.getFeatureState` + */ + export type GetFeatureStateResponse = { + featureEnabled: boolean; + }; + /** + * Returns information about all running processes. + * @request `SystemInfo.getProcessInfo` + */ + export type GetProcessInfoRequest = {}; + /** + * Returns information about all running processes. + * @response `SystemInfo.getProcessInfo` + */ + export type GetProcessInfoResponse = { + /** + * An array of process info blocks. + */ + processInfo: ProcessInfo[]; + }; + } + export namespace Target { + export type TargetID = string; + /** + * Unique identifier of attached debugging session. + */ + export type SessionID = string; + export type TargetInfo = { + targetId: TargetID; + type: string; + title: string; + url: string; + /** + * Whether the target has an attached client. + */ + attached: boolean; + /** + * Opener target Id + */ + openerId?: TargetID | undefined; + /** + * Whether the target has access to the originating window. + */ + canAccessOpener: boolean; + /** + * Frame id of originating window (is only set if target has an opener). + */ + openerFrameId?: Page.FrameId | undefined; + browserContextId?: Browser.BrowserContextID | undefined; + /** + * Provides additional details for specific target types. For example, for + * the type of "page", this may be set to "portal" or "prerender". + */ + subtype?: string | undefined; + }; + /** + * A filter used by target query/discovery/auto-attach operations. + */ + export type FilterEntry = { + /** + * If set, causes exclusion of mathcing targets from the list. + */ + exclude?: boolean | undefined; + /** + * If not present, matches any type. + */ + type?: string | undefined; + }; + /** + * The entries in TargetFilter are matched sequentially against targets and + * the first entry that matches determines if the target is included or not, + * depending on the value of `exclude` field in the entry. + * If filter is not specified, the one assumed is + * [{type: "browser", exclude: true}, {type: "tab", exclude: true}, {}] + * (i.e. include everything but `browser` and `tab`). + */ + export type TargetFilter = FilterEntry[]; + export type RemoteLocation = { + host: string; + port: number; + }; + /** + * Issued when attached to target because of auto-attach or `attachToTarget` command. + * @event `Target.attachedToTarget` + */ + export type AttachedToTargetEvent = { + /** + * Identifier assigned to the session used to send/receive messages. + */ + sessionId: SessionID; + targetInfo: TargetInfo; + waitingForDebugger: boolean; + }; + /** + * Issued when detached from target for any reason (including `detachFromTarget` command). Can be + * issued multiple times per target if multiple sessions have been attached to it. + * @event `Target.detachedFromTarget` + */ + export type DetachedFromTargetEvent = { + /** + * Detached session identifier. + */ + sessionId: SessionID; + /** + * Deprecated. + */ + targetId?: TargetID | undefined; + }; + /** + * Notifies about a new protocol message received from the session (as reported in + * `attachedToTarget` event). + * @event `Target.receivedMessageFromTarget` + */ + export type ReceivedMessageFromTargetEvent = { + /** + * Identifier of a session which sends a message. + */ + sessionId: SessionID; + message: string; + /** + * Deprecated. + */ + targetId?: TargetID | undefined; + }; + /** + * Issued when a possible inspection target is created. + * @event `Target.targetCreated` + */ + export type TargetCreatedEvent = { + targetInfo: TargetInfo; + }; + /** + * Issued when a target is destroyed. + * @event `Target.targetDestroyed` + */ + export type TargetDestroyedEvent = { + targetId: TargetID; + }; + /** + * Issued when a target has crashed. + * @event `Target.targetCrashed` + */ + export type TargetCrashedEvent = { + targetId: TargetID; + /** + * Termination status type. + */ + status: string; + /** + * Termination error code. + */ + errorCode: number; + }; + /** + * Issued when some information about a target has changed. This only happens between + * `targetCreated` and `targetDestroyed`. + * @event `Target.targetInfoChanged` + */ + export type TargetInfoChangedEvent = { + targetInfo: TargetInfo; + }; + /** + * Activates (focuses) the target. + * @request `Target.activateTarget` + */ + export type ActivateTargetRequest = { + targetId: TargetID; + }; + /** + * Activates (focuses) the target. + * @response `Target.activateTarget` + */ + export type ActivateTargetResponse = {}; + /** + * Attaches to the target with given id. + * @request `Target.attachToTarget` + */ + export type AttachToTargetRequest = { + targetId: TargetID; + /** + * Enables "flat" access to the session via specifying sessionId attribute in the commands. + * We plan to make this the default, deprecate non-flattened mode, + * and eventually retire it. See crbug.com/991325. + */ + flatten?: boolean | undefined; + }; + /** + * Attaches to the target with given id. + * @response `Target.attachToTarget` + */ + export type AttachToTargetResponse = { + /** + * Id assigned to the session. + */ + sessionId: SessionID; + }; + /** + * Attaches to the browser target, only uses flat sessionId mode. + * @request `Target.attachToBrowserTarget` + */ + export type AttachToBrowserTargetRequest = {}; + /** + * Attaches to the browser target, only uses flat sessionId mode. + * @response `Target.attachToBrowserTarget` + */ + export type AttachToBrowserTargetResponse = { + /** + * Id assigned to the session. + */ + sessionId: SessionID; + }; + /** + * Closes the target. If the target is a page that gets closed too. + * @request `Target.closeTarget` + */ + export type CloseTargetRequest = { + targetId: TargetID; + }; + /** + * Closes the target. If the target is a page that gets closed too. + * @response `Target.closeTarget` + */ + export type CloseTargetResponse = { + /** + * Always set to true. If an error occurs, the response indicates protocol error. + */ + success: boolean; + }; + /** + * Inject object to the target's main frame that provides a communication + * channel with browser target. + * + * Injected object will be available as `window[bindingName]`. + * + * The object has the follwing API: + * - `binding.send(json)` - a method to send messages over the remote debugging protocol + * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. + * @request `Target.exposeDevToolsProtocol` + */ + export type ExposeDevToolsProtocolRequest = { + targetId: TargetID; + /** + * Binding name, 'cdp' if not specified. + */ + bindingName?: string | undefined; + }; + /** + * Inject object to the target's main frame that provides a communication + * channel with browser target. + * + * Injected object will be available as `window[bindingName]`. + * + * The object has the follwing API: + * - `binding.send(json)` - a method to send messages over the remote debugging protocol + * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. + * @response `Target.exposeDevToolsProtocol` + */ + export type ExposeDevToolsProtocolResponse = {}; + /** + * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than + * one. + * @request `Target.createBrowserContext` + */ + export type CreateBrowserContextRequest = { + /** + * If specified, disposes this context when debugging session disconnects. + */ + disposeOnDetach?: boolean | undefined; + /** + * Proxy server, similar to the one passed to --proxy-server + */ + proxyServer?: string | undefined; + /** + * Proxy bypass list, similar to the one passed to --proxy-bypass-list + */ + proxyBypassList?: string | undefined; + /** + * An optional list of origins to grant unlimited cross-origin access to. + * Parts of the URL other than those constituting origin are ignored. + */ + originsWithUniversalNetworkAccess?: string[] | undefined; + }; + /** + * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than + * one. + * @response `Target.createBrowserContext` + */ + export type CreateBrowserContextResponse = { + /** + * The id of the context created. + */ + browserContextId: Browser.BrowserContextID; + }; + /** + * Returns all browser contexts created with `Target.createBrowserContext` method. + * @request `Target.getBrowserContexts` + */ + export type GetBrowserContextsRequest = {}; + /** + * Returns all browser contexts created with `Target.createBrowserContext` method. + * @response `Target.getBrowserContexts` + */ + export type GetBrowserContextsResponse = { + /** + * An array of browser context ids. + */ + browserContextIds: Browser.BrowserContextID[]; + }; + /** + * Creates a new page. + * @request `Target.createTarget` + */ + export type CreateTargetRequest = { + /** + * The initial URL the page will be navigated to. An empty string indicates about:blank. + */ + url: string; + /** + * Frame width in DIP (headless chrome only). + */ + width?: number | undefined; + /** + * Frame height in DIP (headless chrome only). + */ + height?: number | undefined; + /** + * The browser context to create the page in. + */ + browserContextId?: Browser.BrowserContextID | undefined; + /** + * Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, + * not supported on MacOS yet, false by default). + */ + enableBeginFrameControl?: boolean | undefined; + /** + * Whether to create a new Window or Tab (chrome-only, false by default). + */ + newWindow?: boolean | undefined; + /** + * Whether to create the target in background or foreground (chrome-only, + * false by default). + */ + background?: boolean | undefined; + /** + * Whether to create the target of type "tab". + */ + forTab?: boolean | undefined; + }; + /** + * Creates a new page. + * @response `Target.createTarget` + */ + export type CreateTargetResponse = { + /** + * The id of the page opened. + */ + targetId: TargetID; + }; + /** + * Detaches session with given id. + * @request `Target.detachFromTarget` + */ + export type DetachFromTargetRequest = { + /** + * Session to detach. + */ + sessionId?: SessionID | undefined; + /** + * Deprecated. + */ + targetId?: TargetID | undefined; + }; + /** + * Detaches session with given id. + * @response `Target.detachFromTarget` + */ + export type DetachFromTargetResponse = {}; + /** + * Deletes a BrowserContext. All the belonging pages will be closed without calling their + * beforeunload hooks. + * @request `Target.disposeBrowserContext` + */ + export type DisposeBrowserContextRequest = { + browserContextId: Browser.BrowserContextID; + }; + /** + * Deletes a BrowserContext. All the belonging pages will be closed without calling their + * beforeunload hooks. + * @response `Target.disposeBrowserContext` + */ + export type DisposeBrowserContextResponse = {}; + /** + * Returns information about a target. + * @request `Target.getTargetInfo` + */ + export type GetTargetInfoRequest = { + targetId?: TargetID | undefined; + }; + /** + * Returns information about a target. + * @response `Target.getTargetInfo` + */ + export type GetTargetInfoResponse = { + targetInfo: TargetInfo; + }; + /** + * Retrieves a list of available targets. + * @request `Target.getTargets` + */ + export type GetTargetsRequest = { + /** + * Only targets matching filter will be reported. If filter is not specified + * and target discovery is currently enabled, a filter used for target discovery + * is used for consistency. + */ + filter?: TargetFilter | undefined; + }; + /** + * Retrieves a list of available targets. + * @response `Target.getTargets` + */ + export type GetTargetsResponse = { + /** + * The list of targets. + */ + targetInfos: TargetInfo[]; + }; + /** + * Sends protocol message over session with given id. + * Consider using flat mode instead; see commands attachToTarget, setAutoAttach, + * and crbug.com/991325. + * @request `Target.sendMessageToTarget` + */ + export type SendMessageToTargetRequest = { + message: string; + /** + * Identifier of the session. + */ + sessionId?: SessionID | undefined; + /** + * Deprecated. + */ + targetId?: TargetID | undefined; + }; + /** + * Sends protocol message over session with given id. + * Consider using flat mode instead; see commands attachToTarget, setAutoAttach, + * and crbug.com/991325. + * @response `Target.sendMessageToTarget` + */ + export type SendMessageToTargetResponse = {}; + /** + * Controls whether to automatically attach to new targets which are considered to be related to + * this one. When turned on, attaches to all existing related targets as well. When turned off, + * automatically detaches from all currently attached targets. + * This also clears all targets added by `autoAttachRelated` from the list of targets to watch + * for creation of related targets. + * @request `Target.setAutoAttach` + */ + export type SetAutoAttachRequest = { + /** + * Whether to auto-attach to related targets. + */ + autoAttach: boolean; + /** + * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` + * to run paused targets. + */ + waitForDebuggerOnStart: boolean; + /** + * Enables "flat" access to the session via specifying sessionId attribute in the commands. + * We plan to make this the default, deprecate non-flattened mode, + * and eventually retire it. See crbug.com/991325. + */ + flatten?: boolean | undefined; + /** + * Only targets matching filter will be attached. + */ + filter?: TargetFilter | undefined; + }; + /** + * Controls whether to automatically attach to new targets which are considered to be related to + * this one. When turned on, attaches to all existing related targets as well. When turned off, + * automatically detaches from all currently attached targets. + * This also clears all targets added by `autoAttachRelated` from the list of targets to watch + * for creation of related targets. + * @response `Target.setAutoAttach` + */ + export type SetAutoAttachResponse = {}; + /** + * Adds the specified target to the list of targets that will be monitored for any related target + * creation (such as child frames, child workers and new versions of service worker) and reported + * through `attachedToTarget`. The specified target is also auto-attached. + * This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent + * `setAutoAttach`. Only available at the Browser target. + * @request `Target.autoAttachRelated` + */ + export type AutoAttachRelatedRequest = { + targetId: TargetID; + /** + * Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` + * to run paused targets. + */ + waitForDebuggerOnStart: boolean; + /** + * Only targets matching filter will be attached. + */ + filter?: TargetFilter | undefined; + }; + /** + * Adds the specified target to the list of targets that will be monitored for any related target + * creation (such as child frames, child workers and new versions of service worker) and reported + * through `attachedToTarget`. The specified target is also auto-attached. + * This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent + * `setAutoAttach`. Only available at the Browser target. + * @response `Target.autoAttachRelated` + */ + export type AutoAttachRelatedResponse = {}; + /** + * Controls whether to discover available targets and notify via + * `targetCreated/targetInfoChanged/targetDestroyed` events. + * @request `Target.setDiscoverTargets` + */ + export type SetDiscoverTargetsRequest = { + /** + * Whether to discover available targets. + */ + discover: boolean; + /** + * Only targets matching filter will be attached. If `discover` is false, + * `filter` must be omitted or empty. + */ + filter?: TargetFilter | undefined; + }; + /** + * Controls whether to discover available targets and notify via + * `targetCreated/targetInfoChanged/targetDestroyed` events. + * @response `Target.setDiscoverTargets` + */ + export type SetDiscoverTargetsResponse = {}; + /** + * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to + * `true`. + * @request `Target.setRemoteLocations` + */ + export type SetRemoteLocationsRequest = { + /** + * List of remote locations. + */ + locations: RemoteLocation[]; + }; + /** + * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to + * `true`. + * @response `Target.setRemoteLocations` + */ + export type SetRemoteLocationsResponse = {}; + } + export namespace Tethering { + /** + * Informs that port was successfully bound and got a specified connection id. + * @event `Tethering.accepted` + */ + export type AcceptedEvent = { + /** + * Port number that was successfully bound. + */ + port: number; + /** + * Connection id to be used. + */ + connectionId: string; + }; + /** + * Request browser port binding. + * @request `Tethering.bind` + */ + export type BindRequest = { + /** + * Port number to bind. + */ + port: number; + }; + /** + * Request browser port binding. + * @response `Tethering.bind` + */ + export type BindResponse = {}; + /** + * Request browser port unbinding. + * @request `Tethering.unbind` + */ + export type UnbindRequest = { + /** + * Port number to unbind. + */ + port: number; + }; + /** + * Request browser port unbinding. + * @response `Tethering.unbind` + */ + export type UnbindResponse = {}; + } + export namespace Tracing { + /** + * Configuration for memory dump. Used only when "memory-infra" category is enabled. + */ + export type MemoryDumpConfig = Record<string, unknown>; + export type TraceConfig = { + /** + * Controls how the trace buffer stores data. + */ + recordMode?: "recordUntilFull" | "recordContinuously" | "recordAsMuchAsPossible" | "echoToConsole" | undefined; + /** + * Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value + * of 200 MB would be used. + */ + traceBufferSizeInKb?: number | undefined; + /** + * Turns on JavaScript stack sampling. + */ + enableSampling?: boolean | undefined; + /** + * Turns on system tracing. + */ + enableSystrace?: boolean | undefined; + /** + * Turns on argument filter. + */ + enableArgumentFilter?: boolean | undefined; + /** + * Included category filters. + */ + includedCategories?: string[] | undefined; + /** + * Excluded category filters. + */ + excludedCategories?: string[] | undefined; + /** + * Configuration to synthesize the delays in tracing. + */ + syntheticDelays?: string[] | undefined; + /** + * Configuration for memory dump triggers. Used only when "memory-infra" category is enabled. + */ + memoryDumpConfig?: MemoryDumpConfig | undefined; + }; + /** + * Data format of a trace. Can be either the legacy JSON format or the + * protocol buffer format. Note that the JSON format will be deprecated soon. + */ + export type StreamFormat = "json" | "proto"; + /** + * Compression type to use for traces returned via streams. + */ + export type StreamCompression = "none" | "gzip"; + /** + * Details exposed when memory request explicitly declared. + * Keep consistent with memory_dump_request_args.h and + * memory_instrumentation.mojom + */ + export type MemoryDumpLevelOfDetail = "background" | "light" | "detailed"; + /** + * Backend type to use for tracing. `chrome` uses the Chrome-integrated + * tracing service and is supported on all platforms. `system` is only + * supported on Chrome OS and uses the Perfetto system tracing service. + * `auto` chooses `system` when the perfettoConfig provided to Tracing.start + * specifies at least one non-Chrome data source; otherwise uses `chrome`. + */ + export type TracingBackend = "auto" | "chrome" | "system"; + /** + * undefined + * @event `Tracing.bufferUsage` + */ + export type BufferUsageEvent = { + /** + * A number in range [0..1] that indicates the used size of event buffer as a fraction of its + * total size. + */ + percentFull?: number | undefined; + /** + * An approximate number of events in the trace log. + */ + eventCount?: number | undefined; + /** + * A number in range [0..1] that indicates the used size of event buffer as a fraction of its + * total size. + */ + value?: number | undefined; + }; + /** + * Contains a bucket of collected trace events. When tracing is stopped collected events will be + * sent as a sequence of dataCollected events followed by tracingComplete event. + * @event `Tracing.dataCollected` + */ + export type DataCollectedEvent = { + value: Record<string, unknown>[]; + }; + /** + * Signals that tracing is stopped and there is no trace buffers pending flush, all data were + * delivered via dataCollected events. + * @event `Tracing.tracingComplete` + */ + export type TracingCompleteEvent = { + /** + * Indicates whether some trace data is known to have been lost, e.g. because the trace ring + * buffer wrapped around. + */ + dataLossOccurred: boolean; + /** + * A handle of the stream that holds resulting trace data. + */ + stream?: IO.StreamHandle | undefined; + /** + * Trace data format of returned stream. + */ + traceFormat?: StreamFormat | undefined; + /** + * Compression format of returned stream. + */ + streamCompression?: StreamCompression | undefined; + }; + /** + * Stop trace events collection. + * @request `Tracing.end` + */ + export type EndRequest = {}; + /** + * Stop trace events collection. + * @response `Tracing.end` + */ + export type EndResponse = {}; + /** + * Gets supported tracing categories. + * @request `Tracing.getCategories` + */ + export type GetCategoriesRequest = {}; + /** + * Gets supported tracing categories. + * @response `Tracing.getCategories` + */ + export type GetCategoriesResponse = { + /** + * A list of supported tracing categories. + */ + categories: string[]; + }; + /** + * Record a clock sync marker in the trace. + * @request `Tracing.recordClockSyncMarker` + */ + export type RecordClockSyncMarkerRequest = { + /** + * The ID of this clock sync marker + */ + syncId: string; + }; + /** + * Record a clock sync marker in the trace. + * @response `Tracing.recordClockSyncMarker` + */ + export type RecordClockSyncMarkerResponse = {}; + /** + * Request a global memory dump. + * @request `Tracing.requestMemoryDump` + */ + export type RequestMemoryDumpRequest = { + /** + * Enables more deterministic results by forcing garbage collection + */ + deterministic?: boolean | undefined; + /** + * Specifies level of details in memory dump. Defaults to "detailed". + */ + levelOfDetail?: MemoryDumpLevelOfDetail | undefined; + }; + /** + * Request a global memory dump. + * @response `Tracing.requestMemoryDump` + */ + export type RequestMemoryDumpResponse = { + /** + * GUID of the resulting global memory dump. + */ + dumpGuid: string; + /** + * True iff the global memory dump succeeded. + */ + success: boolean; + }; + /** + * Start trace events collection. + * @request `Tracing.start` + */ + export type StartRequest = { + /** + * Category/tag filter + */ + categories?: string | undefined; + /** + * Tracing options + */ + options?: string | undefined; + /** + * If set, the agent will issue bufferUsage events at this interval, specified in milliseconds + */ + bufferUsageReportingInterval?: number | undefined; + /** + * Whether to report trace events as series of dataCollected events or to save trace to a + * stream (defaults to `ReportEvents`). + */ + transferMode?: "ReportEvents" | "ReturnAsStream" | undefined; + /** + * Trace data format to use. This only applies when using `ReturnAsStream` + * transfer mode (defaults to `json`). + */ + streamFormat?: StreamFormat | undefined; + /** + * Compression format to use. This only applies when using `ReturnAsStream` + * transfer mode (defaults to `none`) + */ + streamCompression?: StreamCompression | undefined; + traceConfig?: TraceConfig | undefined; + /** + * Base64-encoded serialized perfetto.protos.TraceConfig protobuf message + * When specified, the parameters `categories`, `options`, `traceConfig` + * are ignored. (Encoded as a base64 string when passed over JSON) + */ + perfettoConfig?: string | undefined; + /** + * Backend type (defaults to `auto`) + */ + tracingBackend?: TracingBackend | undefined; + }; + /** + * Start trace events collection. + * @response `Tracing.start` + */ + export type StartResponse = {}; + } + export namespace WebAudio { + /** + * An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API + */ + export type GraphObjectId = string; + /** + * Enum of BaseAudioContext types + */ + export type ContextType = "realtime" | "offline"; + /** + * Enum of AudioContextState from the spec + */ + export type ContextState = "suspended" | "running" | "closed"; + /** + * Enum of AudioNode types + */ + export type NodeType = string; + /** + * Enum of AudioNode::ChannelCountMode from the spec + */ + export type ChannelCountMode = "clamped-max" | "explicit" | "max"; + /** + * Enum of AudioNode::ChannelInterpretation from the spec + */ + export type ChannelInterpretation = "discrete" | "speakers"; + /** + * Enum of AudioParam types + */ + export type ParamType = string; + /** + * Enum of AudioParam::AutomationRate from the spec + */ + export type AutomationRate = "a-rate" | "k-rate"; + /** + * Fields in AudioContext that change in real-time. + */ + export type ContextRealtimeData = { + /** + * The current context time in second in BaseAudioContext. + */ + currentTime: number; + /** + * The time spent on rendering graph divided by render quantum duration, + * and multiplied by 100. 100 means the audio renderer reached the full + * capacity and glitch may occur. + */ + renderCapacity: number; + /** + * A running mean of callback interval. + */ + callbackIntervalMean: number; + /** + * A running variance of callback interval. + */ + callbackIntervalVariance: number; + }; + /** + * Protocol object for BaseAudioContext + */ + export type BaseAudioContext = { + contextId: GraphObjectId; + contextType: ContextType; + contextState: ContextState; + realtimeData?: ContextRealtimeData | undefined; + /** + * Platform-dependent callback buffer size. + */ + callbackBufferSize: number; + /** + * Number of output channels supported by audio hardware in use. + */ + maxOutputChannelCount: number; + /** + * Context sample rate. + */ + sampleRate: number; + }; + /** + * Protocol object for AudioListener + */ + export type AudioListener = { + listenerId: GraphObjectId; + contextId: GraphObjectId; + }; + /** + * Protocol object for AudioNode + */ + export type AudioNode = { + nodeId: GraphObjectId; + contextId: GraphObjectId; + nodeType: NodeType; + numberOfInputs: number; + numberOfOutputs: number; + channelCount: number; + channelCountMode: ChannelCountMode; + channelInterpretation: ChannelInterpretation; + }; + /** + * Protocol object for AudioParam + */ + export type AudioParam = { + paramId: GraphObjectId; + nodeId: GraphObjectId; + contextId: GraphObjectId; + paramType: ParamType; + rate: AutomationRate; + defaultValue: number; + minValue: number; + maxValue: number; + }; + /** + * Notifies that a new BaseAudioContext has been created. + * @event `WebAudio.contextCreated` + */ + export type ContextCreatedEvent = { + context: BaseAudioContext; + }; + /** + * Notifies that an existing BaseAudioContext will be destroyed. + * @event `WebAudio.contextWillBeDestroyed` + */ + export type ContextWillBeDestroyedEvent = { + contextId: GraphObjectId; + }; + /** + * Notifies that existing BaseAudioContext has changed some properties (id stays the same).. + * @event `WebAudio.contextChanged` + */ + export type ContextChangedEvent = { + context: BaseAudioContext; + }; + /** + * Notifies that the construction of an AudioListener has finished. + * @event `WebAudio.audioListenerCreated` + */ + export type AudioListenerCreatedEvent = { + listener: AudioListener; + }; + /** + * Notifies that a new AudioListener has been created. + * @event `WebAudio.audioListenerWillBeDestroyed` + */ + export type AudioListenerWillBeDestroyedEvent = { + contextId: GraphObjectId; + listenerId: GraphObjectId; + }; + /** + * Notifies that a new AudioNode has been created. + * @event `WebAudio.audioNodeCreated` + */ + export type AudioNodeCreatedEvent = { + node: AudioNode; + }; + /** + * Notifies that an existing AudioNode has been destroyed. + * @event `WebAudio.audioNodeWillBeDestroyed` + */ + export type AudioNodeWillBeDestroyedEvent = { + contextId: GraphObjectId; + nodeId: GraphObjectId; + }; + /** + * Notifies that a new AudioParam has been created. + * @event `WebAudio.audioParamCreated` + */ + export type AudioParamCreatedEvent = { + param: AudioParam; + }; + /** + * Notifies that an existing AudioParam has been destroyed. + * @event `WebAudio.audioParamWillBeDestroyed` + */ + export type AudioParamWillBeDestroyedEvent = { + contextId: GraphObjectId; + nodeId: GraphObjectId; + paramId: GraphObjectId; + }; + /** + * Notifies that two AudioNodes are connected. + * @event `WebAudio.nodesConnected` + */ + export type NodesConnectedEvent = { + contextId: GraphObjectId; + sourceId: GraphObjectId; + destinationId: GraphObjectId; + sourceOutputIndex?: number | undefined; + destinationInputIndex?: number | undefined; + }; + /** + * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. + * @event `WebAudio.nodesDisconnected` + */ + export type NodesDisconnectedEvent = { + contextId: GraphObjectId; + sourceId: GraphObjectId; + destinationId: GraphObjectId; + sourceOutputIndex?: number | undefined; + destinationInputIndex?: number | undefined; + }; + /** + * Notifies that an AudioNode is connected to an AudioParam. + * @event `WebAudio.nodeParamConnected` + */ + export type NodeParamConnectedEvent = { + contextId: GraphObjectId; + sourceId: GraphObjectId; + destinationId: GraphObjectId; + sourceOutputIndex?: number | undefined; + }; + /** + * Notifies that an AudioNode is disconnected to an AudioParam. + * @event `WebAudio.nodeParamDisconnected` + */ + export type NodeParamDisconnectedEvent = { + contextId: GraphObjectId; + sourceId: GraphObjectId; + destinationId: GraphObjectId; + sourceOutputIndex?: number | undefined; + }; + /** + * Enables the WebAudio domain and starts sending context lifetime events. + * @request `WebAudio.enable` + */ + export type EnableRequest = {}; + /** + * Enables the WebAudio domain and starts sending context lifetime events. + * @response `WebAudio.enable` + */ + export type EnableResponse = {}; + /** + * Disables the WebAudio domain. + * @request `WebAudio.disable` + */ + export type DisableRequest = {}; + /** + * Disables the WebAudio domain. + * @response `WebAudio.disable` + */ + export type DisableResponse = {}; + /** + * Fetch the realtime data from the registered contexts. + * @request `WebAudio.getRealtimeData` + */ + export type GetRealtimeDataRequest = { + contextId: GraphObjectId; + }; + /** + * Fetch the realtime data from the registered contexts. + * @response `WebAudio.getRealtimeData` + */ + export type GetRealtimeDataResponse = { + realtimeData: ContextRealtimeData; + }; + } + export namespace WebAuthn { + export type AuthenticatorId = string; + export type AuthenticatorProtocol = "u2f" | "ctap2"; + export type Ctap2Version = "ctap2_0" | "ctap2_1"; + export type AuthenticatorTransport = "usb" | "nfc" | "ble" | "cable" | "internal"; + export type VirtualAuthenticatorOptions = { + protocol: AuthenticatorProtocol; + /** + * Defaults to ctap2_0. Ignored if |protocol| == u2f. + */ + ctap2Version?: Ctap2Version | undefined; + transport: AuthenticatorTransport; + /** + * Defaults to false. + */ + hasResidentKey?: boolean | undefined; + /** + * Defaults to false. + */ + hasUserVerification?: boolean | undefined; + /** + * If set to true, the authenticator will support the largeBlob extension. + * https://w3c.github.io/webauthn#largeBlob + * Defaults to false. + */ + hasLargeBlob?: boolean | undefined; + /** + * If set to true, the authenticator will support the credBlob extension. + * https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension + * Defaults to false. + */ + hasCredBlob?: boolean | undefined; + /** + * If set to true, the authenticator will support the minPinLength extension. + * https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension + * Defaults to false. + */ + hasMinPinLength?: boolean | undefined; + /** + * If set to true, the authenticator will support the prf extension. + * https://w3c.github.io/webauthn/#prf-extension + * Defaults to false. + */ + hasPrf?: boolean | undefined; + /** + * If set to true, tests of user presence will succeed immediately. + * Otherwise, they will not be resolved. Defaults to true. + */ + automaticPresenceSimulation?: boolean | undefined; + /** + * Sets whether User Verification succeeds or fails for an authenticator. + * Defaults to false. + */ + isUserVerified?: boolean | undefined; + }; + export type Credential = { + credentialId: string; + isResidentCredential: boolean; + /** + * Relying Party ID the credential is scoped to. Must be set when adding a + * credential. + */ + rpId?: string | undefined; + /** + * The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON) + */ + privateKey: string; + /** + * An opaque byte sequence with a maximum size of 64 bytes mapping the + * credential to a specific user. (Encoded as a base64 string when passed over JSON) + */ + userHandle?: string | undefined; + /** + * Signature counter. This is incremented by one for each successful + * assertion. + * See https://w3c.github.io/webauthn/#signature-counter + */ + signCount: number; + /** + * The large blob associated with the credential. + * See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON) + */ + largeBlob?: string | undefined; + }; + /** + * Triggered when a credential is added to an authenticator. + * @event `WebAuthn.credentialAdded` + */ + export type CredentialAddedEvent = { + authenticatorId: AuthenticatorId; + credential: Credential; + }; + /** + * Triggered when a credential is used in a webauthn assertion. + * @event `WebAuthn.credentialAsserted` + */ + export type CredentialAssertedEvent = { + authenticatorId: AuthenticatorId; + credential: Credential; + }; + /** + * Enable the WebAuthn domain and start intercepting credential storage and + * retrieval with a virtual authenticator. + * @request `WebAuthn.enable` + */ + export type EnableRequest = { + /** + * Whether to enable the WebAuthn user interface. Enabling the UI is + * recommended for debugging and demo purposes, as it is closer to the real + * experience. Disabling the UI is recommended for automated testing. + * Supported at the embedder's discretion if UI is available. + * Defaults to false. + */ + enableUI?: boolean | undefined; + }; + /** + * Enable the WebAuthn domain and start intercepting credential storage and + * retrieval with a virtual authenticator. + * @response `WebAuthn.enable` + */ + export type EnableResponse = {}; + /** + * Disable the WebAuthn domain. + * @request `WebAuthn.disable` + */ + export type DisableRequest = {}; + /** + * Disable the WebAuthn domain. + * @response `WebAuthn.disable` + */ + export type DisableResponse = {}; + /** + * Creates and adds a virtual authenticator. + * @request `WebAuthn.addVirtualAuthenticator` + */ + export type AddVirtualAuthenticatorRequest = { + options: VirtualAuthenticatorOptions; + }; + /** + * Creates and adds a virtual authenticator. + * @response `WebAuthn.addVirtualAuthenticator` + */ + export type AddVirtualAuthenticatorResponse = { + authenticatorId: AuthenticatorId; + }; + /** + * Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present. + * @request `WebAuthn.setResponseOverrideBits` + */ + export type SetResponseOverrideBitsRequest = { + authenticatorId: AuthenticatorId; + /** + * If isBogusSignature is set, overrides the signature in the authenticator response to be zero. + * Defaults to false. + */ + isBogusSignature?: boolean | undefined; + /** + * If isBadUV is set, overrides the UV bit in the flags in the authenticator response to + * be zero. Defaults to false. + */ + isBadUV?: boolean | undefined; + /** + * If isBadUP is set, overrides the UP bit in the flags in the authenticator response to + * be zero. Defaults to false. + */ + isBadUP?: boolean | undefined; + }; + /** + * Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present. + * @response `WebAuthn.setResponseOverrideBits` + */ + export type SetResponseOverrideBitsResponse = {}; + /** + * Removes the given authenticator. + * @request `WebAuthn.removeVirtualAuthenticator` + */ + export type RemoveVirtualAuthenticatorRequest = { + authenticatorId: AuthenticatorId; + }; + /** + * Removes the given authenticator. + * @response `WebAuthn.removeVirtualAuthenticator` + */ + export type RemoveVirtualAuthenticatorResponse = {}; + /** + * Adds the credential to the specified authenticator. + * @request `WebAuthn.addCredential` + */ + export type AddCredentialRequest = { + authenticatorId: AuthenticatorId; + credential: Credential; + }; + /** + * Adds the credential to the specified authenticator. + * @response `WebAuthn.addCredential` + */ + export type AddCredentialResponse = {}; + /** + * Returns a single credential stored in the given virtual authenticator that + * matches the credential ID. + * @request `WebAuthn.getCredential` + */ + export type GetCredentialRequest = { + authenticatorId: AuthenticatorId; + credentialId: string; + }; + /** + * Returns a single credential stored in the given virtual authenticator that + * matches the credential ID. + * @response `WebAuthn.getCredential` + */ + export type GetCredentialResponse = { + credential: Credential; + }; + /** + * Returns all the credentials stored in the given virtual authenticator. + * @request `WebAuthn.getCredentials` + */ + export type GetCredentialsRequest = { + authenticatorId: AuthenticatorId; + }; + /** + * Returns all the credentials stored in the given virtual authenticator. + * @response `WebAuthn.getCredentials` + */ + export type GetCredentialsResponse = { + credentials: Credential[]; + }; + /** + * Removes a credential from the authenticator. + * @request `WebAuthn.removeCredential` + */ + export type RemoveCredentialRequest = { + authenticatorId: AuthenticatorId; + credentialId: string; + }; + /** + * Removes a credential from the authenticator. + * @response `WebAuthn.removeCredential` + */ + export type RemoveCredentialResponse = {}; + /** + * Clears all the credentials from the specified device. + * @request `WebAuthn.clearCredentials` + */ + export type ClearCredentialsRequest = { + authenticatorId: AuthenticatorId; + }; + /** + * Clears all the credentials from the specified device. + * @response `WebAuthn.clearCredentials` + */ + export type ClearCredentialsResponse = {}; + /** + * Sets whether User Verification succeeds or fails for an authenticator. + * The default is true. + * @request `WebAuthn.setUserVerified` + */ + export type SetUserVerifiedRequest = { + authenticatorId: AuthenticatorId; + isUserVerified: boolean; + }; + /** + * Sets whether User Verification succeeds or fails for an authenticator. + * The default is true. + * @response `WebAuthn.setUserVerified` + */ + export type SetUserVerifiedResponse = {}; + /** + * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. + * The default is true. + * @request `WebAuthn.setAutomaticPresenceSimulation` + */ + export type SetAutomaticPresenceSimulationRequest = { + authenticatorId: AuthenticatorId; + enabled: boolean; + }; + /** + * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. + * The default is true. + * @response `WebAuthn.setAutomaticPresenceSimulation` + */ + export type SetAutomaticPresenceSimulationResponse = {}; + } + export type EventMap = { + "Accessibility.loadComplete": Accessibility.LoadCompleteEvent; + "Accessibility.nodesUpdated": Accessibility.NodesUpdatedEvent; + "Animation.animationCanceled": Animation.AnimationCanceledEvent; + "Animation.animationCreated": Animation.AnimationCreatedEvent; + "Animation.animationStarted": Animation.AnimationStartedEvent; + "Audits.issueAdded": Audits.IssueAddedEvent; + "BackgroundService.recordingStateChanged": BackgroundService.RecordingStateChangedEvent; + "BackgroundService.backgroundServiceEventReceived": BackgroundService.BackgroundServiceEventReceivedEvent; + "Browser.downloadWillBegin": Browser.DownloadWillBeginEvent; + "Browser.downloadProgress": Browser.DownloadProgressEvent; + "Cast.sinksUpdated": Cast.SinksUpdatedEvent; + "Cast.issueUpdated": Cast.IssueUpdatedEvent; + "CSS.fontsUpdated": CSS.FontsUpdatedEvent; + "CSS.mediaQueryResultChanged": CSS.MediaQueryResultChangedEvent; + "CSS.styleSheetAdded": CSS.StyleSheetAddedEvent; + "CSS.styleSheetChanged": CSS.StyleSheetChangedEvent; + "CSS.styleSheetRemoved": CSS.StyleSheetRemovedEvent; + "Database.addDatabase": Database.AddDatabaseEvent; + "DeviceAccess.deviceRequestPrompted": DeviceAccess.DeviceRequestPromptedEvent; + "DOM.attributeModified": DOM.AttributeModifiedEvent; + "DOM.attributeRemoved": DOM.AttributeRemovedEvent; + "DOM.characterDataModified": DOM.CharacterDataModifiedEvent; + "DOM.childNodeCountUpdated": DOM.ChildNodeCountUpdatedEvent; + "DOM.childNodeInserted": DOM.ChildNodeInsertedEvent; + "DOM.childNodeRemoved": DOM.ChildNodeRemovedEvent; + "DOM.distributedNodesUpdated": DOM.DistributedNodesUpdatedEvent; + "DOM.documentUpdated": DOM.DocumentUpdatedEvent; + "DOM.inlineStyleInvalidated": DOM.InlineStyleInvalidatedEvent; + "DOM.pseudoElementAdded": DOM.PseudoElementAddedEvent; + "DOM.topLayerElementsUpdated": DOM.TopLayerElementsUpdatedEvent; + "DOM.pseudoElementRemoved": DOM.PseudoElementRemovedEvent; + "DOM.setChildNodes": DOM.SetChildNodesEvent; + "DOM.shadowRootPopped": DOM.ShadowRootPoppedEvent; + "DOM.shadowRootPushed": DOM.ShadowRootPushedEvent; + "DOMStorage.domStorageItemAdded": DOMStorage.DomStorageItemAddedEvent; + "DOMStorage.domStorageItemRemoved": DOMStorage.DomStorageItemRemovedEvent; + "DOMStorage.domStorageItemUpdated": DOMStorage.DomStorageItemUpdatedEvent; + "DOMStorage.domStorageItemsCleared": DOMStorage.DomStorageItemsClearedEvent; + "Emulation.virtualTimeBudgetExpired": Emulation.VirtualTimeBudgetExpiredEvent; + "FedCm.dialogShown": FedCm.DialogShownEvent; + "Fetch.requestPaused": Fetch.RequestPausedEvent; + "Fetch.authRequired": Fetch.AuthRequiredEvent; + "Input.dragIntercepted": Input.DragInterceptedEvent; + "LayerTree.layerPainted": LayerTree.LayerPaintedEvent; + "LayerTree.layerTreeDidChange": LayerTree.LayerTreeDidChangeEvent; + "Log.entryAdded": Log.EntryAddedEvent; + "Media.playerPropertiesChanged": Media.PlayerPropertiesChangedEvent; + "Media.playerEventsAdded": Media.PlayerEventsAddedEvent; + "Media.playerMessagesLogged": Media.PlayerMessagesLoggedEvent; + "Media.playerErrorsRaised": Media.PlayerErrorsRaisedEvent; + "Media.playersCreated": Media.PlayersCreatedEvent; + "Overlay.inspectNodeRequested": Overlay.InspectNodeRequestedEvent; + "Overlay.nodeHighlightRequested": Overlay.NodeHighlightRequestedEvent; + "Overlay.screenshotRequested": Overlay.ScreenshotRequestedEvent; + "Overlay.inspectModeCanceled": Overlay.InspectModeCanceledEvent; + "Page.domContentEventFired": Page.DomContentEventFiredEvent; + "Page.fileChooserOpened": Page.FileChooserOpenedEvent; + "Page.frameAttached": Page.FrameAttachedEvent; + "Page.frameClearedScheduledNavigation": Page.FrameClearedScheduledNavigationEvent; + "Page.frameDetached": Page.FrameDetachedEvent; + "Page.frameNavigated": Page.FrameNavigatedEvent; + "Page.documentOpened": Page.DocumentOpenedEvent; + "Page.frameResized": Page.FrameResizedEvent; + "Page.frameRequestedNavigation": Page.FrameRequestedNavigationEvent; + "Page.frameScheduledNavigation": Page.FrameScheduledNavigationEvent; + "Page.frameStartedLoading": Page.FrameStartedLoadingEvent; + "Page.frameStoppedLoading": Page.FrameStoppedLoadingEvent; + "Page.downloadWillBegin": Page.DownloadWillBeginEvent; + "Page.downloadProgress": Page.DownloadProgressEvent; + "Page.interstitialHidden": Page.InterstitialHiddenEvent; + "Page.interstitialShown": Page.InterstitialShownEvent; + "Page.javascriptDialogClosed": Page.JavascriptDialogClosedEvent; + "Page.javascriptDialogOpening": Page.JavascriptDialogOpeningEvent; + "Page.lifecycleEvent": Page.LifecycleEventEvent; + "Page.backForwardCacheNotUsed": Page.BackForwardCacheNotUsedEvent; + "Page.loadEventFired": Page.LoadEventFiredEvent; + "Page.navigatedWithinDocument": Page.NavigatedWithinDocumentEvent; + "Page.screencastFrame": Page.ScreencastFrameEvent; + "Page.screencastVisibilityChanged": Page.ScreencastVisibilityChangedEvent; + "Page.windowOpen": Page.WindowOpenEvent; + "Page.compilationCacheProduced": Page.CompilationCacheProducedEvent; + "Performance.metrics": Performance.MetricsEvent; + "PerformanceTimeline.timelineEventAdded": PerformanceTimeline.TimelineEventAddedEvent; + "Preload.ruleSetUpdated": Preload.RuleSetUpdatedEvent; + "Preload.ruleSetRemoved": Preload.RuleSetRemovedEvent; + "Preload.prerenderAttemptCompleted": Preload.PrerenderAttemptCompletedEvent; + "Preload.preloadEnabledStateUpdated": Preload.PreloadEnabledStateUpdatedEvent; + "Preload.prefetchStatusUpdated": Preload.PrefetchStatusUpdatedEvent; + "Preload.prerenderStatusUpdated": Preload.PrerenderStatusUpdatedEvent; + "Preload.preloadingAttemptSourcesUpdated": Preload.PreloadingAttemptSourcesUpdatedEvent; + "Security.certificateError": Security.CertificateErrorEvent; + "Security.visibleSecurityStateChanged": Security.VisibleSecurityStateChangedEvent; + "Security.securityStateChanged": Security.SecurityStateChangedEvent; + "ServiceWorker.workerErrorReported": ServiceWorker.WorkerErrorReportedEvent; + "ServiceWorker.workerRegistrationUpdated": ServiceWorker.WorkerRegistrationUpdatedEvent; + "ServiceWorker.workerVersionUpdated": ServiceWorker.WorkerVersionUpdatedEvent; + "Storage.cacheStorageContentUpdated": Storage.CacheStorageContentUpdatedEvent; + "Storage.cacheStorageListUpdated": Storage.CacheStorageListUpdatedEvent; + "Storage.indexedDBContentUpdated": Storage.IndexedDBContentUpdatedEvent; + "Storage.indexedDBListUpdated": Storage.IndexedDBListUpdatedEvent; + "Storage.interestGroupAccessed": Storage.InterestGroupAccessedEvent; + "Storage.sharedStorageAccessed": Storage.SharedStorageAccessedEvent; + "Storage.storageBucketCreatedOrUpdated": Storage.StorageBucketCreatedOrUpdatedEvent; + "Storage.storageBucketDeleted": Storage.StorageBucketDeletedEvent; + "Storage.attributionReportingSourceRegistered": Storage.AttributionReportingSourceRegisteredEvent; + "Target.attachedToTarget": Target.AttachedToTargetEvent; + "Target.detachedFromTarget": Target.DetachedFromTargetEvent; + "Target.receivedMessageFromTarget": Target.ReceivedMessageFromTargetEvent; + "Target.targetCreated": Target.TargetCreatedEvent; + "Target.targetDestroyed": Target.TargetDestroyedEvent; + "Target.targetCrashed": Target.TargetCrashedEvent; + "Target.targetInfoChanged": Target.TargetInfoChangedEvent; + "Tethering.accepted": Tethering.AcceptedEvent; + "Tracing.bufferUsage": Tracing.BufferUsageEvent; + "Tracing.dataCollected": Tracing.DataCollectedEvent; + "Tracing.tracingComplete": Tracing.TracingCompleteEvent; + "WebAudio.contextCreated": WebAudio.ContextCreatedEvent; + "WebAudio.contextWillBeDestroyed": WebAudio.ContextWillBeDestroyedEvent; + "WebAudio.contextChanged": WebAudio.ContextChangedEvent; + "WebAudio.audioListenerCreated": WebAudio.AudioListenerCreatedEvent; + "WebAudio.audioListenerWillBeDestroyed": WebAudio.AudioListenerWillBeDestroyedEvent; + "WebAudio.audioNodeCreated": WebAudio.AudioNodeCreatedEvent; + "WebAudio.audioNodeWillBeDestroyed": WebAudio.AudioNodeWillBeDestroyedEvent; + "WebAudio.audioParamCreated": WebAudio.AudioParamCreatedEvent; + "WebAudio.audioParamWillBeDestroyed": WebAudio.AudioParamWillBeDestroyedEvent; + "WebAudio.nodesConnected": WebAudio.NodesConnectedEvent; + "WebAudio.nodesDisconnected": WebAudio.NodesDisconnectedEvent; + "WebAudio.nodeParamConnected": WebAudio.NodeParamConnectedEvent; + "WebAudio.nodeParamDisconnected": WebAudio.NodeParamDisconnectedEvent; + "WebAuthn.credentialAdded": WebAuthn.CredentialAddedEvent; + "WebAuthn.credentialAsserted": WebAuthn.CredentialAssertedEvent; + }; + export type RequestMap = { + "Accessibility.disable": Accessibility.DisableRequest; + "Accessibility.enable": Accessibility.EnableRequest; + "Accessibility.getPartialAXTree": Accessibility.GetPartialAXTreeRequest; + "Accessibility.getFullAXTree": Accessibility.GetFullAXTreeRequest; + "Accessibility.getRootAXNode": Accessibility.GetRootAXNodeRequest; + "Accessibility.getAXNodeAndAncestors": Accessibility.GetAXNodeAndAncestorsRequest; + "Accessibility.getChildAXNodes": Accessibility.GetChildAXNodesRequest; + "Accessibility.queryAXTree": Accessibility.QueryAXTreeRequest; + "Animation.disable": Animation.DisableRequest; + "Animation.enable": Animation.EnableRequest; + "Animation.getCurrentTime": Animation.GetCurrentTimeRequest; + "Animation.getPlaybackRate": Animation.GetPlaybackRateRequest; + "Animation.releaseAnimations": Animation.ReleaseAnimationsRequest; + "Animation.resolveAnimation": Animation.ResolveAnimationRequest; + "Animation.seekAnimations": Animation.SeekAnimationsRequest; + "Animation.setPaused": Animation.SetPausedRequest; + "Animation.setPlaybackRate": Animation.SetPlaybackRateRequest; + "Animation.setTiming": Animation.SetTimingRequest; + "Audits.getEncodedResponse": Audits.GetEncodedResponseRequest; + "Audits.disable": Audits.DisableRequest; + "Audits.enable": Audits.EnableRequest; + "Audits.checkContrast": Audits.CheckContrastRequest; + "Audits.checkFormsIssues": Audits.CheckFormsIssuesRequest; + "Autofill.trigger": Autofill.TriggerRequest; + "Autofill.setAddresses": Autofill.SetAddressesRequest; + "BackgroundService.startObserving": BackgroundService.StartObservingRequest; + "BackgroundService.stopObserving": BackgroundService.StopObservingRequest; + "BackgroundService.setRecording": BackgroundService.SetRecordingRequest; + "BackgroundService.clearEvents": BackgroundService.ClearEventsRequest; + "Browser.setPermission": Browser.SetPermissionRequest; + "Browser.grantPermissions": Browser.GrantPermissionsRequest; + "Browser.resetPermissions": Browser.ResetPermissionsRequest; + "Browser.setDownloadBehavior": Browser.SetDownloadBehaviorRequest; + "Browser.cancelDownload": Browser.CancelDownloadRequest; + "Browser.close": Browser.CloseRequest; + "Browser.crash": Browser.CrashRequest; + "Browser.crashGpuProcess": Browser.CrashGpuProcessRequest; + "Browser.getVersion": Browser.GetVersionRequest; + "Browser.getBrowserCommandLine": Browser.GetBrowserCommandLineRequest; + "Browser.getHistograms": Browser.GetHistogramsRequest; + "Browser.getHistogram": Browser.GetHistogramRequest; + "Browser.getWindowBounds": Browser.GetWindowBoundsRequest; + "Browser.getWindowForTarget": Browser.GetWindowForTargetRequest; + "Browser.setWindowBounds": Browser.SetWindowBoundsRequest; + "Browser.setDockTile": Browser.SetDockTileRequest; + "Browser.executeBrowserCommand": Browser.ExecuteBrowserCommandRequest; + "Browser.addPrivacySandboxEnrollmentOverride": Browser.AddPrivacySandboxEnrollmentOverrideRequest; + "CacheStorage.deleteCache": CacheStorage.DeleteCacheRequest; + "CacheStorage.deleteEntry": CacheStorage.DeleteEntryRequest; + "CacheStorage.requestCacheNames": CacheStorage.RequestCacheNamesRequest; + "CacheStorage.requestCachedResponse": CacheStorage.RequestCachedResponseRequest; + "CacheStorage.requestEntries": CacheStorage.RequestEntriesRequest; + "Cast.enable": Cast.EnableRequest; + "Cast.disable": Cast.DisableRequest; + "Cast.setSinkToUse": Cast.SetSinkToUseRequest; + "Cast.startDesktopMirroring": Cast.StartDesktopMirroringRequest; + "Cast.startTabMirroring": Cast.StartTabMirroringRequest; + "Cast.stopCasting": Cast.StopCastingRequest; + "CSS.addRule": CSS.AddRuleRequest; + "CSS.collectClassNames": CSS.CollectClassNamesRequest; + "CSS.createStyleSheet": CSS.CreateStyleSheetRequest; + "CSS.disable": CSS.DisableRequest; + "CSS.enable": CSS.EnableRequest; + "CSS.forcePseudoState": CSS.ForcePseudoStateRequest; + "CSS.getBackgroundColors": CSS.GetBackgroundColorsRequest; + "CSS.getComputedStyleForNode": CSS.GetComputedStyleForNodeRequest; + "CSS.getInlineStylesForNode": CSS.GetInlineStylesForNodeRequest; + "CSS.getMatchedStylesForNode": CSS.GetMatchedStylesForNodeRequest; + "CSS.getMediaQueries": CSS.GetMediaQueriesRequest; + "CSS.getPlatformFontsForNode": CSS.GetPlatformFontsForNodeRequest; + "CSS.getStyleSheetText": CSS.GetStyleSheetTextRequest; + "CSS.getLayersForNode": CSS.GetLayersForNodeRequest; + "CSS.trackComputedStyleUpdates": CSS.TrackComputedStyleUpdatesRequest; + "CSS.takeComputedStyleUpdates": CSS.TakeComputedStyleUpdatesRequest; + "CSS.setEffectivePropertyValueForNode": CSS.SetEffectivePropertyValueForNodeRequest; + "CSS.setKeyframeKey": CSS.SetKeyframeKeyRequest; + "CSS.setMediaText": CSS.SetMediaTextRequest; + "CSS.setContainerQueryText": CSS.SetContainerQueryTextRequest; + "CSS.setSupportsText": CSS.SetSupportsTextRequest; + "CSS.setScopeText": CSS.SetScopeTextRequest; + "CSS.setRuleSelector": CSS.SetRuleSelectorRequest; + "CSS.setStyleSheetText": CSS.SetStyleSheetTextRequest; + "CSS.setStyleTexts": CSS.SetStyleTextsRequest; + "CSS.startRuleUsageTracking": CSS.StartRuleUsageTrackingRequest; + "CSS.stopRuleUsageTracking": CSS.StopRuleUsageTrackingRequest; + "CSS.takeCoverageDelta": CSS.TakeCoverageDeltaRequest; + "CSS.setLocalFontsEnabled": CSS.SetLocalFontsEnabledRequest; + "Database.disable": Database.DisableRequest; + "Database.enable": Database.EnableRequest; + "Database.executeSQL": Database.ExecuteSQLRequest; + "Database.getDatabaseTableNames": Database.GetDatabaseTableNamesRequest; + "DeviceAccess.enable": DeviceAccess.EnableRequest; + "DeviceAccess.disable": DeviceAccess.DisableRequest; + "DeviceAccess.selectPrompt": DeviceAccess.SelectPromptRequest; + "DeviceAccess.cancelPrompt": DeviceAccess.CancelPromptRequest; + "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.ClearDeviceOrientationOverrideRequest; + "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.SetDeviceOrientationOverrideRequest; + "DOM.collectClassNamesFromSubtree": DOM.CollectClassNamesFromSubtreeRequest; + "DOM.copyTo": DOM.CopyToRequest; + "DOM.describeNode": DOM.DescribeNodeRequest; + "DOM.scrollIntoViewIfNeeded": DOM.ScrollIntoViewIfNeededRequest; + "DOM.disable": DOM.DisableRequest; + "DOM.discardSearchResults": DOM.DiscardSearchResultsRequest; + "DOM.enable": DOM.EnableRequest; + "DOM.focus": DOM.FocusRequest; + "DOM.getAttributes": DOM.GetAttributesRequest; + "DOM.getBoxModel": DOM.GetBoxModelRequest; + "DOM.getContentQuads": DOM.GetContentQuadsRequest; + "DOM.getDocument": DOM.GetDocumentRequest; + "DOM.getFlattenedDocument": DOM.GetFlattenedDocumentRequest; + "DOM.getNodesForSubtreeByStyle": DOM.GetNodesForSubtreeByStyleRequest; + "DOM.getNodeForLocation": DOM.GetNodeForLocationRequest; + "DOM.getOuterHTML": DOM.GetOuterHTMLRequest; + "DOM.getRelayoutBoundary": DOM.GetRelayoutBoundaryRequest; + "DOM.getSearchResults": DOM.GetSearchResultsRequest; + "DOM.hideHighlight": DOM.HideHighlightRequest; + "DOM.highlightNode": DOM.HighlightNodeRequest; + "DOM.highlightRect": DOM.HighlightRectRequest; + "DOM.markUndoableState": DOM.MarkUndoableStateRequest; + "DOM.moveTo": DOM.MoveToRequest; + "DOM.performSearch": DOM.PerformSearchRequest; + "DOM.pushNodeByPathToFrontend": DOM.PushNodeByPathToFrontendRequest; + "DOM.pushNodesByBackendIdsToFrontend": DOM.PushNodesByBackendIdsToFrontendRequest; + "DOM.querySelector": DOM.QuerySelectorRequest; + "DOM.querySelectorAll": DOM.QuerySelectorAllRequest; + "DOM.getTopLayerElements": DOM.GetTopLayerElementsRequest; + "DOM.redo": DOM.RedoRequest; + "DOM.removeAttribute": DOM.RemoveAttributeRequest; + "DOM.removeNode": DOM.RemoveNodeRequest; + "DOM.requestChildNodes": DOM.RequestChildNodesRequest; + "DOM.requestNode": DOM.RequestNodeRequest; + "DOM.resolveNode": DOM.ResolveNodeRequest; + "DOM.setAttributeValue": DOM.SetAttributeValueRequest; + "DOM.setAttributesAsText": DOM.SetAttributesAsTextRequest; + "DOM.setFileInputFiles": DOM.SetFileInputFilesRequest; + "DOM.setNodeStackTracesEnabled": DOM.SetNodeStackTracesEnabledRequest; + "DOM.getNodeStackTraces": DOM.GetNodeStackTracesRequest; + "DOM.getFileInfo": DOM.GetFileInfoRequest; + "DOM.setInspectedNode": DOM.SetInspectedNodeRequest; + "DOM.setNodeName": DOM.SetNodeNameRequest; + "DOM.setNodeValue": DOM.SetNodeValueRequest; + "DOM.setOuterHTML": DOM.SetOuterHTMLRequest; + "DOM.undo": DOM.UndoRequest; + "DOM.getFrameOwner": DOM.GetFrameOwnerRequest; + "DOM.getContainerForNode": DOM.GetContainerForNodeRequest; + "DOM.getQueryingDescendantsForContainer": DOM.GetQueryingDescendantsForContainerRequest; + "DOMDebugger.getEventListeners": DOMDebugger.GetEventListenersRequest; + "DOMDebugger.removeDOMBreakpoint": DOMDebugger.RemoveDOMBreakpointRequest; + "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.RemoveEventListenerBreakpointRequest; + "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.RemoveInstrumentationBreakpointRequest; + "DOMDebugger.removeXHRBreakpoint": DOMDebugger.RemoveXHRBreakpointRequest; + "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.SetBreakOnCSPViolationRequest; + "DOMDebugger.setDOMBreakpoint": DOMDebugger.SetDOMBreakpointRequest; + "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.SetEventListenerBreakpointRequest; + "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.SetInstrumentationBreakpointRequest; + "DOMDebugger.setXHRBreakpoint": DOMDebugger.SetXHRBreakpointRequest; + "DOMSnapshot.disable": DOMSnapshot.DisableRequest; + "DOMSnapshot.enable": DOMSnapshot.EnableRequest; + "DOMSnapshot.getSnapshot": DOMSnapshot.GetSnapshotRequest; + "DOMSnapshot.captureSnapshot": DOMSnapshot.CaptureSnapshotRequest; + "DOMStorage.clear": DOMStorage.ClearRequest; + "DOMStorage.disable": DOMStorage.DisableRequest; + "DOMStorage.enable": DOMStorage.EnableRequest; + "DOMStorage.getDOMStorageItems": DOMStorage.GetDOMStorageItemsRequest; + "DOMStorage.removeDOMStorageItem": DOMStorage.RemoveDOMStorageItemRequest; + "DOMStorage.setDOMStorageItem": DOMStorage.SetDOMStorageItemRequest; + "Emulation.canEmulate": Emulation.CanEmulateRequest; + "Emulation.clearDeviceMetricsOverride": Emulation.ClearDeviceMetricsOverrideRequest; + "Emulation.clearGeolocationOverride": Emulation.ClearGeolocationOverrideRequest; + "Emulation.resetPageScaleFactor": Emulation.ResetPageScaleFactorRequest; + "Emulation.setFocusEmulationEnabled": Emulation.SetFocusEmulationEnabledRequest; + "Emulation.setAutoDarkModeOverride": Emulation.SetAutoDarkModeOverrideRequest; + "Emulation.setCPUThrottlingRate": Emulation.SetCPUThrottlingRateRequest; + "Emulation.setDefaultBackgroundColorOverride": Emulation.SetDefaultBackgroundColorOverrideRequest; + "Emulation.setDeviceMetricsOverride": Emulation.SetDeviceMetricsOverrideRequest; + "Emulation.setScrollbarsHidden": Emulation.SetScrollbarsHiddenRequest; + "Emulation.setDocumentCookieDisabled": Emulation.SetDocumentCookieDisabledRequest; + "Emulation.setEmitTouchEventsForMouse": Emulation.SetEmitTouchEventsForMouseRequest; + "Emulation.setEmulatedMedia": Emulation.SetEmulatedMediaRequest; + "Emulation.setEmulatedVisionDeficiency": Emulation.SetEmulatedVisionDeficiencyRequest; + "Emulation.setGeolocationOverride": Emulation.SetGeolocationOverrideRequest; + "Emulation.setIdleOverride": Emulation.SetIdleOverrideRequest; + "Emulation.clearIdleOverride": Emulation.ClearIdleOverrideRequest; + "Emulation.setNavigatorOverrides": Emulation.SetNavigatorOverridesRequest; + "Emulation.setPageScaleFactor": Emulation.SetPageScaleFactorRequest; + "Emulation.setScriptExecutionDisabled": Emulation.SetScriptExecutionDisabledRequest; + "Emulation.setTouchEmulationEnabled": Emulation.SetTouchEmulationEnabledRequest; + "Emulation.setVirtualTimePolicy": Emulation.SetVirtualTimePolicyRequest; + "Emulation.setLocaleOverride": Emulation.SetLocaleOverrideRequest; + "Emulation.setTimezoneOverride": Emulation.SetTimezoneOverrideRequest; + "Emulation.setVisibleSize": Emulation.SetVisibleSizeRequest; + "Emulation.setDisabledImageTypes": Emulation.SetDisabledImageTypesRequest; + "Emulation.setHardwareConcurrencyOverride": Emulation.SetHardwareConcurrencyOverrideRequest; + "Emulation.setUserAgentOverride": Emulation.SetUserAgentOverrideRequest; + "Emulation.setAutomationOverride": Emulation.SetAutomationOverrideRequest; + "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.SetInstrumentationBreakpointRequest; + "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.RemoveInstrumentationBreakpointRequest; + "FedCm.enable": FedCm.EnableRequest; + "FedCm.disable": FedCm.DisableRequest; + "FedCm.selectAccount": FedCm.SelectAccountRequest; + "FedCm.dismissDialog": FedCm.DismissDialogRequest; + "FedCm.resetCooldown": FedCm.ResetCooldownRequest; + "Fetch.disable": Fetch.DisableRequest; + "Fetch.enable": Fetch.EnableRequest; + "Fetch.failRequest": Fetch.FailRequestRequest; + "Fetch.fulfillRequest": Fetch.FulfillRequestRequest; + "Fetch.continueRequest": Fetch.ContinueRequestRequest; + "Fetch.continueWithAuth": Fetch.ContinueWithAuthRequest; + "Fetch.continueResponse": Fetch.ContinueResponseRequest; + "Fetch.getResponseBody": Fetch.GetResponseBodyRequest; + "Fetch.takeResponseBodyAsStream": Fetch.TakeResponseBodyAsStreamRequest; + "HeadlessExperimental.beginFrame": HeadlessExperimental.BeginFrameRequest; + "HeadlessExperimental.disable": HeadlessExperimental.DisableRequest; + "HeadlessExperimental.enable": HeadlessExperimental.EnableRequest; + "IndexedDB.clearObjectStore": IndexedDB.ClearObjectStoreRequest; + "IndexedDB.deleteDatabase": IndexedDB.DeleteDatabaseRequest; + "IndexedDB.deleteObjectStoreEntries": IndexedDB.DeleteObjectStoreEntriesRequest; + "IndexedDB.disable": IndexedDB.DisableRequest; + "IndexedDB.enable": IndexedDB.EnableRequest; + "IndexedDB.requestData": IndexedDB.RequestDataRequest; + "IndexedDB.getMetadata": IndexedDB.GetMetadataRequest; + "IndexedDB.requestDatabase": IndexedDB.RequestDatabaseRequest; + "IndexedDB.requestDatabaseNames": IndexedDB.RequestDatabaseNamesRequest; + "Input.dispatchDragEvent": Input.DispatchDragEventRequest; + "Input.dispatchKeyEvent": Input.DispatchKeyEventRequest; + "Input.insertText": Input.InsertTextRequest; + "Input.imeSetComposition": Input.ImeSetCompositionRequest; + "Input.dispatchMouseEvent": Input.DispatchMouseEventRequest; + "Input.dispatchTouchEvent": Input.DispatchTouchEventRequest; + "Input.cancelDragging": Input.CancelDraggingRequest; + "Input.emulateTouchFromMouseEvent": Input.EmulateTouchFromMouseEventRequest; + "Input.setIgnoreInputEvents": Input.SetIgnoreInputEventsRequest; + "Input.setInterceptDrags": Input.SetInterceptDragsRequest; + "Input.synthesizePinchGesture": Input.SynthesizePinchGestureRequest; + "Input.synthesizeScrollGesture": Input.SynthesizeScrollGestureRequest; + "Input.synthesizeTapGesture": Input.SynthesizeTapGestureRequest; + "IO.close": IO.CloseRequest; + "IO.read": IO.ReadRequest; + "IO.resolveBlob": IO.ResolveBlobRequest; + "LayerTree.compositingReasons": LayerTree.CompositingReasonsRequest; + "LayerTree.disable": LayerTree.DisableRequest; + "LayerTree.enable": LayerTree.EnableRequest; + "LayerTree.loadSnapshot": LayerTree.LoadSnapshotRequest; + "LayerTree.makeSnapshot": LayerTree.MakeSnapshotRequest; + "LayerTree.profileSnapshot": LayerTree.ProfileSnapshotRequest; + "LayerTree.releaseSnapshot": LayerTree.ReleaseSnapshotRequest; + "LayerTree.replaySnapshot": LayerTree.ReplaySnapshotRequest; + "LayerTree.snapshotCommandLog": LayerTree.SnapshotCommandLogRequest; + "Log.clear": Log.ClearRequest; + "Log.disable": Log.DisableRequest; + "Log.enable": Log.EnableRequest; + "Log.startViolationsReport": Log.StartViolationsReportRequest; + "Log.stopViolationsReport": Log.StopViolationsReportRequest; + "Media.enable": Media.EnableRequest; + "Media.disable": Media.DisableRequest; + "Overlay.disable": Overlay.DisableRequest; + "Overlay.enable": Overlay.EnableRequest; + "Overlay.getHighlightObjectForTest": Overlay.GetHighlightObjectForTestRequest; + "Overlay.getGridHighlightObjectsForTest": Overlay.GetGridHighlightObjectsForTestRequest; + "Overlay.getSourceOrderHighlightObjectForTest": Overlay.GetSourceOrderHighlightObjectForTestRequest; + "Overlay.hideHighlight": Overlay.HideHighlightRequest; + "Overlay.highlightFrame": Overlay.HighlightFrameRequest; + "Overlay.highlightNode": Overlay.HighlightNodeRequest; + "Overlay.highlightQuad": Overlay.HighlightQuadRequest; + "Overlay.highlightRect": Overlay.HighlightRectRequest; + "Overlay.highlightSourceOrder": Overlay.HighlightSourceOrderRequest; + "Overlay.setInspectMode": Overlay.SetInspectModeRequest; + "Overlay.setShowAdHighlights": Overlay.SetShowAdHighlightsRequest; + "Overlay.setPausedInDebuggerMessage": Overlay.SetPausedInDebuggerMessageRequest; + "Overlay.setShowDebugBorders": Overlay.SetShowDebugBordersRequest; + "Overlay.setShowFPSCounter": Overlay.SetShowFPSCounterRequest; + "Overlay.setShowGridOverlays": Overlay.SetShowGridOverlaysRequest; + "Overlay.setShowFlexOverlays": Overlay.SetShowFlexOverlaysRequest; + "Overlay.setShowScrollSnapOverlays": Overlay.SetShowScrollSnapOverlaysRequest; + "Overlay.setShowContainerQueryOverlays": Overlay.SetShowContainerQueryOverlaysRequest; + "Overlay.setShowPaintRects": Overlay.SetShowPaintRectsRequest; + "Overlay.setShowLayoutShiftRegions": Overlay.SetShowLayoutShiftRegionsRequest; + "Overlay.setShowScrollBottleneckRects": Overlay.SetShowScrollBottleneckRectsRequest; + "Overlay.setShowHitTestBorders": Overlay.SetShowHitTestBordersRequest; + "Overlay.setShowWebVitals": Overlay.SetShowWebVitalsRequest; + "Overlay.setShowViewportSizeOnResize": Overlay.SetShowViewportSizeOnResizeRequest; + "Overlay.setShowHinge": Overlay.SetShowHingeRequest; + "Overlay.setShowIsolatedElements": Overlay.SetShowIsolatedElementsRequest; + "Page.addScriptToEvaluateOnLoad": Page.AddScriptToEvaluateOnLoadRequest; + "Page.addScriptToEvaluateOnNewDocument": Page.AddScriptToEvaluateOnNewDocumentRequest; + "Page.bringToFront": Page.BringToFrontRequest; + "Page.captureScreenshot": Page.CaptureScreenshotRequest; + "Page.captureSnapshot": Page.CaptureSnapshotRequest; + "Page.clearDeviceMetricsOverride": Page.ClearDeviceMetricsOverrideRequest; + "Page.clearDeviceOrientationOverride": Page.ClearDeviceOrientationOverrideRequest; + "Page.clearGeolocationOverride": Page.ClearGeolocationOverrideRequest; + "Page.createIsolatedWorld": Page.CreateIsolatedWorldRequest; + "Page.deleteCookie": Page.DeleteCookieRequest; + "Page.disable": Page.DisableRequest; + "Page.enable": Page.EnableRequest; + "Page.getAppManifest": Page.GetAppManifestRequest; + "Page.getInstallabilityErrors": Page.GetInstallabilityErrorsRequest; + "Page.getManifestIcons": Page.GetManifestIconsRequest; + "Page.getAppId": Page.GetAppIdRequest; + "Page.getAdScriptId": Page.GetAdScriptIdRequest; + "Page.getCookies": Page.GetCookiesRequest; + "Page.getFrameTree": Page.GetFrameTreeRequest; + "Page.getLayoutMetrics": Page.GetLayoutMetricsRequest; + "Page.getNavigationHistory": Page.GetNavigationHistoryRequest; + "Page.resetNavigationHistory": Page.ResetNavigationHistoryRequest; + "Page.getResourceContent": Page.GetResourceContentRequest; + "Page.getResourceTree": Page.GetResourceTreeRequest; + "Page.handleJavaScriptDialog": Page.HandleJavaScriptDialogRequest; + "Page.navigate": Page.NavigateRequest; + "Page.navigateToHistoryEntry": Page.NavigateToHistoryEntryRequest; + "Page.printToPDF": Page.PrintToPDFRequest; + "Page.reload": Page.ReloadRequest; + "Page.removeScriptToEvaluateOnLoad": Page.RemoveScriptToEvaluateOnLoadRequest; + "Page.removeScriptToEvaluateOnNewDocument": Page.RemoveScriptToEvaluateOnNewDocumentRequest; + "Page.screencastFrameAck": Page.ScreencastFrameAckRequest; + "Page.searchInResource": Page.SearchInResourceRequest; + "Page.setAdBlockingEnabled": Page.SetAdBlockingEnabledRequest; + "Page.setBypassCSP": Page.SetBypassCSPRequest; + "Page.getPermissionsPolicyState": Page.GetPermissionsPolicyStateRequest; + "Page.getOriginTrials": Page.GetOriginTrialsRequest; + "Page.setDeviceMetricsOverride": Page.SetDeviceMetricsOverrideRequest; + "Page.setDeviceOrientationOverride": Page.SetDeviceOrientationOverrideRequest; + "Page.setFontFamilies": Page.SetFontFamiliesRequest; + "Page.setFontSizes": Page.SetFontSizesRequest; + "Page.setDocumentContent": Page.SetDocumentContentRequest; + "Page.setDownloadBehavior": Page.SetDownloadBehaviorRequest; + "Page.setGeolocationOverride": Page.SetGeolocationOverrideRequest; + "Page.setLifecycleEventsEnabled": Page.SetLifecycleEventsEnabledRequest; + "Page.setTouchEmulationEnabled": Page.SetTouchEmulationEnabledRequest; + "Page.startScreencast": Page.StartScreencastRequest; + "Page.stopLoading": Page.StopLoadingRequest; + "Page.crash": Page.CrashRequest; + "Page.close": Page.CloseRequest; + "Page.setWebLifecycleState": Page.SetWebLifecycleStateRequest; + "Page.stopScreencast": Page.StopScreencastRequest; + "Page.produceCompilationCache": Page.ProduceCompilationCacheRequest; + "Page.addCompilationCache": Page.AddCompilationCacheRequest; + "Page.clearCompilationCache": Page.ClearCompilationCacheRequest; + "Page.setSPCTransactionMode": Page.SetSPCTransactionModeRequest; + "Page.setRPHRegistrationMode": Page.SetRPHRegistrationModeRequest; + "Page.generateTestReport": Page.GenerateTestReportRequest; + "Page.waitForDebugger": Page.WaitForDebuggerRequest; + "Page.setInterceptFileChooserDialog": Page.SetInterceptFileChooserDialogRequest; + "Page.setPrerenderingAllowed": Page.SetPrerenderingAllowedRequest; + "Performance.disable": Performance.DisableRequest; + "Performance.enable": Performance.EnableRequest; + "Performance.setTimeDomain": Performance.SetTimeDomainRequest; + "Performance.getMetrics": Performance.GetMetricsRequest; + "PerformanceTimeline.enable": PerformanceTimeline.EnableRequest; + "Preload.enable": Preload.EnableRequest; + "Preload.disable": Preload.DisableRequest; + "Schema.getDomains": Schema.GetDomainsRequest; + "Security.disable": Security.DisableRequest; + "Security.enable": Security.EnableRequest; + "Security.setIgnoreCertificateErrors": Security.SetIgnoreCertificateErrorsRequest; + "Security.handleCertificateError": Security.HandleCertificateErrorRequest; + "Security.setOverrideCertificateErrors": Security.SetOverrideCertificateErrorsRequest; + "ServiceWorker.deliverPushMessage": ServiceWorker.DeliverPushMessageRequest; + "ServiceWorker.disable": ServiceWorker.DisableRequest; + "ServiceWorker.dispatchSyncEvent": ServiceWorker.DispatchSyncEventRequest; + "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.DispatchPeriodicSyncEventRequest; + "ServiceWorker.enable": ServiceWorker.EnableRequest; + "ServiceWorker.inspectWorker": ServiceWorker.InspectWorkerRequest; + "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.SetForceUpdateOnPageLoadRequest; + "ServiceWorker.skipWaiting": ServiceWorker.SkipWaitingRequest; + "ServiceWorker.startWorker": ServiceWorker.StartWorkerRequest; + "ServiceWorker.stopAllWorkers": ServiceWorker.StopAllWorkersRequest; + "ServiceWorker.stopWorker": ServiceWorker.StopWorkerRequest; + "ServiceWorker.unregister": ServiceWorker.UnregisterRequest; + "ServiceWorker.updateRegistration": ServiceWorker.UpdateRegistrationRequest; + "Storage.getStorageKeyForFrame": Storage.GetStorageKeyForFrameRequest; + "Storage.clearDataForOrigin": Storage.ClearDataForOriginRequest; + "Storage.clearDataForStorageKey": Storage.ClearDataForStorageKeyRequest; + "Storage.getCookies": Storage.GetCookiesRequest; + "Storage.setCookies": Storage.SetCookiesRequest; + "Storage.clearCookies": Storage.ClearCookiesRequest; + "Storage.getUsageAndQuota": Storage.GetUsageAndQuotaRequest; + "Storage.overrideQuotaForOrigin": Storage.OverrideQuotaForOriginRequest; + "Storage.trackCacheStorageForOrigin": Storage.TrackCacheStorageForOriginRequest; + "Storage.trackCacheStorageForStorageKey": Storage.TrackCacheStorageForStorageKeyRequest; + "Storage.trackIndexedDBForOrigin": Storage.TrackIndexedDBForOriginRequest; + "Storage.trackIndexedDBForStorageKey": Storage.TrackIndexedDBForStorageKeyRequest; + "Storage.untrackCacheStorageForOrigin": Storage.UntrackCacheStorageForOriginRequest; + "Storage.untrackCacheStorageForStorageKey": Storage.UntrackCacheStorageForStorageKeyRequest; + "Storage.untrackIndexedDBForOrigin": Storage.UntrackIndexedDBForOriginRequest; + "Storage.untrackIndexedDBForStorageKey": Storage.UntrackIndexedDBForStorageKeyRequest; + "Storage.getTrustTokens": Storage.GetTrustTokensRequest; + "Storage.clearTrustTokens": Storage.ClearTrustTokensRequest; + "Storage.getInterestGroupDetails": Storage.GetInterestGroupDetailsRequest; + "Storage.setInterestGroupTracking": Storage.SetInterestGroupTrackingRequest; + "Storage.getSharedStorageMetadata": Storage.GetSharedStorageMetadataRequest; + "Storage.getSharedStorageEntries": Storage.GetSharedStorageEntriesRequest; + "Storage.setSharedStorageEntry": Storage.SetSharedStorageEntryRequest; + "Storage.deleteSharedStorageEntry": Storage.DeleteSharedStorageEntryRequest; + "Storage.clearSharedStorageEntries": Storage.ClearSharedStorageEntriesRequest; + "Storage.resetSharedStorageBudget": Storage.ResetSharedStorageBudgetRequest; + "Storage.setSharedStorageTracking": Storage.SetSharedStorageTrackingRequest; + "Storage.setStorageBucketTracking": Storage.SetStorageBucketTrackingRequest; + "Storage.deleteStorageBucket": Storage.DeleteStorageBucketRequest; + "Storage.runBounceTrackingMitigations": Storage.RunBounceTrackingMitigationsRequest; + "Storage.setAttributionReportingLocalTestingMode": Storage.SetAttributionReportingLocalTestingModeRequest; + "Storage.setAttributionReportingTracking": Storage.SetAttributionReportingTrackingRequest; + "SystemInfo.getInfo": SystemInfo.GetInfoRequest; + "SystemInfo.getFeatureState": SystemInfo.GetFeatureStateRequest; + "SystemInfo.getProcessInfo": SystemInfo.GetProcessInfoRequest; + "Target.activateTarget": Target.ActivateTargetRequest; + "Target.attachToTarget": Target.AttachToTargetRequest; + "Target.attachToBrowserTarget": Target.AttachToBrowserTargetRequest; + "Target.closeTarget": Target.CloseTargetRequest; + "Target.exposeDevToolsProtocol": Target.ExposeDevToolsProtocolRequest; + "Target.createBrowserContext": Target.CreateBrowserContextRequest; + "Target.getBrowserContexts": Target.GetBrowserContextsRequest; + "Target.createTarget": Target.CreateTargetRequest; + "Target.detachFromTarget": Target.DetachFromTargetRequest; + "Target.disposeBrowserContext": Target.DisposeBrowserContextRequest; + "Target.getTargetInfo": Target.GetTargetInfoRequest; + "Target.getTargets": Target.GetTargetsRequest; + "Target.sendMessageToTarget": Target.SendMessageToTargetRequest; + "Target.setAutoAttach": Target.SetAutoAttachRequest; + "Target.autoAttachRelated": Target.AutoAttachRelatedRequest; + "Target.setDiscoverTargets": Target.SetDiscoverTargetsRequest; + "Target.setRemoteLocations": Target.SetRemoteLocationsRequest; + "Tethering.bind": Tethering.BindRequest; + "Tethering.unbind": Tethering.UnbindRequest; + "Tracing.end": Tracing.EndRequest; + "Tracing.getCategories": Tracing.GetCategoriesRequest; + "Tracing.recordClockSyncMarker": Tracing.RecordClockSyncMarkerRequest; + "Tracing.requestMemoryDump": Tracing.RequestMemoryDumpRequest; + "Tracing.start": Tracing.StartRequest; + "WebAudio.enable": WebAudio.EnableRequest; + "WebAudio.disable": WebAudio.DisableRequest; + "WebAudio.getRealtimeData": WebAudio.GetRealtimeDataRequest; + "WebAuthn.enable": WebAuthn.EnableRequest; + "WebAuthn.disable": WebAuthn.DisableRequest; + "WebAuthn.addVirtualAuthenticator": WebAuthn.AddVirtualAuthenticatorRequest; + "WebAuthn.setResponseOverrideBits": WebAuthn.SetResponseOverrideBitsRequest; + "WebAuthn.removeVirtualAuthenticator": WebAuthn.RemoveVirtualAuthenticatorRequest; + "WebAuthn.addCredential": WebAuthn.AddCredentialRequest; + "WebAuthn.getCredential": WebAuthn.GetCredentialRequest; + "WebAuthn.getCredentials": WebAuthn.GetCredentialsRequest; + "WebAuthn.removeCredential": WebAuthn.RemoveCredentialRequest; + "WebAuthn.clearCredentials": WebAuthn.ClearCredentialsRequest; + "WebAuthn.setUserVerified": WebAuthn.SetUserVerifiedRequest; + "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.SetAutomaticPresenceSimulationRequest; + }; + export type ResponseMap = { + "Accessibility.disable": Accessibility.DisableResponse; + "Accessibility.enable": Accessibility.EnableResponse; + "Accessibility.getPartialAXTree": Accessibility.GetPartialAXTreeResponse; + "Accessibility.getFullAXTree": Accessibility.GetFullAXTreeResponse; + "Accessibility.getRootAXNode": Accessibility.GetRootAXNodeResponse; + "Accessibility.getAXNodeAndAncestors": Accessibility.GetAXNodeAndAncestorsResponse; + "Accessibility.getChildAXNodes": Accessibility.GetChildAXNodesResponse; + "Accessibility.queryAXTree": Accessibility.QueryAXTreeResponse; + "Animation.disable": Animation.DisableResponse; + "Animation.enable": Animation.EnableResponse; + "Animation.getCurrentTime": Animation.GetCurrentTimeResponse; + "Animation.getPlaybackRate": Animation.GetPlaybackRateResponse; + "Animation.releaseAnimations": Animation.ReleaseAnimationsResponse; + "Animation.resolveAnimation": Animation.ResolveAnimationResponse; + "Animation.seekAnimations": Animation.SeekAnimationsResponse; + "Animation.setPaused": Animation.SetPausedResponse; + "Animation.setPlaybackRate": Animation.SetPlaybackRateResponse; + "Animation.setTiming": Animation.SetTimingResponse; + "Audits.getEncodedResponse": Audits.GetEncodedResponseResponse; + "Audits.disable": Audits.DisableResponse; + "Audits.enable": Audits.EnableResponse; + "Audits.checkContrast": Audits.CheckContrastResponse; + "Audits.checkFormsIssues": Audits.CheckFormsIssuesResponse; + "Autofill.trigger": Autofill.TriggerResponse; + "Autofill.setAddresses": Autofill.SetAddressesResponse; + "BackgroundService.startObserving": BackgroundService.StartObservingResponse; + "BackgroundService.stopObserving": BackgroundService.StopObservingResponse; + "BackgroundService.setRecording": BackgroundService.SetRecordingResponse; + "BackgroundService.clearEvents": BackgroundService.ClearEventsResponse; + "Browser.setPermission": Browser.SetPermissionResponse; + "Browser.grantPermissions": Browser.GrantPermissionsResponse; + "Browser.resetPermissions": Browser.ResetPermissionsResponse; + "Browser.setDownloadBehavior": Browser.SetDownloadBehaviorResponse; + "Browser.cancelDownload": Browser.CancelDownloadResponse; + "Browser.close": Browser.CloseResponse; + "Browser.crash": Browser.CrashResponse; + "Browser.crashGpuProcess": Browser.CrashGpuProcessResponse; + "Browser.getVersion": Browser.GetVersionResponse; + "Browser.getBrowserCommandLine": Browser.GetBrowserCommandLineResponse; + "Browser.getHistograms": Browser.GetHistogramsResponse; + "Browser.getHistogram": Browser.GetHistogramResponse; + "Browser.getWindowBounds": Browser.GetWindowBoundsResponse; + "Browser.getWindowForTarget": Browser.GetWindowForTargetResponse; + "Browser.setWindowBounds": Browser.SetWindowBoundsResponse; + "Browser.setDockTile": Browser.SetDockTileResponse; + "Browser.executeBrowserCommand": Browser.ExecuteBrowserCommandResponse; + "Browser.addPrivacySandboxEnrollmentOverride": Browser.AddPrivacySandboxEnrollmentOverrideResponse; + "CacheStorage.deleteCache": CacheStorage.DeleteCacheResponse; + "CacheStorage.deleteEntry": CacheStorage.DeleteEntryResponse; + "CacheStorage.requestCacheNames": CacheStorage.RequestCacheNamesResponse; + "CacheStorage.requestCachedResponse": CacheStorage.RequestCachedResponseResponse; + "CacheStorage.requestEntries": CacheStorage.RequestEntriesResponse; + "Cast.enable": Cast.EnableResponse; + "Cast.disable": Cast.DisableResponse; + "Cast.setSinkToUse": Cast.SetSinkToUseResponse; + "Cast.startDesktopMirroring": Cast.StartDesktopMirroringResponse; + "Cast.startTabMirroring": Cast.StartTabMirroringResponse; + "Cast.stopCasting": Cast.StopCastingResponse; + "CSS.addRule": CSS.AddRuleResponse; + "CSS.collectClassNames": CSS.CollectClassNamesResponse; + "CSS.createStyleSheet": CSS.CreateStyleSheetResponse; + "CSS.disable": CSS.DisableResponse; + "CSS.enable": CSS.EnableResponse; + "CSS.forcePseudoState": CSS.ForcePseudoStateResponse; + "CSS.getBackgroundColors": CSS.GetBackgroundColorsResponse; + "CSS.getComputedStyleForNode": CSS.GetComputedStyleForNodeResponse; + "CSS.getInlineStylesForNode": CSS.GetInlineStylesForNodeResponse; + "CSS.getMatchedStylesForNode": CSS.GetMatchedStylesForNodeResponse; + "CSS.getMediaQueries": CSS.GetMediaQueriesResponse; + "CSS.getPlatformFontsForNode": CSS.GetPlatformFontsForNodeResponse; + "CSS.getStyleSheetText": CSS.GetStyleSheetTextResponse; + "CSS.getLayersForNode": CSS.GetLayersForNodeResponse; + "CSS.trackComputedStyleUpdates": CSS.TrackComputedStyleUpdatesResponse; + "CSS.takeComputedStyleUpdates": CSS.TakeComputedStyleUpdatesResponse; + "CSS.setEffectivePropertyValueForNode": CSS.SetEffectivePropertyValueForNodeResponse; + "CSS.setKeyframeKey": CSS.SetKeyframeKeyResponse; + "CSS.setMediaText": CSS.SetMediaTextResponse; + "CSS.setContainerQueryText": CSS.SetContainerQueryTextResponse; + "CSS.setSupportsText": CSS.SetSupportsTextResponse; + "CSS.setScopeText": CSS.SetScopeTextResponse; + "CSS.setRuleSelector": CSS.SetRuleSelectorResponse; + "CSS.setStyleSheetText": CSS.SetStyleSheetTextResponse; + "CSS.setStyleTexts": CSS.SetStyleTextsResponse; + "CSS.startRuleUsageTracking": CSS.StartRuleUsageTrackingResponse; + "CSS.stopRuleUsageTracking": CSS.StopRuleUsageTrackingResponse; + "CSS.takeCoverageDelta": CSS.TakeCoverageDeltaResponse; + "CSS.setLocalFontsEnabled": CSS.SetLocalFontsEnabledResponse; + "Database.disable": Database.DisableResponse; + "Database.enable": Database.EnableResponse; + "Database.executeSQL": Database.ExecuteSQLResponse; + "Database.getDatabaseTableNames": Database.GetDatabaseTableNamesResponse; + "DeviceAccess.enable": DeviceAccess.EnableResponse; + "DeviceAccess.disable": DeviceAccess.DisableResponse; + "DeviceAccess.selectPrompt": DeviceAccess.SelectPromptResponse; + "DeviceAccess.cancelPrompt": DeviceAccess.CancelPromptResponse; + "DeviceOrientation.clearDeviceOrientationOverride": DeviceOrientation.ClearDeviceOrientationOverrideResponse; + "DeviceOrientation.setDeviceOrientationOverride": DeviceOrientation.SetDeviceOrientationOverrideResponse; + "DOM.collectClassNamesFromSubtree": DOM.CollectClassNamesFromSubtreeResponse; + "DOM.copyTo": DOM.CopyToResponse; + "DOM.describeNode": DOM.DescribeNodeResponse; + "DOM.scrollIntoViewIfNeeded": DOM.ScrollIntoViewIfNeededResponse; + "DOM.disable": DOM.DisableResponse; + "DOM.discardSearchResults": DOM.DiscardSearchResultsResponse; + "DOM.enable": DOM.EnableResponse; + "DOM.focus": DOM.FocusResponse; + "DOM.getAttributes": DOM.GetAttributesResponse; + "DOM.getBoxModel": DOM.GetBoxModelResponse; + "DOM.getContentQuads": DOM.GetContentQuadsResponse; + "DOM.getDocument": DOM.GetDocumentResponse; + "DOM.getFlattenedDocument": DOM.GetFlattenedDocumentResponse; + "DOM.getNodesForSubtreeByStyle": DOM.GetNodesForSubtreeByStyleResponse; + "DOM.getNodeForLocation": DOM.GetNodeForLocationResponse; + "DOM.getOuterHTML": DOM.GetOuterHTMLResponse; + "DOM.getRelayoutBoundary": DOM.GetRelayoutBoundaryResponse; + "DOM.getSearchResults": DOM.GetSearchResultsResponse; + "DOM.hideHighlight": DOM.HideHighlightResponse; + "DOM.highlightNode": DOM.HighlightNodeResponse; + "DOM.highlightRect": DOM.HighlightRectResponse; + "DOM.markUndoableState": DOM.MarkUndoableStateResponse; + "DOM.moveTo": DOM.MoveToResponse; + "DOM.performSearch": DOM.PerformSearchResponse; + "DOM.pushNodeByPathToFrontend": DOM.PushNodeByPathToFrontendResponse; + "DOM.pushNodesByBackendIdsToFrontend": DOM.PushNodesByBackendIdsToFrontendResponse; + "DOM.querySelector": DOM.QuerySelectorResponse; + "DOM.querySelectorAll": DOM.QuerySelectorAllResponse; + "DOM.getTopLayerElements": DOM.GetTopLayerElementsResponse; + "DOM.redo": DOM.RedoResponse; + "DOM.removeAttribute": DOM.RemoveAttributeResponse; + "DOM.removeNode": DOM.RemoveNodeResponse; + "DOM.requestChildNodes": DOM.RequestChildNodesResponse; + "DOM.requestNode": DOM.RequestNodeResponse; + "DOM.resolveNode": DOM.ResolveNodeResponse; + "DOM.setAttributeValue": DOM.SetAttributeValueResponse; + "DOM.setAttributesAsText": DOM.SetAttributesAsTextResponse; + "DOM.setFileInputFiles": DOM.SetFileInputFilesResponse; + "DOM.setNodeStackTracesEnabled": DOM.SetNodeStackTracesEnabledResponse; + "DOM.getNodeStackTraces": DOM.GetNodeStackTracesResponse; + "DOM.getFileInfo": DOM.GetFileInfoResponse; + "DOM.setInspectedNode": DOM.SetInspectedNodeResponse; + "DOM.setNodeName": DOM.SetNodeNameResponse; + "DOM.setNodeValue": DOM.SetNodeValueResponse; + "DOM.setOuterHTML": DOM.SetOuterHTMLResponse; + "DOM.undo": DOM.UndoResponse; + "DOM.getFrameOwner": DOM.GetFrameOwnerResponse; + "DOM.getContainerForNode": DOM.GetContainerForNodeResponse; + "DOM.getQueryingDescendantsForContainer": DOM.GetQueryingDescendantsForContainerResponse; + "DOMDebugger.getEventListeners": DOMDebugger.GetEventListenersResponse; + "DOMDebugger.removeDOMBreakpoint": DOMDebugger.RemoveDOMBreakpointResponse; + "DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.RemoveEventListenerBreakpointResponse; + "DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.RemoveInstrumentationBreakpointResponse; + "DOMDebugger.removeXHRBreakpoint": DOMDebugger.RemoveXHRBreakpointResponse; + "DOMDebugger.setBreakOnCSPViolation": DOMDebugger.SetBreakOnCSPViolationResponse; + "DOMDebugger.setDOMBreakpoint": DOMDebugger.SetDOMBreakpointResponse; + "DOMDebugger.setEventListenerBreakpoint": DOMDebugger.SetEventListenerBreakpointResponse; + "DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.SetInstrumentationBreakpointResponse; + "DOMDebugger.setXHRBreakpoint": DOMDebugger.SetXHRBreakpointResponse; + "DOMSnapshot.disable": DOMSnapshot.DisableResponse; + "DOMSnapshot.enable": DOMSnapshot.EnableResponse; + "DOMSnapshot.getSnapshot": DOMSnapshot.GetSnapshotResponse; + "DOMSnapshot.captureSnapshot": DOMSnapshot.CaptureSnapshotResponse; + "DOMStorage.clear": DOMStorage.ClearResponse; + "DOMStorage.disable": DOMStorage.DisableResponse; + "DOMStorage.enable": DOMStorage.EnableResponse; + "DOMStorage.getDOMStorageItems": DOMStorage.GetDOMStorageItemsResponse; + "DOMStorage.removeDOMStorageItem": DOMStorage.RemoveDOMStorageItemResponse; + "DOMStorage.setDOMStorageItem": DOMStorage.SetDOMStorageItemResponse; + "Emulation.canEmulate": Emulation.CanEmulateResponse; + "Emulation.clearDeviceMetricsOverride": Emulation.ClearDeviceMetricsOverrideResponse; + "Emulation.clearGeolocationOverride": Emulation.ClearGeolocationOverrideResponse; + "Emulation.resetPageScaleFactor": Emulation.ResetPageScaleFactorResponse; + "Emulation.setFocusEmulationEnabled": Emulation.SetFocusEmulationEnabledResponse; + "Emulation.setAutoDarkModeOverride": Emulation.SetAutoDarkModeOverrideResponse; + "Emulation.setCPUThrottlingRate": Emulation.SetCPUThrottlingRateResponse; + "Emulation.setDefaultBackgroundColorOverride": Emulation.SetDefaultBackgroundColorOverrideResponse; + "Emulation.setDeviceMetricsOverride": Emulation.SetDeviceMetricsOverrideResponse; + "Emulation.setScrollbarsHidden": Emulation.SetScrollbarsHiddenResponse; + "Emulation.setDocumentCookieDisabled": Emulation.SetDocumentCookieDisabledResponse; + "Emulation.setEmitTouchEventsForMouse": Emulation.SetEmitTouchEventsForMouseResponse; + "Emulation.setEmulatedMedia": Emulation.SetEmulatedMediaResponse; + "Emulation.setEmulatedVisionDeficiency": Emulation.SetEmulatedVisionDeficiencyResponse; + "Emulation.setGeolocationOverride": Emulation.SetGeolocationOverrideResponse; + "Emulation.setIdleOverride": Emulation.SetIdleOverrideResponse; + "Emulation.clearIdleOverride": Emulation.ClearIdleOverrideResponse; + "Emulation.setNavigatorOverrides": Emulation.SetNavigatorOverridesResponse; + "Emulation.setPageScaleFactor": Emulation.SetPageScaleFactorResponse; + "Emulation.setScriptExecutionDisabled": Emulation.SetScriptExecutionDisabledResponse; + "Emulation.setTouchEmulationEnabled": Emulation.SetTouchEmulationEnabledResponse; + "Emulation.setVirtualTimePolicy": Emulation.SetVirtualTimePolicyResponse; + "Emulation.setLocaleOverride": Emulation.SetLocaleOverrideResponse; + "Emulation.setTimezoneOverride": Emulation.SetTimezoneOverrideResponse; + "Emulation.setVisibleSize": Emulation.SetVisibleSizeResponse; + "Emulation.setDisabledImageTypes": Emulation.SetDisabledImageTypesResponse; + "Emulation.setHardwareConcurrencyOverride": Emulation.SetHardwareConcurrencyOverrideResponse; + "Emulation.setUserAgentOverride": Emulation.SetUserAgentOverrideResponse; + "Emulation.setAutomationOverride": Emulation.SetAutomationOverrideResponse; + "EventBreakpoints.setInstrumentationBreakpoint": EventBreakpoints.SetInstrumentationBreakpointResponse; + "EventBreakpoints.removeInstrumentationBreakpoint": EventBreakpoints.RemoveInstrumentationBreakpointResponse; + "FedCm.enable": FedCm.EnableResponse; + "FedCm.disable": FedCm.DisableResponse; + "FedCm.selectAccount": FedCm.SelectAccountResponse; + "FedCm.dismissDialog": FedCm.DismissDialogResponse; + "FedCm.resetCooldown": FedCm.ResetCooldownResponse; + "Fetch.disable": Fetch.DisableResponse; + "Fetch.enable": Fetch.EnableResponse; + "Fetch.failRequest": Fetch.FailRequestResponse; + "Fetch.fulfillRequest": Fetch.FulfillRequestResponse; + "Fetch.continueRequest": Fetch.ContinueRequestResponse; + "Fetch.continueWithAuth": Fetch.ContinueWithAuthResponse; + "Fetch.continueResponse": Fetch.ContinueResponseResponse; + "Fetch.getResponseBody": Fetch.GetResponseBodyResponse; + "Fetch.takeResponseBodyAsStream": Fetch.TakeResponseBodyAsStreamResponse; + "HeadlessExperimental.beginFrame": HeadlessExperimental.BeginFrameResponse; + "HeadlessExperimental.disable": HeadlessExperimental.DisableResponse; + "HeadlessExperimental.enable": HeadlessExperimental.EnableResponse; + "IndexedDB.clearObjectStore": IndexedDB.ClearObjectStoreResponse; + "IndexedDB.deleteDatabase": IndexedDB.DeleteDatabaseResponse; + "IndexedDB.deleteObjectStoreEntries": IndexedDB.DeleteObjectStoreEntriesResponse; + "IndexedDB.disable": IndexedDB.DisableResponse; + "IndexedDB.enable": IndexedDB.EnableResponse; + "IndexedDB.requestData": IndexedDB.RequestDataResponse; + "IndexedDB.getMetadata": IndexedDB.GetMetadataResponse; + "IndexedDB.requestDatabase": IndexedDB.RequestDatabaseResponse; + "IndexedDB.requestDatabaseNames": IndexedDB.RequestDatabaseNamesResponse; + "Input.dispatchDragEvent": Input.DispatchDragEventResponse; + "Input.dispatchKeyEvent": Input.DispatchKeyEventResponse; + "Input.insertText": Input.InsertTextResponse; + "Input.imeSetComposition": Input.ImeSetCompositionResponse; + "Input.dispatchMouseEvent": Input.DispatchMouseEventResponse; + "Input.dispatchTouchEvent": Input.DispatchTouchEventResponse; + "Input.cancelDragging": Input.CancelDraggingResponse; + "Input.emulateTouchFromMouseEvent": Input.EmulateTouchFromMouseEventResponse; + "Input.setIgnoreInputEvents": Input.SetIgnoreInputEventsResponse; + "Input.setInterceptDrags": Input.SetInterceptDragsResponse; + "Input.synthesizePinchGesture": Input.SynthesizePinchGestureResponse; + "Input.synthesizeScrollGesture": Input.SynthesizeScrollGestureResponse; + "Input.synthesizeTapGesture": Input.SynthesizeTapGestureResponse; + "IO.close": IO.CloseResponse; + "IO.read": IO.ReadResponse; + "IO.resolveBlob": IO.ResolveBlobResponse; + "LayerTree.compositingReasons": LayerTree.CompositingReasonsResponse; + "LayerTree.disable": LayerTree.DisableResponse; + "LayerTree.enable": LayerTree.EnableResponse; + "LayerTree.loadSnapshot": LayerTree.LoadSnapshotResponse; + "LayerTree.makeSnapshot": LayerTree.MakeSnapshotResponse; + "LayerTree.profileSnapshot": LayerTree.ProfileSnapshotResponse; + "LayerTree.releaseSnapshot": LayerTree.ReleaseSnapshotResponse; + "LayerTree.replaySnapshot": LayerTree.ReplaySnapshotResponse; + "LayerTree.snapshotCommandLog": LayerTree.SnapshotCommandLogResponse; + "Log.clear": Log.ClearResponse; + "Log.disable": Log.DisableResponse; + "Log.enable": Log.EnableResponse; + "Log.startViolationsReport": Log.StartViolationsReportResponse; + "Log.stopViolationsReport": Log.StopViolationsReportResponse; + "Media.enable": Media.EnableResponse; + "Media.disable": Media.DisableResponse; + "Overlay.disable": Overlay.DisableResponse; + "Overlay.enable": Overlay.EnableResponse; + "Overlay.getHighlightObjectForTest": Overlay.GetHighlightObjectForTestResponse; + "Overlay.getGridHighlightObjectsForTest": Overlay.GetGridHighlightObjectsForTestResponse; + "Overlay.getSourceOrderHighlightObjectForTest": Overlay.GetSourceOrderHighlightObjectForTestResponse; + "Overlay.hideHighlight": Overlay.HideHighlightResponse; + "Overlay.highlightFrame": Overlay.HighlightFrameResponse; + "Overlay.highlightNode": Overlay.HighlightNodeResponse; + "Overlay.highlightQuad": Overlay.HighlightQuadResponse; + "Overlay.highlightRect": Overlay.HighlightRectResponse; + "Overlay.highlightSourceOrder": Overlay.HighlightSourceOrderResponse; + "Overlay.setInspectMode": Overlay.SetInspectModeResponse; + "Overlay.setShowAdHighlights": Overlay.SetShowAdHighlightsResponse; + "Overlay.setPausedInDebuggerMessage": Overlay.SetPausedInDebuggerMessageResponse; + "Overlay.setShowDebugBorders": Overlay.SetShowDebugBordersResponse; + "Overlay.setShowFPSCounter": Overlay.SetShowFPSCounterResponse; + "Overlay.setShowGridOverlays": Overlay.SetShowGridOverlaysResponse; + "Overlay.setShowFlexOverlays": Overlay.SetShowFlexOverlaysResponse; + "Overlay.setShowScrollSnapOverlays": Overlay.SetShowScrollSnapOverlaysResponse; + "Overlay.setShowContainerQueryOverlays": Overlay.SetShowContainerQueryOverlaysResponse; + "Overlay.setShowPaintRects": Overlay.SetShowPaintRectsResponse; + "Overlay.setShowLayoutShiftRegions": Overlay.SetShowLayoutShiftRegionsResponse; + "Overlay.setShowScrollBottleneckRects": Overlay.SetShowScrollBottleneckRectsResponse; + "Overlay.setShowHitTestBorders": Overlay.SetShowHitTestBordersResponse; + "Overlay.setShowWebVitals": Overlay.SetShowWebVitalsResponse; + "Overlay.setShowViewportSizeOnResize": Overlay.SetShowViewportSizeOnResizeResponse; + "Overlay.setShowHinge": Overlay.SetShowHingeResponse; + "Overlay.setShowIsolatedElements": Overlay.SetShowIsolatedElementsResponse; + "Page.addScriptToEvaluateOnLoad": Page.AddScriptToEvaluateOnLoadResponse; + "Page.addScriptToEvaluateOnNewDocument": Page.AddScriptToEvaluateOnNewDocumentResponse; + "Page.bringToFront": Page.BringToFrontResponse; + "Page.captureScreenshot": Page.CaptureScreenshotResponse; + "Page.captureSnapshot": Page.CaptureSnapshotResponse; + "Page.clearDeviceMetricsOverride": Page.ClearDeviceMetricsOverrideResponse; + "Page.clearDeviceOrientationOverride": Page.ClearDeviceOrientationOverrideResponse; + "Page.clearGeolocationOverride": Page.ClearGeolocationOverrideResponse; + "Page.createIsolatedWorld": Page.CreateIsolatedWorldResponse; + "Page.deleteCookie": Page.DeleteCookieResponse; + "Page.disable": Page.DisableResponse; + "Page.enable": Page.EnableResponse; + "Page.getAppManifest": Page.GetAppManifestResponse; + "Page.getInstallabilityErrors": Page.GetInstallabilityErrorsResponse; + "Page.getManifestIcons": Page.GetManifestIconsResponse; + "Page.getAppId": Page.GetAppIdResponse; + "Page.getAdScriptId": Page.GetAdScriptIdResponse; + "Page.getCookies": Page.GetCookiesResponse; + "Page.getFrameTree": Page.GetFrameTreeResponse; + "Page.getLayoutMetrics": Page.GetLayoutMetricsResponse; + "Page.getNavigationHistory": Page.GetNavigationHistoryResponse; + "Page.resetNavigationHistory": Page.ResetNavigationHistoryResponse; + "Page.getResourceContent": Page.GetResourceContentResponse; + "Page.getResourceTree": Page.GetResourceTreeResponse; + "Page.handleJavaScriptDialog": Page.HandleJavaScriptDialogResponse; + "Page.navigate": Page.NavigateResponse; + "Page.navigateToHistoryEntry": Page.NavigateToHistoryEntryResponse; + "Page.printToPDF": Page.PrintToPDFResponse; + "Page.reload": Page.ReloadResponse; + "Page.removeScriptToEvaluateOnLoad": Page.RemoveScriptToEvaluateOnLoadResponse; + "Page.removeScriptToEvaluateOnNewDocument": Page.RemoveScriptToEvaluateOnNewDocumentResponse; + "Page.screencastFrameAck": Page.ScreencastFrameAckResponse; + "Page.searchInResource": Page.SearchInResourceResponse; + "Page.setAdBlockingEnabled": Page.SetAdBlockingEnabledResponse; + "Page.setBypassCSP": Page.SetBypassCSPResponse; + "Page.getPermissionsPolicyState": Page.GetPermissionsPolicyStateResponse; + "Page.getOriginTrials": Page.GetOriginTrialsResponse; + "Page.setDeviceMetricsOverride": Page.SetDeviceMetricsOverrideResponse; + "Page.setDeviceOrientationOverride": Page.SetDeviceOrientationOverrideResponse; + "Page.setFontFamilies": Page.SetFontFamiliesResponse; + "Page.setFontSizes": Page.SetFontSizesResponse; + "Page.setDocumentContent": Page.SetDocumentContentResponse; + "Page.setDownloadBehavior": Page.SetDownloadBehaviorResponse; + "Page.setGeolocationOverride": Page.SetGeolocationOverrideResponse; + "Page.setLifecycleEventsEnabled": Page.SetLifecycleEventsEnabledResponse; + "Page.setTouchEmulationEnabled": Page.SetTouchEmulationEnabledResponse; + "Page.startScreencast": Page.StartScreencastResponse; + "Page.stopLoading": Page.StopLoadingResponse; + "Page.crash": Page.CrashResponse; + "Page.close": Page.CloseResponse; + "Page.setWebLifecycleState": Page.SetWebLifecycleStateResponse; + "Page.stopScreencast": Page.StopScreencastResponse; + "Page.produceCompilationCache": Page.ProduceCompilationCacheResponse; + "Page.addCompilationCache": Page.AddCompilationCacheResponse; + "Page.clearCompilationCache": Page.ClearCompilationCacheResponse; + "Page.setSPCTransactionMode": Page.SetSPCTransactionModeResponse; + "Page.setRPHRegistrationMode": Page.SetRPHRegistrationModeResponse; + "Page.generateTestReport": Page.GenerateTestReportResponse; + "Page.waitForDebugger": Page.WaitForDebuggerResponse; + "Page.setInterceptFileChooserDialog": Page.SetInterceptFileChooserDialogResponse; + "Page.setPrerenderingAllowed": Page.SetPrerenderingAllowedResponse; + "Performance.disable": Performance.DisableResponse; + "Performance.enable": Performance.EnableResponse; + "Performance.setTimeDomain": Performance.SetTimeDomainResponse; + "Performance.getMetrics": Performance.GetMetricsResponse; + "PerformanceTimeline.enable": PerformanceTimeline.EnableResponse; + "Preload.enable": Preload.EnableResponse; + "Preload.disable": Preload.DisableResponse; + "Schema.getDomains": Schema.GetDomainsResponse; + "Security.disable": Security.DisableResponse; + "Security.enable": Security.EnableResponse; + "Security.setIgnoreCertificateErrors": Security.SetIgnoreCertificateErrorsResponse; + "Security.handleCertificateError": Security.HandleCertificateErrorResponse; + "Security.setOverrideCertificateErrors": Security.SetOverrideCertificateErrorsResponse; + "ServiceWorker.deliverPushMessage": ServiceWorker.DeliverPushMessageResponse; + "ServiceWorker.disable": ServiceWorker.DisableResponse; + "ServiceWorker.dispatchSyncEvent": ServiceWorker.DispatchSyncEventResponse; + "ServiceWorker.dispatchPeriodicSyncEvent": ServiceWorker.DispatchPeriodicSyncEventResponse; + "ServiceWorker.enable": ServiceWorker.EnableResponse; + "ServiceWorker.inspectWorker": ServiceWorker.InspectWorkerResponse; + "ServiceWorker.setForceUpdateOnPageLoad": ServiceWorker.SetForceUpdateOnPageLoadResponse; + "ServiceWorker.skipWaiting": ServiceWorker.SkipWaitingResponse; + "ServiceWorker.startWorker": ServiceWorker.StartWorkerResponse; + "ServiceWorker.stopAllWorkers": ServiceWorker.StopAllWorkersResponse; + "ServiceWorker.stopWorker": ServiceWorker.StopWorkerResponse; + "ServiceWorker.unregister": ServiceWorker.UnregisterResponse; + "ServiceWorker.updateRegistration": ServiceWorker.UpdateRegistrationResponse; + "Storage.getStorageKeyForFrame": Storage.GetStorageKeyForFrameResponse; + "Storage.clearDataForOrigin": Storage.ClearDataForOriginResponse; + "Storage.clearDataForStorageKey": Storage.ClearDataForStorageKeyResponse; + "Storage.getCookies": Storage.GetCookiesResponse; + "Storage.setCookies": Storage.SetCookiesResponse; + "Storage.clearCookies": Storage.ClearCookiesResponse; + "Storage.getUsageAndQuota": Storage.GetUsageAndQuotaResponse; + "Storage.overrideQuotaForOrigin": Storage.OverrideQuotaForOriginResponse; + "Storage.trackCacheStorageForOrigin": Storage.TrackCacheStorageForOriginResponse; + "Storage.trackCacheStorageForStorageKey": Storage.TrackCacheStorageForStorageKeyResponse; + "Storage.trackIndexedDBForOrigin": Storage.TrackIndexedDBForOriginResponse; + "Storage.trackIndexedDBForStorageKey": Storage.TrackIndexedDBForStorageKeyResponse; + "Storage.untrackCacheStorageForOrigin": Storage.UntrackCacheStorageForOriginResponse; + "Storage.untrackCacheStorageForStorageKey": Storage.UntrackCacheStorageForStorageKeyResponse; + "Storage.untrackIndexedDBForOrigin": Storage.UntrackIndexedDBForOriginResponse; + "Storage.untrackIndexedDBForStorageKey": Storage.UntrackIndexedDBForStorageKeyResponse; + "Storage.getTrustTokens": Storage.GetTrustTokensResponse; + "Storage.clearTrustTokens": Storage.ClearTrustTokensResponse; + "Storage.getInterestGroupDetails": Storage.GetInterestGroupDetailsResponse; + "Storage.setInterestGroupTracking": Storage.SetInterestGroupTrackingResponse; + "Storage.getSharedStorageMetadata": Storage.GetSharedStorageMetadataResponse; + "Storage.getSharedStorageEntries": Storage.GetSharedStorageEntriesResponse; + "Storage.setSharedStorageEntry": Storage.SetSharedStorageEntryResponse; + "Storage.deleteSharedStorageEntry": Storage.DeleteSharedStorageEntryResponse; + "Storage.clearSharedStorageEntries": Storage.ClearSharedStorageEntriesResponse; + "Storage.resetSharedStorageBudget": Storage.ResetSharedStorageBudgetResponse; + "Storage.setSharedStorageTracking": Storage.SetSharedStorageTrackingResponse; + "Storage.setStorageBucketTracking": Storage.SetStorageBucketTrackingResponse; + "Storage.deleteStorageBucket": Storage.DeleteStorageBucketResponse; + "Storage.runBounceTrackingMitigations": Storage.RunBounceTrackingMitigationsResponse; + "Storage.setAttributionReportingLocalTestingMode": Storage.SetAttributionReportingLocalTestingModeResponse; + "Storage.setAttributionReportingTracking": Storage.SetAttributionReportingTrackingResponse; + "SystemInfo.getInfo": SystemInfo.GetInfoResponse; + "SystemInfo.getFeatureState": SystemInfo.GetFeatureStateResponse; + "SystemInfo.getProcessInfo": SystemInfo.GetProcessInfoResponse; + "Target.activateTarget": Target.ActivateTargetResponse; + "Target.attachToTarget": Target.AttachToTargetResponse; + "Target.attachToBrowserTarget": Target.AttachToBrowserTargetResponse; + "Target.closeTarget": Target.CloseTargetResponse; + "Target.exposeDevToolsProtocol": Target.ExposeDevToolsProtocolResponse; + "Target.createBrowserContext": Target.CreateBrowserContextResponse; + "Target.getBrowserContexts": Target.GetBrowserContextsResponse; + "Target.createTarget": Target.CreateTargetResponse; + "Target.detachFromTarget": Target.DetachFromTargetResponse; + "Target.disposeBrowserContext": Target.DisposeBrowserContextResponse; + "Target.getTargetInfo": Target.GetTargetInfoResponse; + "Target.getTargets": Target.GetTargetsResponse; + "Target.sendMessageToTarget": Target.SendMessageToTargetResponse; + "Target.setAutoAttach": Target.SetAutoAttachResponse; + "Target.autoAttachRelated": Target.AutoAttachRelatedResponse; + "Target.setDiscoverTargets": Target.SetDiscoverTargetsResponse; + "Target.setRemoteLocations": Target.SetRemoteLocationsResponse; + "Tethering.bind": Tethering.BindResponse; + "Tethering.unbind": Tethering.UnbindResponse; + "Tracing.end": Tracing.EndResponse; + "Tracing.getCategories": Tracing.GetCategoriesResponse; + "Tracing.recordClockSyncMarker": Tracing.RecordClockSyncMarkerResponse; + "Tracing.requestMemoryDump": Tracing.RequestMemoryDumpResponse; + "Tracing.start": Tracing.StartResponse; + "WebAudio.enable": WebAudio.EnableResponse; + "WebAudio.disable": WebAudio.DisableResponse; + "WebAudio.getRealtimeData": WebAudio.GetRealtimeDataResponse; + "WebAuthn.enable": WebAuthn.EnableResponse; + "WebAuthn.disable": WebAuthn.DisableResponse; + "WebAuthn.addVirtualAuthenticator": WebAuthn.AddVirtualAuthenticatorResponse; + "WebAuthn.setResponseOverrideBits": WebAuthn.SetResponseOverrideBitsResponse; + "WebAuthn.removeVirtualAuthenticator": WebAuthn.RemoveVirtualAuthenticatorResponse; + "WebAuthn.addCredential": WebAuthn.AddCredentialResponse; + "WebAuthn.getCredential": WebAuthn.GetCredentialResponse; + "WebAuthn.getCredentials": WebAuthn.GetCredentialsResponse; + "WebAuthn.removeCredential": WebAuthn.RemoveCredentialResponse; + "WebAuthn.clearCredentials": WebAuthn.ClearCredentialsResponse; + "WebAuthn.setUserVerified": WebAuthn.SetUserVerifiedResponse; + "WebAuthn.setAutomaticPresenceSimulation": WebAuthn.SetAutomaticPresenceSimulationResponse; + }; + + export type Event<T extends keyof EventMap = keyof EventMap> = { + readonly method: T; + readonly params: EventMap[T]; + }; + + export type Request<T extends keyof RequestMap = keyof RequestMap> = { + readonly id: number; + readonly method: T; + readonly params: RequestMap[T]; + }; + + export type Response<T extends keyof ResponseMap = keyof ResponseMap> = { + readonly id: number; + } & ( + | { + readonly method?: T; + readonly result: ResponseMap[T]; + } + | { + readonly error: { + readonly code?: string; + readonly message: string; + }; + } + ); +} diff --git a/packages/bun-inspector-protocol/src/protocol/v8/protocol.json b/packages/bun-inspector-protocol/src/protocol/v8/protocol.json new file mode 100644 index 000000000..979091bf0 --- /dev/null +++ b/packages/bun-inspector-protocol/src/protocol/v8/protocol.json @@ -0,0 +1,14136 @@ +{ + "name": "V8", + "version": { "major": "1", "minor": "3" }, + "domains": [ + { + "domain": "Accessibility", + "experimental": true, + "dependencies": ["DOM"], + "types": [ + { "id": "AXNodeId", "description": "Unique accessibility node identifier.", "type": "string" }, + { + "id": "AXValueType", + "description": "Enum of possible property types.", + "type": "string", + "enum": [ + "boolean", + "tristate", + "booleanOrUndefined", + "idref", + "idrefList", + "integer", + "node", + "nodeList", + "number", + "string", + "computedString", + "token", + "tokenList", + "domRelation", + "role", + "internalRole", + "valueUndefined" + ] + }, + { + "id": "AXValueSourceType", + "description": "Enum of possible property sources.", + "type": "string", + "enum": ["attribute", "implicit", "style", "contents", "placeholder", "relatedElement"] + }, + { + "id": "AXValueNativeSourceType", + "description": "Enum of possible native property sources (as a subtype of a particular AXValueSourceType).", + "type": "string", + "enum": [ + "description", + "figcaption", + "label", + "labelfor", + "labelwrapped", + "legend", + "rubyannotation", + "tablecaption", + "title", + "other" + ] + }, + { + "id": "AXValueSource", + "description": "A single source for a computed AX property.", + "type": "object", + "properties": [ + { "name": "type", "description": "What type of source this is.", "$ref": "AXValueSourceType" }, + { + "name": "value", + "description": "The value of this property source.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "attribute", + "description": "The name of the relevant attribute, if any.", + "optional": true, + "type": "string" + }, + { + "name": "attributeValue", + "description": "The value of the relevant attribute, if any.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "superseded", + "description": "Whether this source is superseded by a higher priority source.", + "optional": true, + "type": "boolean" + }, + { + "name": "nativeSource", + "description": "The native markup source for this value, e.g. a `<label>` element.", + "optional": true, + "$ref": "AXValueNativeSourceType" + }, + { + "name": "nativeSourceValue", + "description": "The value, such as a node or node list, of the native source.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "invalid", + "description": "Whether the value for this property is invalid.", + "optional": true, + "type": "boolean" + }, + { + "name": "invalidReason", + "description": "Reason for the value being invalid, if it is.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "AXRelatedNode", + "type": "object", + "properties": [ + { + "name": "backendDOMNodeId", + "description": "The BackendNodeId of the related DOM node.", + "$ref": "DOM.BackendNodeId" + }, + { "name": "idref", "description": "The IDRef value provided, if any.", "optional": true, "type": "string" }, + { + "name": "text", + "description": "The text alternative of this node in the current context.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "AXProperty", + "type": "object", + "properties": [ + { "name": "name", "description": "The name of this property.", "$ref": "AXPropertyName" }, + { "name": "value", "description": "The value of this property.", "$ref": "AXValue" } + ] + }, + { + "id": "AXValue", + "description": "A single computed AX property.", + "type": "object", + "properties": [ + { "name": "type", "description": "The type of this value.", "$ref": "AXValueType" }, + { "name": "value", "description": "The computed value of this property.", "optional": true, "type": "any" }, + { + "name": "relatedNodes", + "description": "One or more related nodes, if applicable.", + "optional": true, + "type": "array", + "items": { "$ref": "AXRelatedNode" } + }, + { + "name": "sources", + "description": "The sources which contributed to the computation of this property.", + "optional": true, + "type": "array", + "items": { "$ref": "AXValueSource" } + } + ] + }, + { + "id": "AXPropertyName", + "description": "Values of AXProperty name:\n- from 'busy' to 'roledescription': states which apply to every AX node\n- from 'live' to 'root': attributes which apply to nodes in live regions\n- from 'autocomplete' to 'valuetext': attributes which apply to widgets\n- from 'checked' to 'selected': states which apply to widgets\n- from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.", + "type": "string", + "enum": [ + "busy", + "disabled", + "editable", + "focusable", + "focused", + "hidden", + "hiddenRoot", + "invalid", + "keyshortcuts", + "settable", + "roledescription", + "live", + "atomic", + "relevant", + "root", + "autocomplete", + "hasPopup", + "level", + "multiselectable", + "orientation", + "multiline", + "readonly", + "required", + "valuemin", + "valuemax", + "valuetext", + "checked", + "expanded", + "modal", + "pressed", + "selected", + "activedescendant", + "controls", + "describedby", + "details", + "errormessage", + "flowto", + "labelledby", + "owns" + ] + }, + { + "id": "AXNode", + "description": "A node in the accessibility tree.", + "type": "object", + "properties": [ + { "name": "nodeId", "description": "Unique identifier for this node.", "$ref": "AXNodeId" }, + { "name": "ignored", "description": "Whether this node is ignored for accessibility", "type": "boolean" }, + { + "name": "ignoredReasons", + "description": "Collection of reasons why this node is hidden.", + "optional": true, + "type": "array", + "items": { "$ref": "AXProperty" } + }, + { + "name": "role", + "description": "This `Node`'s role, whether explicit or implicit.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "chromeRole", + "description": "This `Node`'s Chrome raw role.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "name", + "description": "The accessible name for this `Node`.", + "optional": true, + "$ref": "AXValue" + }, + { + "name": "description", + "description": "The accessible description for this `Node`.", + "optional": true, + "$ref": "AXValue" + }, + { "name": "value", "description": "The value for this `Node`.", "optional": true, "$ref": "AXValue" }, + { + "name": "properties", + "description": "All other properties", + "optional": true, + "type": "array", + "items": { "$ref": "AXProperty" } + }, + { "name": "parentId", "description": "ID for this node's parent.", "optional": true, "$ref": "AXNodeId" }, + { + "name": "childIds", + "description": "IDs for each of this node's child nodes.", + "optional": true, + "type": "array", + "items": { "$ref": "AXNodeId" } + }, + { + "name": "backendDOMNodeId", + "description": "The backend ID for the associated DOM node, if any.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "frameId", + "description": "The frame ID for the frame associated with this nodes document.", + "optional": true, + "$ref": "Page.FrameId" + } + ] + } + ], + "commands": [ + { "name": "disable", "description": "Disables the accessibility domain." }, + { + "name": "enable", + "description": "Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls.\nThis turns on accessibility for the page, which can impact performance until accessibility is disabled." + }, + { + "name": "getPartialAXTree", + "description": "Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "Identifier of the node to get the partial accessibility tree for.", + "optional": true, + "$ref": "DOM.NodeId" + }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node to get the partial accessibility tree for.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper to get the partial accessibility tree for.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "fetchRelatives", + "description": "Whether to fetch this node's ancestors, siblings and children. Defaults to true.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "nodes", + "description": "The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and\nchildren, if requested.", + "type": "array", + "items": { "$ref": "AXNode" } + } + ] + }, + { + "name": "getFullAXTree", + "description": "Fetches the entire accessibility tree for the root Document", + "experimental": true, + "parameters": [ + { + "name": "depth", + "description": "The maximum depth at which descendants of the root node should be retrieved.\nIf omitted, the full tree is returned.", + "optional": true, + "type": "integer" + }, + { + "name": "frameId", + "description": "The frame for whose document the AX tree should be retrieved.\nIf omited, the root frame is used.", + "optional": true, + "$ref": "Page.FrameId" + } + ], + "returns": [{ "name": "nodes", "type": "array", "items": { "$ref": "AXNode" } }] + }, + { + "name": "getRootAXNode", + "description": "Fetches the root node.\nRequires `enable()` to have been called previously.", + "experimental": true, + "parameters": [ + { + "name": "frameId", + "description": "The frame in whose document the node resides.\nIf omitted, the root frame is used.", + "optional": true, + "$ref": "Page.FrameId" + } + ], + "returns": [{ "name": "node", "$ref": "AXNode" }] + }, + { + "name": "getAXNodeAndAncestors", + "description": "Fetches a node and all ancestors up to and including the root.\nRequires `enable()` to have been called previously.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "Identifier of the node to get.", + "optional": true, + "$ref": "DOM.NodeId" + }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node to get.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper to get.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "nodes", "type": "array", "items": { "$ref": "AXNode" } }] + }, + { + "name": "getChildAXNodes", + "description": "Fetches a particular accessibility node by AXNodeId.\nRequires `enable()` to have been called previously.", + "experimental": true, + "parameters": [ + { "name": "id", "$ref": "AXNodeId" }, + { + "name": "frameId", + "description": "The frame in whose document the node resides.\nIf omitted, the root frame is used.", + "optional": true, + "$ref": "Page.FrameId" + } + ], + "returns": [{ "name": "nodes", "type": "array", "items": { "$ref": "AXNode" } }] + }, + { + "name": "queryAXTree", + "description": "Query a DOM node's accessibility subtree for accessible name and role.\nThis command computes the name and role for all nodes in the subtree, including those that are\nignored for accessibility, and returns those that mactch the specified name and role. If no DOM\nnode is specified, or the DOM node does not exist, the command returns an error. If neither\n`accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "Identifier of the node for the root to query.", + "optional": true, + "$ref": "DOM.NodeId" + }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node for the root to query.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper for the root to query.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "accessibleName", + "description": "Find nodes with this computed name.", + "optional": true, + "type": "string" + }, + { "name": "role", "description": "Find nodes with this computed role.", "optional": true, "type": "string" } + ], + "returns": [ + { + "name": "nodes", + "description": "A list of `Accessibility.AXNode` matching the specified attributes,\nincluding nodes that are ignored for accessibility.", + "type": "array", + "items": { "$ref": "AXNode" } + } + ] + } + ], + "events": [ + { + "name": "loadComplete", + "description": "The loadComplete event mirrors the load complete event sent by the browser to assistive\ntechnology when the web page has finished loading.", + "experimental": true, + "parameters": [{ "name": "root", "description": "New document root node.", "$ref": "AXNode" }] + }, + { + "name": "nodesUpdated", + "description": "The nodesUpdated event is sent every time a previously requested node has changed the in tree.", + "experimental": true, + "parameters": [ + { "name": "nodes", "description": "Updated node data.", "type": "array", "items": { "$ref": "AXNode" } } + ] + } + ] + }, + { + "domain": "Animation", + "experimental": true, + "dependencies": ["Runtime", "DOM"], + "types": [ + { + "id": "Animation", + "description": "Animation instance.", + "type": "object", + "properties": [ + { "name": "id", "description": "`Animation`'s id.", "type": "string" }, + { "name": "name", "description": "`Animation`'s name.", "type": "string" }, + { "name": "pausedState", "description": "`Animation`'s internal paused state.", "type": "boolean" }, + { "name": "playState", "description": "`Animation`'s play state.", "type": "string" }, + { "name": "playbackRate", "description": "`Animation`'s playback rate.", "type": "number" }, + { "name": "startTime", "description": "`Animation`'s start time.", "type": "number" }, + { "name": "currentTime", "description": "`Animation`'s current time.", "type": "number" }, + { + "name": "type", + "description": "Animation type of `Animation`.", + "type": "string", + "enum": ["CSSTransition", "CSSAnimation", "WebAnimation"] + }, + { + "name": "source", + "description": "`Animation`'s source animation node.", + "optional": true, + "$ref": "AnimationEffect" + }, + { + "name": "cssId", + "description": "A unique ID for `Animation` representing the sources that triggered this CSS\nanimation/transition.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "AnimationEffect", + "description": "AnimationEffect instance", + "type": "object", + "properties": [ + { "name": "delay", "description": "`AnimationEffect`'s delay.", "type": "number" }, + { "name": "endDelay", "description": "`AnimationEffect`'s end delay.", "type": "number" }, + { "name": "iterationStart", "description": "`AnimationEffect`'s iteration start.", "type": "number" }, + { "name": "iterations", "description": "`AnimationEffect`'s iterations.", "type": "number" }, + { "name": "duration", "description": "`AnimationEffect`'s iteration duration.", "type": "number" }, + { "name": "direction", "description": "`AnimationEffect`'s playback direction.", "type": "string" }, + { "name": "fill", "description": "`AnimationEffect`'s fill mode.", "type": "string" }, + { + "name": "backendNodeId", + "description": "`AnimationEffect`'s target node.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "keyframesRule", + "description": "`AnimationEffect`'s keyframes.", + "optional": true, + "$ref": "KeyframesRule" + }, + { "name": "easing", "description": "`AnimationEffect`'s timing function.", "type": "string" } + ] + }, + { + "id": "KeyframesRule", + "description": "Keyframes Rule", + "type": "object", + "properties": [ + { "name": "name", "description": "CSS keyframed animation's name.", "optional": true, "type": "string" }, + { + "name": "keyframes", + "description": "List of animation keyframes.", + "type": "array", + "items": { "$ref": "KeyframeStyle" } + } + ] + }, + { + "id": "KeyframeStyle", + "description": "Keyframe Style", + "type": "object", + "properties": [ + { "name": "offset", "description": "Keyframe's time offset.", "type": "string" }, + { "name": "easing", "description": "`AnimationEffect`'s timing function.", "type": "string" } + ] + } + ], + "commands": [ + { "name": "disable", "description": "Disables animation domain notifications." }, + { "name": "enable", "description": "Enables animation domain notifications." }, + { + "name": "getCurrentTime", + "description": "Returns the current time of the an animation.", + "parameters": [{ "name": "id", "description": "Id of animation.", "type": "string" }], + "returns": [{ "name": "currentTime", "description": "Current time of the page.", "type": "number" }] + }, + { + "name": "getPlaybackRate", + "description": "Gets the playback rate of the document timeline.", + "returns": [ + { "name": "playbackRate", "description": "Playback rate for animations on page.", "type": "number" } + ] + }, + { + "name": "releaseAnimations", + "description": "Releases a set of animations to no longer be manipulated.", + "parameters": [ + { + "name": "animations", + "description": "List of animation ids to seek.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "resolveAnimation", + "description": "Gets the remote object of the Animation.", + "parameters": [{ "name": "animationId", "description": "Animation id.", "type": "string" }], + "returns": [ + { "name": "remoteObject", "description": "Corresponding remote object.", "$ref": "Runtime.RemoteObject" } + ] + }, + { + "name": "seekAnimations", + "description": "Seek a set of animations to a particular time within each animation.", + "parameters": [ + { + "name": "animations", + "description": "List of animation ids to seek.", + "type": "array", + "items": { "type": "string" } + }, + { "name": "currentTime", "description": "Set the current time of each animation.", "type": "number" } + ] + }, + { + "name": "setPaused", + "description": "Sets the paused state of a set of animations.", + "parameters": [ + { + "name": "animations", + "description": "Animations to set the pause state of.", + "type": "array", + "items": { "type": "string" } + }, + { "name": "paused", "description": "Paused state to set to.", "type": "boolean" } + ] + }, + { + "name": "setPlaybackRate", + "description": "Sets the playback rate of the document timeline.", + "parameters": [ + { "name": "playbackRate", "description": "Playback rate for animations on page", "type": "number" } + ] + }, + { + "name": "setTiming", + "description": "Sets the timing of an animation node.", + "parameters": [ + { "name": "animationId", "description": "Animation id.", "type": "string" }, + { "name": "duration", "description": "Duration of the animation.", "type": "number" }, + { "name": "delay", "description": "Delay of the animation.", "type": "number" } + ] + } + ], + "events": [ + { + "name": "animationCanceled", + "description": "Event for when an animation has been cancelled.", + "parameters": [{ "name": "id", "description": "Id of the animation that was cancelled.", "type": "string" }] + }, + { + "name": "animationCreated", + "description": "Event for each animation that has been created.", + "parameters": [{ "name": "id", "description": "Id of the animation that was created.", "type": "string" }] + }, + { + "name": "animationStarted", + "description": "Event for animation that has been started.", + "parameters": [{ "name": "animation", "description": "Animation that was started.", "$ref": "Animation" }] + } + ] + }, + { + "domain": "Audits", + "description": "Audits domain allows investigation of page violations and possible improvements.", + "experimental": true, + "dependencies": ["Network"], + "types": [ + { + "id": "AffectedCookie", + "description": "Information about a cookie that is affected by an inspector issue.", + "type": "object", + "properties": [ + { + "name": "name", + "description": "The following three properties uniquely identify a cookie", + "type": "string" + }, + { "name": "path", "type": "string" }, + { "name": "domain", "type": "string" } + ] + }, + { + "id": "AffectedRequest", + "description": "Information about a request that is affected by an inspector issue.", + "type": "object", + "properties": [ + { "name": "requestId", "description": "The unique request id.", "$ref": "Network.RequestId" }, + { "name": "url", "optional": true, "type": "string" } + ] + }, + { + "id": "AffectedFrame", + "description": "Information about the frame affected by an inspector issue.", + "type": "object", + "properties": [{ "name": "frameId", "$ref": "Page.FrameId" }] + }, + { + "id": "CookieExclusionReason", + "type": "string", + "enum": [ + "ExcludeSameSiteUnspecifiedTreatedAsLax", + "ExcludeSameSiteNoneInsecure", + "ExcludeSameSiteLax", + "ExcludeSameSiteStrict", + "ExcludeInvalidSameParty", + "ExcludeSamePartyCrossPartyContext", + "ExcludeDomainNonASCII", + "ExcludeThirdPartyCookieBlockedInFirstPartySet", + "ExcludeThirdPartyPhaseout" + ] + }, + { + "id": "CookieWarningReason", + "type": "string", + "enum": [ + "WarnSameSiteUnspecifiedCrossSiteContext", + "WarnSameSiteNoneInsecure", + "WarnSameSiteUnspecifiedLaxAllowUnsafe", + "WarnSameSiteStrictLaxDowngradeStrict", + "WarnSameSiteStrictCrossDowngradeStrict", + "WarnSameSiteStrictCrossDowngradeLax", + "WarnSameSiteLaxCrossDowngradeStrict", + "WarnSameSiteLaxCrossDowngradeLax", + "WarnAttributeValueExceedsMaxSize", + "WarnDomainNonASCII", + "WarnThirdPartyPhaseout" + ] + }, + { "id": "CookieOperation", "type": "string", "enum": ["SetCookie", "ReadCookie"] }, + { + "id": "CookieIssueDetails", + "description": "This information is currently necessary, as the front-end has a difficult\ntime finding a specific cookie. With this, we can convey specific error\ninformation without the cookie.", + "type": "object", + "properties": [ + { + "name": "cookie", + "description": "If AffectedCookie is not set then rawCookieLine contains the raw\nSet-Cookie header string. This hints at a problem where the\ncookie line is syntactically or semantically malformed in a way\nthat no valid cookie could be created.", + "optional": true, + "$ref": "AffectedCookie" + }, + { "name": "rawCookieLine", "optional": true, "type": "string" }, + { "name": "cookieWarningReasons", "type": "array", "items": { "$ref": "CookieWarningReason" } }, + { "name": "cookieExclusionReasons", "type": "array", "items": { "$ref": "CookieExclusionReason" } }, + { + "name": "operation", + "description": "Optionally identifies the site-for-cookies and the cookie url, which\nmay be used by the front-end as additional context.", + "$ref": "CookieOperation" + }, + { "name": "siteForCookies", "optional": true, "type": "string" }, + { "name": "cookieUrl", "optional": true, "type": "string" }, + { "name": "request", "optional": true, "$ref": "AffectedRequest" } + ] + }, + { + "id": "MixedContentResolutionStatus", + "type": "string", + "enum": ["MixedContentBlocked", "MixedContentAutomaticallyUpgraded", "MixedContentWarning"] + }, + { + "id": "MixedContentResourceType", + "type": "string", + "enum": [ + "AttributionSrc", + "Audio", + "Beacon", + "CSPReport", + "Download", + "EventSource", + "Favicon", + "Font", + "Form", + "Frame", + "Image", + "Import", + "Manifest", + "Ping", + "PluginData", + "PluginResource", + "Prefetch", + "Resource", + "Script", + "ServiceWorker", + "SharedWorker", + "Stylesheet", + "Track", + "Video", + "Worker", + "XMLHttpRequest", + "XSLT" + ] + }, + { + "id": "MixedContentIssueDetails", + "type": "object", + "properties": [ + { + "name": "resourceType", + "description": "The type of resource causing the mixed content issue (css, js, iframe,\nform,...). Marked as optional because it is mapped to from\nblink::mojom::RequestContextType, which will be replaced\nby network::mojom::RequestDestination", + "optional": true, + "$ref": "MixedContentResourceType" + }, + { + "name": "resolutionStatus", + "description": "The way the mixed content issue is being resolved.", + "$ref": "MixedContentResolutionStatus" + }, + { + "name": "insecureURL", + "description": "The unsafe http url causing the mixed content issue.", + "type": "string" + }, + { + "name": "mainResourceURL", + "description": "The url responsible for the call to an unsafe url.", + "type": "string" + }, + { + "name": "request", + "description": "The mixed content request.\nDoes not always exist (e.g. for unsafe form submission urls).", + "optional": true, + "$ref": "AffectedRequest" + }, + { + "name": "frame", + "description": "Optional because not every mixed content issue is necessarily linked to a frame.", + "optional": true, + "$ref": "AffectedFrame" + } + ] + }, + { + "id": "BlockedByResponseReason", + "description": "Enum indicating the reason a response has been blocked. These reasons are\nrefinements of the net error BLOCKED_BY_RESPONSE.", + "type": "string", + "enum": [ + "CoepFrameResourceNeedsCoepHeader", + "CoopSandboxedIFrameCannotNavigateToCoopPage", + "CorpNotSameOrigin", + "CorpNotSameOriginAfterDefaultedToSameOriginByCoep", + "CorpNotSameSite" + ] + }, + { + "id": "BlockedByResponseIssueDetails", + "description": "Details for a request that has been blocked with the BLOCKED_BY_RESPONSE\ncode. Currently only used for COEP/COOP, but may be extended to include\nsome CSP errors in the future.", + "type": "object", + "properties": [ + { "name": "request", "$ref": "AffectedRequest" }, + { "name": "parentFrame", "optional": true, "$ref": "AffectedFrame" }, + { "name": "blockedFrame", "optional": true, "$ref": "AffectedFrame" }, + { "name": "reason", "$ref": "BlockedByResponseReason" } + ] + }, + { "id": "HeavyAdResolutionStatus", "type": "string", "enum": ["HeavyAdBlocked", "HeavyAdWarning"] }, + { "id": "HeavyAdReason", "type": "string", "enum": ["NetworkTotalLimit", "CpuTotalLimit", "CpuPeakLimit"] }, + { + "id": "HeavyAdIssueDetails", + "type": "object", + "properties": [ + { + "name": "resolution", + "description": "The resolution status, either blocking the content or warning.", + "$ref": "HeavyAdResolutionStatus" + }, + { + "name": "reason", + "description": "The reason the ad was blocked, total network or cpu or peak cpu.", + "$ref": "HeavyAdReason" + }, + { "name": "frame", "description": "The frame that was blocked.", "$ref": "AffectedFrame" } + ] + }, + { + "id": "ContentSecurityPolicyViolationType", + "type": "string", + "enum": [ + "kInlineViolation", + "kEvalViolation", + "kURLViolation", + "kTrustedTypesSinkViolation", + "kTrustedTypesPolicyViolation", + "kWasmEvalViolation" + ] + }, + { + "id": "SourceCodeLocation", + "type": "object", + "properties": [ + { "name": "scriptId", "optional": true, "$ref": "Runtime.ScriptId" }, + { "name": "url", "type": "string" }, + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } + ] + }, + { + "id": "ContentSecurityPolicyIssueDetails", + "type": "object", + "properties": [ + { + "name": "blockedURL", + "description": "The url not included in allowed sources.", + "optional": true, + "type": "string" + }, + { + "name": "violatedDirective", + "description": "Specific directive that is violated, causing the CSP issue.", + "type": "string" + }, + { "name": "isReportOnly", "type": "boolean" }, + { "name": "contentSecurityPolicyViolationType", "$ref": "ContentSecurityPolicyViolationType" }, + { "name": "frameAncestor", "optional": true, "$ref": "AffectedFrame" }, + { "name": "sourceCodeLocation", "optional": true, "$ref": "SourceCodeLocation" }, + { "name": "violatingNodeId", "optional": true, "$ref": "DOM.BackendNodeId" } + ] + }, + { "id": "SharedArrayBufferIssueType", "type": "string", "enum": ["TransferIssue", "CreationIssue"] }, + { + "id": "SharedArrayBufferIssueDetails", + "description": "Details for a issue arising from an SAB being instantiated in, or\ntransferred to a context that is not cross-origin isolated.", + "type": "object", + "properties": [ + { "name": "sourceCodeLocation", "$ref": "SourceCodeLocation" }, + { "name": "isWarning", "type": "boolean" }, + { "name": "type", "$ref": "SharedArrayBufferIssueType" } + ] + }, + { + "id": "LowTextContrastIssueDetails", + "type": "object", + "properties": [ + { "name": "violatingNodeId", "$ref": "DOM.BackendNodeId" }, + { "name": "violatingNodeSelector", "type": "string" }, + { "name": "contrastRatio", "type": "number" }, + { "name": "thresholdAA", "type": "number" }, + { "name": "thresholdAAA", "type": "number" }, + { "name": "fontSize", "type": "string" }, + { "name": "fontWeight", "type": "string" } + ] + }, + { + "id": "CorsIssueDetails", + "description": "Details for a CORS related issue, e.g. a warning or error related to\nCORS RFC1918 enforcement.", + "type": "object", + "properties": [ + { "name": "corsErrorStatus", "$ref": "Network.CorsErrorStatus" }, + { "name": "isWarning", "type": "boolean" }, + { "name": "request", "$ref": "AffectedRequest" }, + { "name": "location", "optional": true, "$ref": "SourceCodeLocation" }, + { "name": "initiatorOrigin", "optional": true, "type": "string" }, + { "name": "resourceIPAddressSpace", "optional": true, "$ref": "Network.IPAddressSpace" }, + { "name": "clientSecurityState", "optional": true, "$ref": "Network.ClientSecurityState" } + ] + }, + { + "id": "AttributionReportingIssueType", + "type": "string", + "enum": [ + "PermissionPolicyDisabled", + "UntrustworthyReportingOrigin", + "InsecureContext", + "InvalidHeader", + "InvalidRegisterTriggerHeader", + "SourceAndTriggerHeaders", + "SourceIgnored", + "TriggerIgnored", + "OsSourceIgnored", + "OsTriggerIgnored", + "InvalidRegisterOsSourceHeader", + "InvalidRegisterOsTriggerHeader", + "WebAndOsHeaders", + "NoWebOrOsSupport", + "NavigationRegistrationWithoutTransientUserActivation" + ] + }, + { + "id": "AttributionReportingIssueDetails", + "description": "Details for issues around \"Attribution Reporting API\" usage.\nExplainer: https://github.com/WICG/attribution-reporting-api", + "type": "object", + "properties": [ + { "name": "violationType", "$ref": "AttributionReportingIssueType" }, + { "name": "request", "optional": true, "$ref": "AffectedRequest" }, + { "name": "violatingNodeId", "optional": true, "$ref": "DOM.BackendNodeId" }, + { "name": "invalidParameter", "optional": true, "type": "string" } + ] + }, + { + "id": "QuirksModeIssueDetails", + "description": "Details for issues about documents in Quirks Mode\nor Limited Quirks Mode that affects page layouting.", + "type": "object", + "properties": [ + { + "name": "isLimitedQuirksMode", + "description": "If false, it means the document's mode is \"quirks\"\ninstead of \"limited-quirks\".", + "type": "boolean" + }, + { "name": "documentNodeId", "$ref": "DOM.BackendNodeId" }, + { "name": "url", "type": "string" }, + { "name": "frameId", "$ref": "Page.FrameId" }, + { "name": "loaderId", "$ref": "Network.LoaderId" } + ] + }, + { + "id": "NavigatorUserAgentIssueDetails", + "deprecated": true, + "type": "object", + "properties": [ + { "name": "url", "type": "string" }, + { "name": "location", "optional": true, "$ref": "SourceCodeLocation" } + ] + }, + { + "id": "GenericIssueErrorType", + "type": "string", + "enum": [ + "CrossOriginPortalPostMessageError", + "FormLabelForNameError", + "FormDuplicateIdForInputError", + "FormInputWithNoLabelError", + "FormAutocompleteAttributeEmptyError", + "FormEmptyIdAndNameAttributesForInputError", + "FormAriaLabelledByToNonExistingId", + "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", + "FormLabelHasNeitherForNorNestedInput", + "FormLabelForMatchesNonExistingIdError", + "FormInputHasWrongButWellIntendedAutocompleteValueError", + "ResponseWasBlockedByORB" + ] + }, + { + "id": "GenericIssueDetails", + "description": "Depending on the concrete errorType, different properties are set.", + "type": "object", + "properties": [ + { + "name": "errorType", + "description": "Issues with the same errorType are aggregated in the frontend.", + "$ref": "GenericIssueErrorType" + }, + { "name": "frameId", "optional": true, "$ref": "Page.FrameId" }, + { "name": "violatingNodeId", "optional": true, "$ref": "DOM.BackendNodeId" }, + { "name": "violatingNodeAttribute", "optional": true, "type": "string" }, + { "name": "request", "optional": true, "$ref": "AffectedRequest" } + ] + }, + { + "id": "DeprecationIssueDetails", + "description": "This issue tracks information needed to print a deprecation message.\nhttps://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md", + "type": "object", + "properties": [ + { "name": "affectedFrame", "optional": true, "$ref": "AffectedFrame" }, + { "name": "sourceCodeLocation", "$ref": "SourceCodeLocation" }, + { + "name": "type", + "description": "One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5", + "type": "string" + } + ] + }, + { + "id": "BounceTrackingIssueDetails", + "description": "This issue warns about sites in the redirect chain of a finished navigation\nthat may be flagged as trackers and have their state cleared if they don't\nreceive a user interaction. Note that in this context 'site' means eTLD+1.\nFor example, if the URL `https://example.test:80/bounce` was in the\nredirect chain, the site reported would be `example.test`.", + "type": "object", + "properties": [{ "name": "trackingSites", "type": "array", "items": { "type": "string" } }] + }, + { + "id": "ClientHintIssueReason", + "type": "string", + "enum": ["MetaTagAllowListInvalidOrigin", "MetaTagModifiedHTML"] + }, + { + "id": "FederatedAuthRequestIssueDetails", + "type": "object", + "properties": [{ "name": "federatedAuthRequestIssueReason", "$ref": "FederatedAuthRequestIssueReason" }] + }, + { + "id": "FederatedAuthRequestIssueReason", + "description": "Represents the failure reason when a federated authentication reason fails.\nShould be updated alongside RequestIdTokenStatus in\nthird_party/blink/public/mojom/devtools/inspector_issue.mojom to include\nall cases except for success.", + "type": "string", + "enum": [ + "ShouldEmbargo", + "TooManyRequests", + "WellKnownHttpNotFound", + "WellKnownNoResponse", + "WellKnownInvalidResponse", + "WellKnownListEmpty", + "WellKnownInvalidContentType", + "ConfigNotInWellKnown", + "WellKnownTooBig", + "ConfigHttpNotFound", + "ConfigNoResponse", + "ConfigInvalidResponse", + "ConfigInvalidContentType", + "ClientMetadataHttpNotFound", + "ClientMetadataNoResponse", + "ClientMetadataInvalidResponse", + "ClientMetadataInvalidContentType", + "DisabledInSettings", + "ErrorFetchingSignin", + "InvalidSigninResponse", + "AccountsHttpNotFound", + "AccountsNoResponse", + "AccountsInvalidResponse", + "AccountsListEmpty", + "AccountsInvalidContentType", + "IdTokenHttpNotFound", + "IdTokenNoResponse", + "IdTokenInvalidResponse", + "IdTokenInvalidRequest", + "IdTokenInvalidContentType", + "ErrorIdToken", + "Canceled", + "RpPageNotVisible", + "SilentMediationFailure", + "ThirdPartyCookiesBlocked" + ] + }, + { + "id": "FederatedAuthUserInfoRequestIssueDetails", + "type": "object", + "properties": [ + { "name": "federatedAuthUserInfoRequestIssueReason", "$ref": "FederatedAuthUserInfoRequestIssueReason" } + ] + }, + { + "id": "FederatedAuthUserInfoRequestIssueReason", + "description": "Represents the failure reason when a getUserInfo() call fails.\nShould be updated alongside FederatedAuthUserInfoRequestResult in\nthird_party/blink/public/mojom/devtools/inspector_issue.mojom.", + "type": "string", + "enum": [ + "NotSameOrigin", + "NotIframe", + "NotPotentiallyTrustworthy", + "NoApiPermission", + "NotSignedInWithIdp", + "NoAccountSharingPermission", + "InvalidConfigOrWellKnown", + "InvalidAccountsResponse", + "NoReturningUserFromFetchedAccounts" + ] + }, + { + "id": "ClientHintIssueDetails", + "description": "This issue tracks client hints related issues. It's used to deprecate old\nfeatures, encourage the use of new ones, and provide general guidance.", + "type": "object", + "properties": [ + { "name": "sourceCodeLocation", "$ref": "SourceCodeLocation" }, + { "name": "clientHintIssueReason", "$ref": "ClientHintIssueReason" } + ] + }, + { + "id": "FailedRequestInfo", + "type": "object", + "properties": [ + { "name": "url", "description": "The URL that failed to load.", "type": "string" }, + { + "name": "failureMessage", + "description": "The failure message for the failed request.", + "type": "string" + }, + { "name": "requestId", "optional": true, "$ref": "Network.RequestId" } + ] + }, + { "id": "StyleSheetLoadingIssueReason", "type": "string", "enum": ["LateImportRule", "RequestFailed"] }, + { + "id": "StylesheetLoadingIssueDetails", + "description": "This issue warns when a referenced stylesheet couldn't be loaded.", + "type": "object", + "properties": [ + { + "name": "sourceCodeLocation", + "description": "Source code position that referenced the failing stylesheet.", + "$ref": "SourceCodeLocation" + }, + { + "name": "styleSheetLoadingIssueReason", + "description": "Reason why the stylesheet couldn't be loaded.", + "$ref": "StyleSheetLoadingIssueReason" + }, + { + "name": "failedRequestInfo", + "description": "Contains additional info when the failure was due to a request.", + "optional": true, + "$ref": "FailedRequestInfo" + } + ] + }, + { + "id": "InspectorIssueCode", + "description": "A unique identifier for the type of issue. Each type may use one of the\noptional fields in InspectorIssueDetails to convey more specific\ninformation about the kind of issue.", + "type": "string", + "enum": [ + "CookieIssue", + "MixedContentIssue", + "BlockedByResponseIssue", + "HeavyAdIssue", + "ContentSecurityPolicyIssue", + "SharedArrayBufferIssue", + "LowTextContrastIssue", + "CorsIssue", + "AttributionReportingIssue", + "QuirksModeIssue", + "NavigatorUserAgentIssue", + "GenericIssue", + "DeprecationIssue", + "ClientHintIssue", + "FederatedAuthRequestIssue", + "BounceTrackingIssue", + "StylesheetLoadingIssue", + "FederatedAuthUserInfoRequestIssue" + ] + }, + { + "id": "InspectorIssueDetails", + "description": "This struct holds a list of optional fields with additional information\nspecific to the kind of issue. When adding a new issue code, please also\nadd a new optional field to this type.", + "type": "object", + "properties": [ + { "name": "cookieIssueDetails", "optional": true, "$ref": "CookieIssueDetails" }, + { "name": "mixedContentIssueDetails", "optional": true, "$ref": "MixedContentIssueDetails" }, + { "name": "blockedByResponseIssueDetails", "optional": true, "$ref": "BlockedByResponseIssueDetails" }, + { "name": "heavyAdIssueDetails", "optional": true, "$ref": "HeavyAdIssueDetails" }, + { + "name": "contentSecurityPolicyIssueDetails", + "optional": true, + "$ref": "ContentSecurityPolicyIssueDetails" + }, + { "name": "sharedArrayBufferIssueDetails", "optional": true, "$ref": "SharedArrayBufferIssueDetails" }, + { "name": "lowTextContrastIssueDetails", "optional": true, "$ref": "LowTextContrastIssueDetails" }, + { "name": "corsIssueDetails", "optional": true, "$ref": "CorsIssueDetails" }, + { + "name": "attributionReportingIssueDetails", + "optional": true, + "$ref": "AttributionReportingIssueDetails" + }, + { "name": "quirksModeIssueDetails", "optional": true, "$ref": "QuirksModeIssueDetails" }, + { + "name": "navigatorUserAgentIssueDetails", + "deprecated": true, + "optional": true, + "$ref": "NavigatorUserAgentIssueDetails" + }, + { "name": "genericIssueDetails", "optional": true, "$ref": "GenericIssueDetails" }, + { "name": "deprecationIssueDetails", "optional": true, "$ref": "DeprecationIssueDetails" }, + { "name": "clientHintIssueDetails", "optional": true, "$ref": "ClientHintIssueDetails" }, + { + "name": "federatedAuthRequestIssueDetails", + "optional": true, + "$ref": "FederatedAuthRequestIssueDetails" + }, + { "name": "bounceTrackingIssueDetails", "optional": true, "$ref": "BounceTrackingIssueDetails" }, + { "name": "stylesheetLoadingIssueDetails", "optional": true, "$ref": "StylesheetLoadingIssueDetails" }, + { + "name": "federatedAuthUserInfoRequestIssueDetails", + "optional": true, + "$ref": "FederatedAuthUserInfoRequestIssueDetails" + } + ] + }, + { + "id": "IssueId", + "description": "A unique id for a DevTools inspector issue. Allows other entities (e.g.\nexceptions, CDP message, console messages, etc.) to reference an issue.", + "type": "string" + }, + { + "id": "InspectorIssue", + "description": "An inspector issue reported from the back-end.", + "type": "object", + "properties": [ + { "name": "code", "$ref": "InspectorIssueCode" }, + { "name": "details", "$ref": "InspectorIssueDetails" }, + { + "name": "issueId", + "description": "A unique id for this issue. May be omitted if no other entity (e.g.\nexception, CDP message, etc.) is referencing this issue.", + "optional": true, + "$ref": "IssueId" + } + ] + } + ], + "commands": [ + { + "name": "getEncodedResponse", + "description": "Returns the response body and size if it were re-encoded with the specified settings. Only\napplies to images.", + "parameters": [ + { + "name": "requestId", + "description": "Identifier of the network request to get content for.", + "$ref": "Network.RequestId" + }, + { + "name": "encoding", + "description": "The encoding to use.", + "type": "string", + "enum": ["webp", "jpeg", "png"] + }, + { + "name": "quality", + "description": "The quality of the encoding (0-1). (defaults to 1)", + "optional": true, + "type": "number" + }, + { + "name": "sizeOnly", + "description": "Whether to only return the size information (defaults to false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "body", + "description": "The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { "name": "originalSize", "description": "Size before re-encoding.", "type": "integer" }, + { "name": "encodedSize", "description": "Size after re-encoding.", "type": "integer" } + ] + }, + { + "name": "disable", + "description": "Disables issues domain, prevents further issues from being reported to the client." + }, + { + "name": "enable", + "description": "Enables issues domain, sends the issues collected so far to the client by means of the\n`issueAdded` event." + }, + { + "name": "checkContrast", + "description": "Runs the contrast check for the target page. Found issues are reported\nusing Audits.issueAdded event.", + "parameters": [ + { + "name": "reportAAA", + "description": "Whether to report WCAG AAA level issues. Default is false.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "checkFormsIssues", + "description": "Runs the form issues check for the target page. Found issues are reported\nusing Audits.issueAdded event.", + "returns": [{ "name": "formIssues", "type": "array", "items": { "$ref": "GenericIssueDetails" } }] + } + ], + "events": [{ "name": "issueAdded", "parameters": [{ "name": "issue", "$ref": "InspectorIssue" }] }] + }, + { + "domain": "Autofill", + "description": "Defines commands and events for Autofill.", + "experimental": true, + "types": [ + { + "id": "CreditCard", + "type": "object", + "properties": [ + { "name": "number", "description": "16-digit credit card number.", "type": "string" }, + { "name": "name", "description": "Name of the credit card owner.", "type": "string" }, + { "name": "expiryMonth", "description": "2-digit expiry month.", "type": "string" }, + { "name": "expiryYear", "description": "4-digit expiry year.", "type": "string" }, + { "name": "cvc", "description": "3-digit card verification code.", "type": "string" } + ] + }, + { + "id": "AddressField", + "type": "object", + "properties": [ + { "name": "name", "description": "address field name, for example GIVEN_NAME.", "type": "string" }, + { "name": "value", "description": "address field name, for example Jon Doe.", "type": "string" } + ] + }, + { + "id": "Address", + "type": "object", + "properties": [ + { + "name": "fields", + "description": "fields and values defining a test address.", + "type": "array", + "items": { "$ref": "AddressField" } + } + ] + } + ], + "commands": [ + { + "name": "trigger", + "description": "Trigger autofill on a form identified by the fieldId.\nIf the field and related form cannot be autofilled, returns an error.", + "parameters": [ + { + "name": "fieldId", + "description": "Identifies a field that serves as an anchor for autofill.", + "$ref": "DOM.BackendNodeId" + }, + { + "name": "frameId", + "description": "Identifies the frame that field belongs to.", + "optional": true, + "$ref": "Page.FrameId" + }, + { + "name": "card", + "description": "Credit card information to fill out the form. Credit card data is not saved.", + "$ref": "CreditCard" + } + ] + }, + { + "name": "setAddresses", + "description": "Set addresses so that developers can verify their forms implementation.", + "parameters": [{ "name": "addresses", "type": "array", "items": { "$ref": "Address" } }] + } + ] + }, + { + "domain": "BackgroundService", + "description": "Defines events for background web platform features.", + "experimental": true, + "types": [ + { + "id": "ServiceName", + "description": "The Background Service that will be associated with the commands/events.\nEvery Background Service operates independently, but they share the same\nAPI.", + "type": "string", + "enum": [ + "backgroundFetch", + "backgroundSync", + "pushMessaging", + "notifications", + "paymentHandler", + "periodicBackgroundSync" + ] + }, + { + "id": "EventMetadata", + "description": "A key-value pair for additional event information to pass along.", + "type": "object", + "properties": [ + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "BackgroundServiceEvent", + "type": "object", + "properties": [ + { + "name": "timestamp", + "description": "Timestamp of the event (in seconds).", + "$ref": "Network.TimeSinceEpoch" + }, + { "name": "origin", "description": "The origin this event belongs to.", "type": "string" }, + { + "name": "serviceWorkerRegistrationId", + "description": "The Service Worker ID that initiated the event.", + "$ref": "ServiceWorker.RegistrationID" + }, + { + "name": "service", + "description": "The Background Service this event belongs to.", + "$ref": "ServiceName" + }, + { "name": "eventName", "description": "A description of the event.", "type": "string" }, + { + "name": "instanceId", + "description": "An identifier that groups related events together.", + "type": "string" + }, + { + "name": "eventMetadata", + "description": "A list of event-specific information.", + "type": "array", + "items": { "$ref": "EventMetadata" } + }, + { "name": "storageKey", "description": "Storage key this event belongs to.", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "startObserving", + "description": "Enables event updates for the service.", + "parameters": [{ "name": "service", "$ref": "ServiceName" }] + }, + { + "name": "stopObserving", + "description": "Disables event updates for the service.", + "parameters": [{ "name": "service", "$ref": "ServiceName" }] + }, + { + "name": "setRecording", + "description": "Set the recording state for the service.", + "parameters": [ + { "name": "shouldRecord", "type": "boolean" }, + { "name": "service", "$ref": "ServiceName" } + ] + }, + { + "name": "clearEvents", + "description": "Clears all stored data for the service.", + "parameters": [{ "name": "service", "$ref": "ServiceName" }] + } + ], + "events": [ + { + "name": "recordingStateChanged", + "description": "Called when the recording state for the service has been updated.", + "parameters": [ + { "name": "isRecording", "type": "boolean" }, + { "name": "service", "$ref": "ServiceName" } + ] + }, + { + "name": "backgroundServiceEventReceived", + "description": "Called with all existing backgroundServiceEvents when enabled, and all new\nevents afterwards if enabled and recording.", + "parameters": [{ "name": "backgroundServiceEvent", "$ref": "BackgroundServiceEvent" }] + } + ] + }, + { + "domain": "Browser", + "description": "The Browser domain defines methods and events for browser managing.", + "types": [ + { "id": "BrowserContextID", "experimental": true, "type": "string" }, + { "id": "WindowID", "experimental": true, "type": "integer" }, + { + "id": "WindowState", + "description": "The state of the browser window.", + "experimental": true, + "type": "string", + "enum": ["normal", "minimized", "maximized", "fullscreen"] + }, + { + "id": "Bounds", + "description": "Browser window bounds information", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "left", + "description": "The offset from the left edge of the screen to the window in pixels.", + "optional": true, + "type": "integer" + }, + { + "name": "top", + "description": "The offset from the top edge of the screen to the window in pixels.", + "optional": true, + "type": "integer" + }, + { "name": "width", "description": "The window width in pixels.", "optional": true, "type": "integer" }, + { "name": "height", "description": "The window height in pixels.", "optional": true, "type": "integer" }, + { + "name": "windowState", + "description": "The window state. Default to normal.", + "optional": true, + "$ref": "WindowState" + } + ] + }, + { + "id": "PermissionType", + "experimental": true, + "type": "string", + "enum": [ + "accessibilityEvents", + "audioCapture", + "backgroundSync", + "backgroundFetch", + "clipboardReadWrite", + "clipboardSanitizedWrite", + "displayCapture", + "durableStorage", + "flash", + "geolocation", + "idleDetection", + "localFonts", + "midi", + "midiSysex", + "nfc", + "notifications", + "paymentHandler", + "periodicBackgroundSync", + "protectedMediaIdentifier", + "sensors", + "storageAccess", + "topLevelStorageAccess", + "videoCapture", + "videoCapturePanTiltZoom", + "wakeLockScreen", + "wakeLockSystem", + "windowManagement" + ] + }, + { "id": "PermissionSetting", "experimental": true, "type": "string", "enum": ["granted", "denied", "prompt"] }, + { + "id": "PermissionDescriptor", + "description": "Definition of PermissionDescriptor defined in the Permissions API:\nhttps://w3c.github.io/permissions/#dictdef-permissiondescriptor.", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "name", + "description": "Name of permission.\nSee https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.", + "type": "string" + }, + { + "name": "sysex", + "description": "For \"midi\" permission, may also specify sysex control.", + "optional": true, + "type": "boolean" + }, + { + "name": "userVisibleOnly", + "description": "For \"push\" permission, may specify userVisibleOnly.\nNote that userVisibleOnly = true is the only currently supported type.", + "optional": true, + "type": "boolean" + }, + { + "name": "allowWithoutSanitization", + "description": "For \"clipboard\" permission, may specify allowWithoutSanitization.", + "optional": true, + "type": "boolean" + }, + { + "name": "panTiltZoom", + "description": "For \"camera\" permission, may specify panTiltZoom.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "BrowserCommandId", + "description": "Browser command ids used by executeBrowserCommand.", + "experimental": true, + "type": "string", + "enum": ["openTabSearch", "closeTabSearch"] + }, + { + "id": "Bucket", + "description": "Chrome histogram bucket.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "low", "description": "Minimum value (inclusive).", "type": "integer" }, + { "name": "high", "description": "Maximum value (exclusive).", "type": "integer" }, + { "name": "count", "description": "Number of samples.", "type": "integer" } + ] + }, + { + "id": "Histogram", + "description": "Chrome histogram.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "name", "description": "Name.", "type": "string" }, + { "name": "sum", "description": "Sum of sample values.", "type": "integer" }, + { "name": "count", "description": "Total number of samples.", "type": "integer" }, + { "name": "buckets", "description": "Buckets.", "type": "array", "items": { "$ref": "Bucket" } } + ] + } + ], + "commands": [ + { + "name": "setPermission", + "description": "Set permission settings for given origin.", + "experimental": true, + "parameters": [ + { + "name": "permission", + "description": "Descriptor of permission to override.", + "$ref": "PermissionDescriptor" + }, + { "name": "setting", "description": "Setting of the permission.", "$ref": "PermissionSetting" }, + { + "name": "origin", + "description": "Origin the permission applies to, all origins if not specified.", + "optional": true, + "type": "string" + }, + { + "name": "browserContextId", + "description": "Context to override. When omitted, default browser context is used.", + "optional": true, + "$ref": "BrowserContextID" + } + ] + }, + { + "name": "grantPermissions", + "description": "Grant specific permissions to the given origin and reject all others.", + "experimental": true, + "parameters": [ + { "name": "permissions", "type": "array", "items": { "$ref": "PermissionType" } }, + { + "name": "origin", + "description": "Origin the permission applies to, all origins if not specified.", + "optional": true, + "type": "string" + }, + { + "name": "browserContextId", + "description": "BrowserContext to override permissions. When omitted, default browser context is used.", + "optional": true, + "$ref": "BrowserContextID" + } + ] + }, + { + "name": "resetPermissions", + "description": "Reset all permission management for all origins.", + "experimental": true, + "parameters": [ + { + "name": "browserContextId", + "description": "BrowserContext to reset permissions. When omitted, default browser context is used.", + "optional": true, + "$ref": "BrowserContextID" + } + ] + }, + { + "name": "setDownloadBehavior", + "description": "Set the behavior when downloading a file.", + "experimental": true, + "parameters": [ + { + "name": "behavior", + "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if\navailable (otherwise deny). |allowAndName| allows download and names files according to\ntheir dowmload guids.", + "type": "string", + "enum": ["deny", "allow", "allowAndName", "default"] + }, + { + "name": "browserContextId", + "description": "BrowserContext to set download behavior. When omitted, default browser context is used.", + "optional": true, + "$ref": "BrowserContextID" + }, + { + "name": "downloadPath", + "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow'\nor 'allowAndName'.", + "optional": true, + "type": "string" + }, + { + "name": "eventsEnabled", + "description": "Whether to emit download events (defaults to false).", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "cancelDownload", + "description": "Cancel a download if in progress", + "experimental": true, + "parameters": [ + { "name": "guid", "description": "Global unique identifier of the download.", "type": "string" }, + { + "name": "browserContextId", + "description": "BrowserContext to perform the action in. When omitted, default browser context is used.", + "optional": true, + "$ref": "BrowserContextID" + } + ] + }, + { "name": "close", "description": "Close browser gracefully." }, + { "name": "crash", "description": "Crashes browser on the main thread.", "experimental": true }, + { "name": "crashGpuProcess", "description": "Crashes GPU process.", "experimental": true }, + { + "name": "getVersion", + "description": "Returns version information.", + "returns": [ + { "name": "protocolVersion", "description": "Protocol version.", "type": "string" }, + { "name": "product", "description": "Product name.", "type": "string" }, + { "name": "revision", "description": "Product revision.", "type": "string" }, + { "name": "userAgent", "description": "User-Agent.", "type": "string" }, + { "name": "jsVersion", "description": "V8 version.", "type": "string" } + ] + }, + { + "name": "getBrowserCommandLine", + "description": "Returns the command line switches for the browser process if, and only if\n--enable-automation is on the commandline.", + "experimental": true, + "returns": [ + { + "name": "arguments", + "description": "Commandline parameters", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "getHistograms", + "description": "Get Chrome histograms.", + "experimental": true, + "parameters": [ + { + "name": "query", + "description": "Requested substring in name. Only histograms which have query as a\nsubstring in their name are extracted. An empty or absent query returns\nall histograms.", + "optional": true, + "type": "string" + }, + { + "name": "delta", + "description": "If true, retrieve delta since last delta call.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "histograms", "description": "Histograms.", "type": "array", "items": { "$ref": "Histogram" } } + ] + }, + { + "name": "getHistogram", + "description": "Get a Chrome histogram by name.", + "experimental": true, + "parameters": [ + { "name": "name", "description": "Requested histogram name.", "type": "string" }, + { + "name": "delta", + "description": "If true, retrieve delta since last delta call.", + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "histogram", "description": "Histogram.", "$ref": "Histogram" }] + }, + { + "name": "getWindowBounds", + "description": "Get position and size of the browser window.", + "experimental": true, + "parameters": [{ "name": "windowId", "description": "Browser window id.", "$ref": "WindowID" }], + "returns": [ + { + "name": "bounds", + "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.", + "$ref": "Bounds" + } + ] + }, + { + "name": "getWindowForTarget", + "description": "Get the browser window that contains the devtools target.", + "experimental": true, + "parameters": [ + { + "name": "targetId", + "description": "Devtools agent host id. If called as a part of the session, associated targetId is used.", + "optional": true, + "$ref": "Target.TargetID" + } + ], + "returns": [ + { "name": "windowId", "description": "Browser window id.", "$ref": "WindowID" }, + { + "name": "bounds", + "description": "Bounds information of the window. When window state is 'minimized', the restored window\nposition and size are returned.", + "$ref": "Bounds" + } + ] + }, + { + "name": "setWindowBounds", + "description": "Set position and/or size of the browser window.", + "experimental": true, + "parameters": [ + { "name": "windowId", "description": "Browser window id.", "$ref": "WindowID" }, + { + "name": "bounds", + "description": "New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined\nwith 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.", + "$ref": "Bounds" + } + ] + }, + { + "name": "setDockTile", + "description": "Set dock tile details, platform-specific.", + "experimental": true, + "parameters": [ + { "name": "badgeLabel", "optional": true, "type": "string" }, + { + "name": "image", + "description": "Png encoded image. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "executeBrowserCommand", + "description": "Invoke custom browser commands used by telemetry.", + "experimental": true, + "parameters": [{ "name": "commandId", "$ref": "BrowserCommandId" }] + }, + { + "name": "addPrivacySandboxEnrollmentOverride", + "description": "Allows a site to use privacy sandbox features that require enrollment\nwithout the site actually being enrolled. Only supported on page targets.", + "parameters": [{ "name": "url", "type": "string" }] + } + ], + "events": [ + { + "name": "downloadWillBegin", + "description": "Fired when page is about to start a download.", + "experimental": true, + "parameters": [ + { + "name": "frameId", + "description": "Id of the frame that caused the download to begin.", + "$ref": "Page.FrameId" + }, + { "name": "guid", "description": "Global unique identifier of the download.", "type": "string" }, + { "name": "url", "description": "URL of the resource being downloaded.", "type": "string" }, + { + "name": "suggestedFilename", + "description": "Suggested file name of the resource (the actual name of the file saved on disk may differ).", + "type": "string" + } + ] + }, + { + "name": "downloadProgress", + "description": "Fired when download makes progress. Last call has |done| == true.", + "experimental": true, + "parameters": [ + { "name": "guid", "description": "Global unique identifier of the download.", "type": "string" }, + { "name": "totalBytes", "description": "Total expected bytes to download.", "type": "number" }, + { "name": "receivedBytes", "description": "Total bytes received.", "type": "number" }, + { + "name": "state", + "description": "Download status.", + "type": "string", + "enum": ["inProgress", "completed", "canceled"] + } + ] + } + ] + }, + { + "domain": "CacheStorage", + "experimental": true, + "dependencies": ["Storage"], + "types": [ + { "id": "CacheId", "description": "Unique identifier of the Cache object.", "type": "string" }, + { + "id": "CachedResponseType", + "description": "type of HTTP response cached", + "type": "string", + "enum": ["basic", "cors", "default", "error", "opaqueResponse", "opaqueRedirect"] + }, + { + "id": "DataEntry", + "description": "Data entry.", + "type": "object", + "properties": [ + { "name": "requestURL", "description": "Request URL.", "type": "string" }, + { "name": "requestMethod", "description": "Request method.", "type": "string" }, + { + "name": "requestHeaders", + "description": "Request headers", + "type": "array", + "items": { "$ref": "Header" } + }, + { "name": "responseTime", "description": "Number of seconds since epoch.", "type": "number" }, + { "name": "responseStatus", "description": "HTTP response status code.", "type": "integer" }, + { "name": "responseStatusText", "description": "HTTP response status text.", "type": "string" }, + { "name": "responseType", "description": "HTTP response type", "$ref": "CachedResponseType" }, + { + "name": "responseHeaders", + "description": "Response headers", + "type": "array", + "items": { "$ref": "Header" } + } + ] + }, + { + "id": "Cache", + "description": "Cache identifier.", + "type": "object", + "properties": [ + { "name": "cacheId", "description": "An opaque unique id of the cache.", "$ref": "CacheId" }, + { "name": "securityOrigin", "description": "Security origin of the cache.", "type": "string" }, + { "name": "storageKey", "description": "Storage key of the cache.", "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket of the cache.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "cacheName", "description": "The name of the cache.", "type": "string" } + ] + }, + { + "id": "Header", + "type": "object", + "properties": [ + { "name": "name", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "CachedResponse", + "description": "Cached response", + "type": "object", + "properties": [ + { + "name": "body", + "description": "Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] + } + ], + "commands": [ + { + "name": "deleteCache", + "description": "Deletes a cache.", + "parameters": [{ "name": "cacheId", "description": "Id of cache for deletion.", "$ref": "CacheId" }] + }, + { + "name": "deleteEntry", + "description": "Deletes a cache entry.", + "parameters": [ + { "name": "cacheId", "description": "Id of cache where the entry will be deleted.", "$ref": "CacheId" }, + { "name": "request", "description": "URL spec of the request.", "type": "string" } + ] + }, + { + "name": "requestCacheNames", + "description": "Requests cache names.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + } + ], + "returns": [ + { + "name": "caches", + "description": "Caches for the security origin.", + "type": "array", + "items": { "$ref": "Cache" } + } + ] + }, + { + "name": "requestCachedResponse", + "description": "Fetches cache entry.", + "parameters": [ + { "name": "cacheId", "description": "Id of cache that contains the entry.", "$ref": "CacheId" }, + { "name": "requestURL", "description": "URL spec of the request.", "type": "string" }, + { + "name": "requestHeaders", + "description": "headers of the request.", + "type": "array", + "items": { "$ref": "Header" } + } + ], + "returns": [{ "name": "response", "description": "Response read from the cache.", "$ref": "CachedResponse" }] + }, + { + "name": "requestEntries", + "description": "Requests data from cache.", + "parameters": [ + { "name": "cacheId", "description": "ID of cache to get entries from.", "$ref": "CacheId" }, + { "name": "skipCount", "description": "Number of records to skip.", "optional": true, "type": "integer" }, + { "name": "pageSize", "description": "Number of records to fetch.", "optional": true, "type": "integer" }, + { + "name": "pathFilter", + "description": "If present, only return the entries containing this substring in the path", + "optional": true, + "type": "string" + } + ], + "returns": [ + { + "name": "cacheDataEntries", + "description": "Array of object store data entries.", + "type": "array", + "items": { "$ref": "DataEntry" } + }, + { + "name": "returnCount", + "description": "Count of returned entries from this storage. If pathFilter is empty, it\nis the count of all entries from this storage.", + "type": "number" + } + ] + } + ] + }, + { + "domain": "Cast", + "description": "A domain for interacting with Cast, Presentation API, and Remote Playback API\nfunctionalities.", + "experimental": true, + "types": [ + { + "id": "Sink", + "type": "object", + "properties": [ + { "name": "name", "type": "string" }, + { "name": "id", "type": "string" }, + { + "name": "session", + "description": "Text describing the current session. Present only if there is an active\nsession on the sink.", + "optional": true, + "type": "string" + } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Starts observing for sinks that can be used for tab mirroring, and if set,\nsinks compatible with |presentationUrl| as well. When sinks are found, a\n|sinksUpdated| event is fired.\nAlso starts observing for issue messages. When an issue is added or removed,\nan |issueUpdated| event is fired.", + "parameters": [{ "name": "presentationUrl", "optional": true, "type": "string" }] + }, + { "name": "disable", "description": "Stops observing for sinks and issues." }, + { + "name": "setSinkToUse", + "description": "Sets a sink to be used when the web page requests the browser to choose a\nsink via Presentation API, Remote Playback API, or Cast SDK.", + "parameters": [{ "name": "sinkName", "type": "string" }] + }, + { + "name": "startDesktopMirroring", + "description": "Starts mirroring the desktop to the sink.", + "parameters": [{ "name": "sinkName", "type": "string" }] + }, + { + "name": "startTabMirroring", + "description": "Starts mirroring the tab to the sink.", + "parameters": [{ "name": "sinkName", "type": "string" }] + }, + { + "name": "stopCasting", + "description": "Stops the active Cast session on the sink.", + "parameters": [{ "name": "sinkName", "type": "string" }] + } + ], + "events": [ + { + "name": "sinksUpdated", + "description": "This is fired whenever the list of available sinks changes. A sink is a\ndevice or a software surface that you can cast to.", + "parameters": [{ "name": "sinks", "type": "array", "items": { "$ref": "Sink" } }] + }, + { + "name": "issueUpdated", + "description": "This is fired whenever the outstanding issue/error message changes.\n|issueMessage| is empty if there is no issue.", + "parameters": [{ "name": "issueMessage", "type": "string" }] + } + ] + }, + { + "domain": "CSS", + "description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)\nhave an associated `id` used in subsequent operations on the related object. Each object type has\na specific `id` structure, and those are not interchangeable between objects of different kinds.\nCSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client\ncan also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and\nsubsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.", + "experimental": true, + "dependencies": ["DOM", "Page"], + "types": [ + { "id": "StyleSheetId", "type": "string" }, + { + "id": "StyleSheetOrigin", + "description": "Stylesheet type: \"injected\" for stylesheets injected via extension, \"user-agent\" for user-agent\nstylesheets, \"inspector\" for stylesheets created by the inspector (i.e. those holding the \"via\ninspector\" rules), \"regular\" for regular stylesheets.", + "type": "string", + "enum": ["injected", "user-agent", "inspector", "regular"] + }, + { + "id": "PseudoElementMatches", + "description": "CSS rule collection for a single pseudo style.", + "type": "object", + "properties": [ + { "name": "pseudoType", "description": "Pseudo element type.", "$ref": "DOM.PseudoType" }, + { + "name": "pseudoIdentifier", + "description": "Pseudo element custom ident.", + "optional": true, + "type": "string" + }, + { + "name": "matches", + "description": "Matches of CSS rules applicable to the pseudo style.", + "type": "array", + "items": { "$ref": "RuleMatch" } + } + ] + }, + { + "id": "InheritedStyleEntry", + "description": "Inherited CSS rule collection from ancestor node.", + "type": "object", + "properties": [ + { + "name": "inlineStyle", + "description": "The ancestor node's inline style, if any, in the style inheritance chain.", + "optional": true, + "$ref": "CSSStyle" + }, + { + "name": "matchedCSSRules", + "description": "Matches of CSS rules matching the ancestor node in the style inheritance chain.", + "type": "array", + "items": { "$ref": "RuleMatch" } + } + ] + }, + { + "id": "InheritedPseudoElementMatches", + "description": "Inherited pseudo element matches from pseudos of an ancestor node.", + "type": "object", + "properties": [ + { + "name": "pseudoElements", + "description": "Matches of pseudo styles from the pseudos of an ancestor node.", + "type": "array", + "items": { "$ref": "PseudoElementMatches" } + } + ] + }, + { + "id": "RuleMatch", + "description": "Match data for a CSS rule.", + "type": "object", + "properties": [ + { "name": "rule", "description": "CSS rule in the match.", "$ref": "CSSRule" }, + { + "name": "matchingSelectors", + "description": "Matching selector indices in the rule's selectorList selectors (0-based).", + "type": "array", + "items": { "type": "integer" } + } + ] + }, + { + "id": "Value", + "description": "Data for a simple selector (these are delimited by commas in a selector list).", + "type": "object", + "properties": [ + { "name": "text", "description": "Value text.", "type": "string" }, + { + "name": "range", + "description": "Value range in the underlying resource (if available).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "specificity", + "description": "Specificity of the selector.", + "experimental": true, + "optional": true, + "$ref": "Specificity" + } + ] + }, + { + "id": "Specificity", + "description": "Specificity:\nhttps://drafts.csswg.org/selectors/#specificity-rules", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "a", + "description": "The a component, which represents the number of ID selectors.", + "type": "integer" + }, + { + "name": "b", + "description": "The b component, which represents the number of class selectors, attributes selectors, and\npseudo-classes.", + "type": "integer" + }, + { + "name": "c", + "description": "The c component, which represents the number of type selectors and pseudo-elements.", + "type": "integer" + } + ] + }, + { + "id": "SelectorList", + "description": "Selector list data.", + "type": "object", + "properties": [ + { + "name": "selectors", + "description": "Selectors in the list.", + "type": "array", + "items": { "$ref": "Value" } + }, + { "name": "text", "description": "Rule selector text.", "type": "string" } + ] + }, + { + "id": "CSSStyleSheetHeader", + "description": "CSS stylesheet metainformation.", + "type": "object", + "properties": [ + { "name": "styleSheetId", "description": "The stylesheet identifier.", "$ref": "StyleSheetId" }, + { "name": "frameId", "description": "Owner frame identifier.", "$ref": "Page.FrameId" }, + { + "name": "sourceURL", + "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using\nnew CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported\nas a CSS module script).", + "type": "string" + }, + { + "name": "sourceMapURL", + "description": "URL of source map associated with the stylesheet (if any).", + "optional": true, + "type": "string" + }, + { "name": "origin", "description": "Stylesheet origin.", "$ref": "StyleSheetOrigin" }, + { "name": "title", "description": "Stylesheet title.", "type": "string" }, + { + "name": "ownerNode", + "description": "The backend id for the owner node of the stylesheet.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { "name": "disabled", "description": "Denotes whether the stylesheet is disabled.", "type": "boolean" }, + { + "name": "hasSourceURL", + "description": "Whether the sourceURL field value comes from the sourceURL comment.", + "optional": true, + "type": "boolean" + }, + { + "name": "isInline", + "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for\ndocument.written STYLE tags.", + "type": "boolean" + }, + { + "name": "isMutable", + "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable\nafter they have been modified via CSSOM API.\n`<link>` element's stylesheets become mutable only if DevTools modifies them.\nConstructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.", + "type": "boolean" + }, + { + "name": "isConstructed", + "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a\nCSS module script.", + "type": "boolean" + }, + { + "name": "startLine", + "description": "Line offset of the stylesheet within the resource (zero based).", + "type": "number" + }, + { + "name": "startColumn", + "description": "Column offset of the stylesheet within the resource (zero based).", + "type": "number" + }, + { "name": "length", "description": "Size of the content (in characters).", "type": "number" }, + { + "name": "endLine", + "description": "Line offset of the end of the stylesheet within the resource (zero based).", + "type": "number" + }, + { + "name": "endColumn", + "description": "Column offset of the end of the stylesheet within the resource (zero based).", + "type": "number" + }, + { + "name": "loadingFailed", + "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load", + "experimental": true, + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "CSSRule", + "description": "CSS rule representation.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "optional": true, + "$ref": "StyleSheetId" + }, + { "name": "selectorList", "description": "Rule selector data.", "$ref": "SelectorList" }, + { + "name": "nestingSelectors", + "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { "name": "origin", "description": "Parent stylesheet's origin.", "$ref": "StyleSheetOrigin" }, + { "name": "style", "description": "Associated style declaration.", "$ref": "CSSStyle" }, + { + "name": "media", + "description": "Media list array (for rules involving media queries). The array enumerates media queries\nstarting with the innermost one, going outwards.", + "optional": true, + "type": "array", + "items": { "$ref": "CSSMedia" } + }, + { + "name": "containerQueries", + "description": "Container query list array (for rules involving container queries).\nThe array enumerates container queries starting with the innermost one, going outwards.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSContainerQuery" } + }, + { + "name": "supports", + "description": "@supports CSS at-rule array.\nThe array enumerates @supports at-rules starting with the innermost one, going outwards.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSSupports" } + }, + { + "name": "layers", + "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting\nwith the innermost layer and going outwards.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSLayer" } + }, + { + "name": "scopes", + "description": "@scope CSS at-rule array.\nThe array enumerates @scope at-rules starting with the innermost one, going outwards.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSScope" } + }, + { + "name": "ruleTypes", + "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSRuleType" } + } + ] + }, + { + "id": "CSSRuleType", + "description": "Enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors.\nThis list only contains rule types that are collected during the ancestor rule collection.", + "experimental": true, + "type": "string", + "enum": ["MediaRule", "SupportsRule", "ContainerRule", "LayerRule", "ScopeRule", "StyleRule"] + }, + { + "id": "RuleUsage", + "description": "CSS coverage information.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "$ref": "StyleSheetId" + }, + { + "name": "startOffset", + "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.", + "type": "number" + }, + { + "name": "endOffset", + "description": "Offset of the end of the rule body from the beginning of the stylesheet.", + "type": "number" + }, + { + "name": "used", + "description": "Indicates whether the rule was actually used by some element in the page.", + "type": "boolean" + } + ] + }, + { + "id": "SourceRange", + "description": "Text range within a resource. All numbers are zero-based.", + "type": "object", + "properties": [ + { "name": "startLine", "description": "Start line of range.", "type": "integer" }, + { "name": "startColumn", "description": "Start column of range (inclusive).", "type": "integer" }, + { "name": "endLine", "description": "End line of range", "type": "integer" }, + { "name": "endColumn", "description": "End column of range (exclusive).", "type": "integer" } + ] + }, + { + "id": "ShorthandEntry", + "type": "object", + "properties": [ + { "name": "name", "description": "Shorthand name.", "type": "string" }, + { "name": "value", "description": "Shorthand value.", "type": "string" }, + { + "name": "important", + "description": "Whether the property has \"!important\" annotation (implies `false` if absent).", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "CSSComputedStyleProperty", + "type": "object", + "properties": [ + { "name": "name", "description": "Computed style property name.", "type": "string" }, + { "name": "value", "description": "Computed style property value.", "type": "string" } + ] + }, + { + "id": "CSSStyle", + "description": "CSS style representation.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "optional": true, + "$ref": "StyleSheetId" + }, + { + "name": "cssProperties", + "description": "CSS properties in the style.", + "type": "array", + "items": { "$ref": "CSSProperty" } + }, + { + "name": "shorthandEntries", + "description": "Computed values for all shorthands found in the style.", + "type": "array", + "items": { "$ref": "ShorthandEntry" } + }, + { + "name": "cssText", + "description": "Style declaration text (if available).", + "optional": true, + "type": "string" + }, + { + "name": "range", + "description": "Style declaration range in the enclosing stylesheet (if available).", + "optional": true, + "$ref": "SourceRange" + } + ] + }, + { + "id": "CSSProperty", + "description": "CSS property declaration data.", + "type": "object", + "properties": [ + { "name": "name", "description": "The property name.", "type": "string" }, + { "name": "value", "description": "The property value.", "type": "string" }, + { + "name": "important", + "description": "Whether the property has \"!important\" annotation (implies `false` if absent).", + "optional": true, + "type": "boolean" + }, + { + "name": "implicit", + "description": "Whether the property is implicit (implies `false` if absent).", + "optional": true, + "type": "boolean" + }, + { + "name": "text", + "description": "The full property text as specified in the style.", + "optional": true, + "type": "string" + }, + { + "name": "parsedOk", + "description": "Whether the property is understood by the browser (implies `true` if absent).", + "optional": true, + "type": "boolean" + }, + { + "name": "disabled", + "description": "Whether the property is disabled by the user (present for source-based properties only).", + "optional": true, + "type": "boolean" + }, + { + "name": "range", + "description": "The entire property range in the enclosing style declaration (if available).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "longhandProperties", + "description": "Parsed longhand components of this property if it is a shorthand.\nThis field will be empty if the given property is not a shorthand.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "CSSProperty" } + } + ] + }, + { + "id": "CSSMedia", + "description": "CSS media rule descriptor.", + "type": "object", + "properties": [ + { "name": "text", "description": "Media query text.", "type": "string" }, + { + "name": "source", + "description": "Source of the media query: \"mediaRule\" if specified by a @media rule, \"importRule\" if\nspecified by an @import rule, \"linkedSheet\" if specified by a \"media\" attribute in a linked\nstylesheet's LINK tag, \"inlineSheet\" if specified by a \"media\" attribute in an inline\nstylesheet's STYLE tag.", + "type": "string", + "enum": ["mediaRule", "importRule", "linkedSheet", "inlineSheet"] + }, + { + "name": "sourceURL", + "description": "URL of the document containing the media query description.", + "optional": true, + "type": "string" + }, + { + "name": "range", + "description": "The associated rule (@media or @import) header range in the enclosing stylesheet (if\navailable).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "styleSheetId", + "description": "Identifier of the stylesheet containing this object (if exists).", + "optional": true, + "$ref": "StyleSheetId" + }, + { + "name": "mediaList", + "description": "Array of media queries.", + "optional": true, + "type": "array", + "items": { "$ref": "MediaQuery" } + } + ] + }, + { + "id": "MediaQuery", + "description": "Media query descriptor.", + "type": "object", + "properties": [ + { + "name": "expressions", + "description": "Array of media query expressions.", + "type": "array", + "items": { "$ref": "MediaQueryExpression" } + }, + { "name": "active", "description": "Whether the media query condition is satisfied.", "type": "boolean" } + ] + }, + { + "id": "MediaQueryExpression", + "description": "Media query expression descriptor.", + "type": "object", + "properties": [ + { "name": "value", "description": "Media query expression value.", "type": "number" }, + { "name": "unit", "description": "Media query expression units.", "type": "string" }, + { "name": "feature", "description": "Media query expression feature.", "type": "string" }, + { + "name": "valueRange", + "description": "The associated range of the value text in the enclosing stylesheet (if available).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "computedLength", + "description": "Computed length of media query expression (if applicable).", + "optional": true, + "type": "number" + } + ] + }, + { + "id": "CSSContainerQuery", + "description": "CSS container query rule descriptor.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "text", "description": "Container query text.", "type": "string" }, + { + "name": "range", + "description": "The associated rule header range in the enclosing stylesheet (if\navailable).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "styleSheetId", + "description": "Identifier of the stylesheet containing this object (if exists).", + "optional": true, + "$ref": "StyleSheetId" + }, + { "name": "name", "description": "Optional name for the container.", "optional": true, "type": "string" }, + { + "name": "physicalAxes", + "description": "Optional physical axes queried for the container.", + "optional": true, + "$ref": "DOM.PhysicalAxes" + }, + { + "name": "logicalAxes", + "description": "Optional logical axes queried for the container.", + "optional": true, + "$ref": "DOM.LogicalAxes" + } + ] + }, + { + "id": "CSSSupports", + "description": "CSS Supports at-rule descriptor.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "text", "description": "Supports rule text.", "type": "string" }, + { "name": "active", "description": "Whether the supports condition is satisfied.", "type": "boolean" }, + { + "name": "range", + "description": "The associated rule header range in the enclosing stylesheet (if\navailable).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "styleSheetId", + "description": "Identifier of the stylesheet containing this object (if exists).", + "optional": true, + "$ref": "StyleSheetId" + } + ] + }, + { + "id": "CSSScope", + "description": "CSS Scope at-rule descriptor.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "text", "description": "Scope rule text.", "type": "string" }, + { + "name": "range", + "description": "The associated rule header range in the enclosing stylesheet (if\navailable).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "styleSheetId", + "description": "Identifier of the stylesheet containing this object (if exists).", + "optional": true, + "$ref": "StyleSheetId" + } + ] + }, + { + "id": "CSSLayer", + "description": "CSS Layer at-rule descriptor.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "text", "description": "Layer name.", "type": "string" }, + { + "name": "range", + "description": "The associated rule header range in the enclosing stylesheet (if\navailable).", + "optional": true, + "$ref": "SourceRange" + }, + { + "name": "styleSheetId", + "description": "Identifier of the stylesheet containing this object (if exists).", + "optional": true, + "$ref": "StyleSheetId" + } + ] + }, + { + "id": "CSSLayerData", + "description": "CSS Layer data.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "name", "description": "Layer name.", "type": "string" }, + { + "name": "subLayers", + "description": "Direct sub-layers", + "optional": true, + "type": "array", + "items": { "$ref": "CSSLayerData" } + }, + { + "name": "order", + "description": "Layer order. The order determines the order of the layer in the cascade order.\nA higher number has higher priority in the cascade order.", + "type": "number" + } + ] + }, + { + "id": "PlatformFontUsage", + "description": "Information about amount of glyphs that were rendered with given font.", + "type": "object", + "properties": [ + { "name": "familyName", "description": "Font's family name reported by platform.", "type": "string" }, + { + "name": "isCustomFont", + "description": "Indicates if the font was downloaded or resolved locally.", + "type": "boolean" + }, + { + "name": "glyphCount", + "description": "Amount of glyphs that were rendered with this font.", + "type": "number" + } + ] + }, + { + "id": "FontVariationAxis", + "description": "Information about font variation axes for variable fonts", + "type": "object", + "properties": [ + { "name": "tag", "description": "The font-variation-setting tag (a.k.a. \"axis tag\").", "type": "string" }, + { + "name": "name", + "description": "Human-readable variation name in the default language (normally, \"en\").", + "type": "string" + }, + { + "name": "minValue", + "description": "The minimum value (inclusive) the font supports for this tag.", + "type": "number" + }, + { + "name": "maxValue", + "description": "The maximum value (inclusive) the font supports for this tag.", + "type": "number" + }, + { "name": "defaultValue", "description": "The default value.", "type": "number" } + ] + }, + { + "id": "FontFace", + "description": "Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions\nand additional information such as platformFontFamily and fontVariationAxes.", + "type": "object", + "properties": [ + { "name": "fontFamily", "description": "The font-family.", "type": "string" }, + { "name": "fontStyle", "description": "The font-style.", "type": "string" }, + { "name": "fontVariant", "description": "The font-variant.", "type": "string" }, + { "name": "fontWeight", "description": "The font-weight.", "type": "string" }, + { "name": "fontStretch", "description": "The font-stretch.", "type": "string" }, + { "name": "fontDisplay", "description": "The font-display.", "type": "string" }, + { "name": "unicodeRange", "description": "The unicode-range.", "type": "string" }, + { "name": "src", "description": "The src.", "type": "string" }, + { "name": "platformFontFamily", "description": "The resolved platform font family", "type": "string" }, + { + "name": "fontVariationAxes", + "description": "Available variation settings (a.k.a. \"axes\").", + "optional": true, + "type": "array", + "items": { "$ref": "FontVariationAxis" } + } + ] + }, + { + "id": "CSSTryRule", + "description": "CSS try rule representation.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "optional": true, + "$ref": "StyleSheetId" + }, + { "name": "origin", "description": "Parent stylesheet's origin.", "$ref": "StyleSheetOrigin" }, + { "name": "style", "description": "Associated style declaration.", "$ref": "CSSStyle" } + ] + }, + { + "id": "CSSPositionFallbackRule", + "description": "CSS position-fallback rule representation.", + "type": "object", + "properties": [ + { "name": "name", "$ref": "Value" }, + { + "name": "tryRules", + "description": "List of keyframes.", + "type": "array", + "items": { "$ref": "CSSTryRule" } + } + ] + }, + { + "id": "CSSKeyframesRule", + "description": "CSS keyframes rule representation.", + "type": "object", + "properties": [ + { "name": "animationName", "description": "Animation name.", "$ref": "Value" }, + { + "name": "keyframes", + "description": "List of keyframes.", + "type": "array", + "items": { "$ref": "CSSKeyframeRule" } + } + ] + }, + { + "id": "CSSPropertyRegistration", + "description": "Representation of a custom property registration through CSS.registerProperty", + "type": "object", + "properties": [ + { "name": "propertyName", "type": "string" }, + { "name": "initialValue", "optional": true, "$ref": "Value" }, + { "name": "inherits", "type": "boolean" }, + { "name": "syntax", "type": "string" } + ] + }, + { + "id": "CSSPropertyRule", + "description": "CSS property at-rule representation.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "optional": true, + "$ref": "StyleSheetId" + }, + { "name": "origin", "description": "Parent stylesheet's origin.", "$ref": "StyleSheetOrigin" }, + { "name": "propertyName", "description": "Associated property name.", "$ref": "Value" }, + { "name": "style", "description": "Associated style declaration.", "$ref": "CSSStyle" } + ] + }, + { + "id": "CSSKeyframeRule", + "description": "CSS keyframe rule representation.", + "type": "object", + "properties": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from.", + "optional": true, + "$ref": "StyleSheetId" + }, + { "name": "origin", "description": "Parent stylesheet's origin.", "$ref": "StyleSheetOrigin" }, + { "name": "keyText", "description": "Associated key text.", "$ref": "Value" }, + { "name": "style", "description": "Associated style declaration.", "$ref": "CSSStyle" } + ] + }, + { + "id": "StyleDeclarationEdit", + "description": "A descriptor of operation to mutate style declaration text.", + "type": "object", + "properties": [ + { "name": "styleSheetId", "description": "The css style sheet identifier.", "$ref": "StyleSheetId" }, + { + "name": "range", + "description": "The range of the style text in the enclosing stylesheet.", + "$ref": "SourceRange" + }, + { "name": "text", "description": "New style text.", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "addRule", + "description": "Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the\nposition specified by `location`.", + "parameters": [ + { + "name": "styleSheetId", + "description": "The css style sheet identifier where a new rule should be inserted.", + "$ref": "StyleSheetId" + }, + { "name": "ruleText", "description": "The text of a new rule.", "type": "string" }, + { + "name": "location", + "description": "Text position of a new rule in the target style sheet.", + "$ref": "SourceRange" + } + ], + "returns": [{ "name": "rule", "description": "The newly created rule.", "$ref": "CSSRule" }] + }, + { + "name": "collectClassNames", + "description": "Returns all class names from specified stylesheet.", + "parameters": [{ "name": "styleSheetId", "$ref": "StyleSheetId" }], + "returns": [ + { "name": "classNames", "description": "Class name list.", "type": "array", "items": { "type": "string" } } + ] + }, + { + "name": "createStyleSheet", + "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given `frameId`.", + "parameters": [ + { + "name": "frameId", + "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created.", + "$ref": "Page.FrameId" + } + ], + "returns": [ + { + "name": "styleSheetId", + "description": "Identifier of the created \"via-inspector\" stylesheet.", + "$ref": "StyleSheetId" + } + ] + }, + { "name": "disable", "description": "Disables the CSS agent for the given page." }, + { + "name": "enable", + "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received." + }, + { + "name": "forcePseudoState", + "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by\nthe browser.", + "parameters": [ + { + "name": "nodeId", + "description": "The element id for which to force the pseudo state.", + "$ref": "DOM.NodeId" + }, + { + "name": "forcedPseudoClasses", + "description": "Element pseudo classes to force when computing the element's style.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "getBackgroundColors", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to get background colors for.", "$ref": "DOM.NodeId" } + ], + "returns": [ + { + "name": "backgroundColors", + "description": "The range of background colors behind this element, if it contains any visible text. If no\nvisible text is present, this will be undefined. In the case of a flat background color,\nthis will consist of simply that color. In the case of a gradient, this will consist of each\nof the color stops. For anything more complicated, this will be an empty array. Images will\nbe ignored (as if the image had failed to load).", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "computedFontSize", + "description": "The computed font size for this node, as a CSS computed value string (e.g. '12px').", + "optional": true, + "type": "string" + }, + { + "name": "computedFontWeight", + "description": "The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or\n'100').", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "getComputedStyleForNode", + "description": "Returns the computed style for a DOM node identified by `nodeId`.", + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }], + "returns": [ + { + "name": "computedStyle", + "description": "Computed style for the specified DOM node.", + "type": "array", + "items": { "$ref": "CSSComputedStyleProperty" } + } + ] + }, + { + "name": "getInlineStylesForNode", + "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM\nattributes) for a DOM node identified by `nodeId`.", + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }], + "returns": [ + { + "name": "inlineStyle", + "description": "Inline style for the specified DOM node.", + "optional": true, + "$ref": "CSSStyle" + }, + { + "name": "attributesStyle", + "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").", + "optional": true, + "$ref": "CSSStyle" + } + ] + }, + { + "name": "getMatchedStylesForNode", + "description": "Returns requested styles for a DOM node identified by `nodeId`.", + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }], + "returns": [ + { + "name": "inlineStyle", + "description": "Inline style for the specified DOM node.", + "optional": true, + "$ref": "CSSStyle" + }, + { + "name": "attributesStyle", + "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\").", + "optional": true, + "$ref": "CSSStyle" + }, + { + "name": "matchedCSSRules", + "description": "CSS rules matching this node, from all applicable stylesheets.", + "optional": true, + "type": "array", + "items": { "$ref": "RuleMatch" } + }, + { + "name": "pseudoElements", + "description": "Pseudo style matches for this node.", + "optional": true, + "type": "array", + "items": { "$ref": "PseudoElementMatches" } + }, + { + "name": "inherited", + "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root).", + "optional": true, + "type": "array", + "items": { "$ref": "InheritedStyleEntry" } + }, + { + "name": "inheritedPseudoElements", + "description": "A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).", + "optional": true, + "type": "array", + "items": { "$ref": "InheritedPseudoElementMatches" } + }, + { + "name": "cssKeyframesRules", + "description": "A list of CSS keyframed animations matching this node.", + "optional": true, + "type": "array", + "items": { "$ref": "CSSKeyframesRule" } + }, + { + "name": "cssPositionFallbackRules", + "description": "A list of CSS position fallbacks matching this node.", + "optional": true, + "type": "array", + "items": { "$ref": "CSSPositionFallbackRule" } + }, + { + "name": "cssPropertyRules", + "description": "A list of CSS at-property rules matching this node.", + "optional": true, + "type": "array", + "items": { "$ref": "CSSPropertyRule" } + }, + { + "name": "cssPropertyRegistrations", + "description": "A list of CSS property registrations matching this node.", + "optional": true, + "type": "array", + "items": { "$ref": "CSSPropertyRegistration" } + }, + { + "name": "parentLayoutNodeId", + "description": "Id of the first parent element that does not have display: contents.", + "experimental": true, + "optional": true, + "$ref": "DOM.NodeId" + } + ] + }, + { + "name": "getMediaQueries", + "description": "Returns all media queries parsed by the rendering engine.", + "returns": [{ "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } }] + }, + { + "name": "getPlatformFontsForNode", + "description": "Requests information about platform fonts which we used to render child TextNodes in the given\nnode.", + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }], + "returns": [ + { + "name": "fonts", + "description": "Usage statistics for every employed platform font.", + "type": "array", + "items": { "$ref": "PlatformFontUsage" } + } + ] + }, + { + "name": "getStyleSheetText", + "description": "Returns the current textual content for a stylesheet.", + "parameters": [{ "name": "styleSheetId", "$ref": "StyleSheetId" }], + "returns": [{ "name": "text", "description": "The stylesheet text.", "type": "string" }] + }, + { + "name": "getLayersForNode", + "description": "Returns all layers parsed by the rendering engine for the tree scope of a node.\nGiven a DOM element identified by nodeId, getLayersForNode returns the root\nlayer for the nearest ancestor document or shadow root. The layer root contains\nthe full layer tree for the tree scope and their ordering.", + "experimental": true, + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }], + "returns": [{ "name": "rootLayer", "$ref": "CSSLayerData" }] + }, + { + "name": "trackComputedStyleUpdates", + "description": "Starts tracking the given computed styles for updates. The specified array of properties\nreplaces the one previously specified. Pass empty array to disable tracking.\nUse takeComputedStyleUpdates to retrieve the list of nodes that had properties modified.\nThe changes to computed style properties are only tracked for nodes pushed to the front-end\nby the DOM agent. If no changes to the tracked properties occur after the node has been pushed\nto the front-end, no updates will be issued for the node.", + "experimental": true, + "parameters": [ + { "name": "propertiesToTrack", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" } } + ] + }, + { + "name": "takeComputedStyleUpdates", + "description": "Polls the next batch of computed style updates.", + "experimental": true, + "returns": [ + { + "name": "nodeIds", + "description": "The list of node Ids that have their tracked computed styles updated.", + "type": "array", + "items": { "$ref": "DOM.NodeId" } + } + ] + }, + { + "name": "setEffectivePropertyValueForNode", + "description": "Find a rule with the given active property for the given node and set the new value for this\nproperty", + "parameters": [ + { "name": "nodeId", "description": "The element id for which to set property.", "$ref": "DOM.NodeId" }, + { "name": "propertyName", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "name": "setKeyframeKey", + "description": "Modifies the keyframe rule key text.", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "keyText", "type": "string" } + ], + "returns": [ + { "name": "keyText", "description": "The resulting key text after modification.", "$ref": "Value" } + ] + }, + { + "name": "setMediaText", + "description": "Modifies the rule selector.", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "media", "description": "The resulting CSS media rule after modification.", "$ref": "CSSMedia" } + ] + }, + { + "name": "setContainerQueryText", + "description": "Modifies the expression of a container query.", + "experimental": true, + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { + "name": "containerQuery", + "description": "The resulting CSS container query rule after modification.", + "$ref": "CSSContainerQuery" + } + ] + }, + { + "name": "setSupportsText", + "description": "Modifies the expression of a supports at-rule.", + "experimental": true, + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { + "name": "supports", + "description": "The resulting CSS Supports rule after modification.", + "$ref": "CSSSupports" + } + ] + }, + { + "name": "setScopeText", + "description": "Modifies the expression of a scope at-rule.", + "experimental": true, + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { "name": "scope", "description": "The resulting CSS Scope rule after modification.", "$ref": "CSSScope" } + ] + }, + { + "name": "setRuleSelector", + "description": "Modifies the rule selector.", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "range", "$ref": "SourceRange" }, + { "name": "selector", "type": "string" } + ], + "returns": [ + { + "name": "selectorList", + "description": "The resulting selector list after modification.", + "$ref": "SelectorList" + } + ] + }, + { + "name": "setStyleSheetText", + "description": "Sets the new stylesheet text.", + "parameters": [ + { "name": "styleSheetId", "$ref": "StyleSheetId" }, + { "name": "text", "type": "string" } + ], + "returns": [ + { + "name": "sourceMapURL", + "description": "URL of source map associated with script (if any).", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setStyleTexts", + "description": "Applies specified style edits one after another in the given order.", + "parameters": [{ "name": "edits", "type": "array", "items": { "$ref": "StyleDeclarationEdit" } }], + "returns": [ + { + "name": "styles", + "description": "The resulting styles after modification.", + "type": "array", + "items": { "$ref": "CSSStyle" } + } + ] + }, + { "name": "startRuleUsageTracking", "description": "Enables the selector recording." }, + { + "name": "stopRuleUsageTracking", + "description": "Stop tracking rule usage and return the list of rules that were used since last call to\n`takeCoverageDelta` (or since start of coverage instrumentation).", + "returns": [{ "name": "ruleUsage", "type": "array", "items": { "$ref": "RuleUsage" } }] + }, + { + "name": "takeCoverageDelta", + "description": "Obtain list of rules that became used since last call to this method (or since start of coverage\ninstrumentation).", + "returns": [ + { "name": "coverage", "type": "array", "items": { "$ref": "RuleUsage" } }, + { "name": "timestamp", "description": "Monotonically increasing time, in seconds.", "type": "number" } + ] + }, + { + "name": "setLocalFontsEnabled", + "description": "Enables/disables rendering of local CSS fonts (enabled by default).", + "experimental": true, + "parameters": [ + { "name": "enabled", "description": "Whether rendering of local fonts is enabled.", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "fontsUpdated", + "description": "Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded\nweb font.", + "parameters": [ + { "name": "font", "description": "The web font that has loaded.", "optional": true, "$ref": "FontFace" } + ] + }, + { + "name": "mediaQueryResultChanged", + "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been\nresized.) The current implementation considers only viewport-dependent media features." + }, + { + "name": "styleSheetAdded", + "description": "Fired whenever an active document stylesheet is added.", + "parameters": [ + { "name": "header", "description": "Added stylesheet metainfo.", "$ref": "CSSStyleSheetHeader" } + ] + }, + { + "name": "styleSheetChanged", + "description": "Fired whenever a stylesheet is changed as a result of the client operation.", + "parameters": [{ "name": "styleSheetId", "$ref": "StyleSheetId" }] + }, + { + "name": "styleSheetRemoved", + "description": "Fired whenever an active document stylesheet is removed.", + "parameters": [ + { "name": "styleSheetId", "description": "Identifier of the removed stylesheet.", "$ref": "StyleSheetId" } + ] + } + ] + }, + { + "domain": "Database", + "experimental": true, + "types": [ + { "id": "DatabaseId", "description": "Unique identifier of Database object.", "type": "string" }, + { + "id": "Database", + "description": "Database object.", + "type": "object", + "properties": [ + { "name": "id", "description": "Database ID.", "$ref": "DatabaseId" }, + { "name": "domain", "description": "Database domain.", "type": "string" }, + { "name": "name", "description": "Database name.", "type": "string" }, + { "name": "version", "description": "Database version.", "type": "string" } + ] + }, + { + "id": "Error", + "description": "Database error.", + "type": "object", + "properties": [ + { "name": "message", "description": "Error message.", "type": "string" }, + { "name": "code", "description": "Error code.", "type": "integer" } + ] + } + ], + "commands": [ + { + "name": "disable", + "description": "Disables database tracking, prevents database events from being sent to the client." + }, + { + "name": "enable", + "description": "Enables database tracking, database events will now be delivered to the client." + }, + { + "name": "executeSQL", + "parameters": [ + { "name": "databaseId", "$ref": "DatabaseId" }, + { "name": "query", "type": "string" } + ], + "returns": [ + { "name": "columnNames", "optional": true, "type": "array", "items": { "type": "string" } }, + { "name": "values", "optional": true, "type": "array", "items": { "type": "any" } }, + { "name": "sqlError", "optional": true, "$ref": "Error" } + ] + }, + { + "name": "getDatabaseTableNames", + "parameters": [{ "name": "databaseId", "$ref": "DatabaseId" }], + "returns": [{ "name": "tableNames", "type": "array", "items": { "type": "string" } }] + } + ], + "events": [{ "name": "addDatabase", "parameters": [{ "name": "database", "$ref": "Database" }] }] + }, + { + "domain": "DeviceAccess", + "experimental": true, + "types": [ + { "id": "RequestId", "description": "Device request id.", "type": "string" }, + { "id": "DeviceId", "description": "A device id.", "type": "string" }, + { + "id": "PromptDevice", + "description": "Device information displayed in a user prompt to select a device.", + "type": "object", + "properties": [ + { "name": "id", "$ref": "DeviceId" }, + { + "name": "name", + "description": "Display name as it appears in a device request user prompt.", + "type": "string" + } + ] + } + ], + "commands": [ + { "name": "enable", "description": "Enable events in this domain." }, + { "name": "disable", "description": "Disable events in this domain." }, + { + "name": "selectPrompt", + "description": "Select a device in response to a DeviceAccess.deviceRequestPrompted event.", + "parameters": [ + { "name": "id", "$ref": "RequestId" }, + { "name": "deviceId", "$ref": "DeviceId" } + ] + }, + { + "name": "cancelPrompt", + "description": "Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.", + "parameters": [{ "name": "id", "$ref": "RequestId" }] + } + ], + "events": [ + { + "name": "deviceRequestPrompted", + "description": "A device request opened a user prompt to select a device. Respond with the\nselectPrompt or cancelPrompt command.", + "parameters": [ + { "name": "id", "$ref": "RequestId" }, + { "name": "devices", "type": "array", "items": { "$ref": "PromptDevice" } } + ] + } + ] + }, + { + "domain": "DeviceOrientation", + "experimental": true, + "commands": [ + { "name": "clearDeviceOrientationOverride", "description": "Clears the overridden Device Orientation." }, + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "parameters": [ + { "name": "alpha", "description": "Mock alpha", "type": "number" }, + { "name": "beta", "description": "Mock beta", "type": "number" }, + { "name": "gamma", "description": "Mock gamma", "type": "number" } + ] + } + ] + }, + { + "domain": "DOM", + "description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object\nthat has an `id`. This `id` can be used to get additional information on the Node, resolve it into\nthe JavaScript object wrapper, etc. It is important that client receives DOM events only for the\nnodes that are known to the client. Backend keeps track of the nodes that were sent to the client\nand never sends the same node twice. It is client's responsibility to collect information about\nthe nodes that were sent to the client. Note that `iframe` owner elements will return\ncorresponding document elements as their child nodes.", + "dependencies": ["Runtime"], + "types": [ + { "id": "NodeId", "description": "Unique DOM node identifier.", "type": "integer" }, + { + "id": "BackendNodeId", + "description": "Unique DOM node identifier used to reference a node that may not have been pushed to the\nfront-end.", + "type": "integer" + }, + { + "id": "BackendNode", + "description": "Backend node with a friendly name.", + "type": "object", + "properties": [ + { "name": "nodeType", "description": "`Node`'s nodeType.", "type": "integer" }, + { "name": "nodeName", "description": "`Node`'s nodeName.", "type": "string" }, + { "name": "backendNodeId", "$ref": "BackendNodeId" } + ] + }, + { + "id": "PseudoType", + "description": "Pseudo element type.", + "type": "string", + "enum": [ + "first-line", + "first-letter", + "before", + "after", + "marker", + "backdrop", + "selection", + "target-text", + "spelling-error", + "grammar-error", + "highlight", + "first-line-inherited", + "scrollbar", + "scrollbar-thumb", + "scrollbar-button", + "scrollbar-track", + "scrollbar-track-piece", + "scrollbar-corner", + "resizer", + "input-list-button", + "view-transition", + "view-transition-group", + "view-transition-image-pair", + "view-transition-old", + "view-transition-new" + ] + }, + { + "id": "ShadowRootType", + "description": "Shadow root type.", + "type": "string", + "enum": ["user-agent", "open", "closed"] + }, + { + "id": "CompatibilityMode", + "description": "Document compatibility mode.", + "type": "string", + "enum": ["QuirksMode", "LimitedQuirksMode", "NoQuirksMode"] + }, + { + "id": "PhysicalAxes", + "description": "ContainerSelector physical axes", + "type": "string", + "enum": ["Horizontal", "Vertical", "Both"] + }, + { + "id": "LogicalAxes", + "description": "ContainerSelector logical axes", + "type": "string", + "enum": ["Inline", "Block", "Both"] + }, + { + "id": "Node", + "description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.\nDOMNode is a base node mirror type.", + "type": "object", + "properties": [ + { + "name": "nodeId", + "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend\nwill only push node with given `id` once. It is aware of all requested nodes and will only\nfire DOM events for nodes known to the client.", + "$ref": "NodeId" + }, + { + "name": "parentId", + "description": "The id of the parent node if any.", + "optional": true, + "$ref": "NodeId" + }, + { "name": "backendNodeId", "description": "The BackendNodeId for this node.", "$ref": "BackendNodeId" }, + { "name": "nodeType", "description": "`Node`'s nodeType.", "type": "integer" }, + { "name": "nodeName", "description": "`Node`'s nodeName.", "type": "string" }, + { "name": "localName", "description": "`Node`'s localName.", "type": "string" }, + { "name": "nodeValue", "description": "`Node`'s nodeValue.", "type": "string" }, + { + "name": "childNodeCount", + "description": "Child count for `Container` nodes.", + "optional": true, + "type": "integer" + }, + { + "name": "children", + "description": "Child nodes of this node when requested with children.", + "optional": true, + "type": "array", + "items": { "$ref": "Node" } + }, + { + "name": "attributes", + "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "documentURL", + "description": "Document URL that `Document` or `FrameOwner` node points to.", + "optional": true, + "type": "string" + }, + { + "name": "baseURL", + "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", + "optional": true, + "type": "string" + }, + { "name": "publicId", "description": "`DocumentType`'s publicId.", "optional": true, "type": "string" }, + { "name": "systemId", "description": "`DocumentType`'s systemId.", "optional": true, "type": "string" }, + { + "name": "internalSubset", + "description": "`DocumentType`'s internalSubset.", + "optional": true, + "type": "string" + }, + { + "name": "xmlVersion", + "description": "`Document`'s XML version in case of XML documents.", + "optional": true, + "type": "string" + }, + { "name": "name", "description": "`Attr`'s name.", "optional": true, "type": "string" }, + { "name": "value", "description": "`Attr`'s value.", "optional": true, "type": "string" }, + { + "name": "pseudoType", + "description": "Pseudo element type for this node.", + "optional": true, + "$ref": "PseudoType" + }, + { + "name": "pseudoIdentifier", + "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.", + "optional": true, + "type": "string" + }, + { + "name": "shadowRootType", + "description": "Shadow root type.", + "optional": true, + "$ref": "ShadowRootType" + }, + { + "name": "frameId", + "description": "Frame ID for frame owner elements.", + "optional": true, + "$ref": "Page.FrameId" + }, + { + "name": "contentDocument", + "description": "Content document for frame owner elements.", + "optional": true, + "$ref": "Node" + }, + { + "name": "shadowRoots", + "description": "Shadow root list for given element host.", + "optional": true, + "type": "array", + "items": { "$ref": "Node" } + }, + { + "name": "templateContent", + "description": "Content document fragment for template elements.", + "optional": true, + "$ref": "Node" + }, + { + "name": "pseudoElements", + "description": "Pseudo elements associated with this node.", + "optional": true, + "type": "array", + "items": { "$ref": "Node" } + }, + { + "name": "importedDocument", + "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746).\nThis property used to return the imported document for the HTMLImport links.\nThe property is always undefined now.", + "deprecated": true, + "optional": true, + "$ref": "Node" + }, + { + "name": "distributedNodes", + "description": "Distributed nodes for given insertion point.", + "optional": true, + "type": "array", + "items": { "$ref": "BackendNode" } + }, + { "name": "isSVG", "description": "Whether the node is SVG.", "optional": true, "type": "boolean" }, + { "name": "compatibilityMode", "optional": true, "$ref": "CompatibilityMode" }, + { "name": "assignedSlot", "optional": true, "$ref": "BackendNode" } + ] + }, + { + "id": "RGBA", + "description": "A structure holding an RGBA color.", + "type": "object", + "properties": [ + { "name": "r", "description": "The red component, in the [0-255] range.", "type": "integer" }, + { "name": "g", "description": "The green component, in the [0-255] range.", "type": "integer" }, + { "name": "b", "description": "The blue component, in the [0-255] range.", "type": "integer" }, + { + "name": "a", + "description": "The alpha component, in the [0-1] range (default: 1).", + "optional": true, + "type": "number" + } + ] + }, + { + "id": "Quad", + "description": "An array of quad vertices, x immediately followed by y for each point, points clock-wise.", + "type": "array", + "items": { "type": "number" } + }, + { + "id": "BoxModel", + "description": "Box model.", + "type": "object", + "properties": [ + { "name": "content", "description": "Content box", "$ref": "Quad" }, + { "name": "padding", "description": "Padding box", "$ref": "Quad" }, + { "name": "border", "description": "Border box", "$ref": "Quad" }, + { "name": "margin", "description": "Margin box", "$ref": "Quad" }, + { "name": "width", "description": "Node width", "type": "integer" }, + { "name": "height", "description": "Node height", "type": "integer" }, + { + "name": "shapeOutside", + "description": "Shape outside coordinates", + "optional": true, + "$ref": "ShapeOutsideInfo" + } + ] + }, + { + "id": "ShapeOutsideInfo", + "description": "CSS Shape Outside details.", + "type": "object", + "properties": [ + { "name": "bounds", "description": "Shape bounds", "$ref": "Quad" }, + { "name": "shape", "description": "Shape coordinate details", "type": "array", "items": { "type": "any" } }, + { "name": "marginShape", "description": "Margin shape bounds", "type": "array", "items": { "type": "any" } } + ] + }, + { + "id": "Rect", + "description": "Rectangle.", + "type": "object", + "properties": [ + { "name": "x", "description": "X coordinate", "type": "number" }, + { "name": "y", "description": "Y coordinate", "type": "number" }, + { "name": "width", "description": "Rectangle width", "type": "number" }, + { "name": "height", "description": "Rectangle height", "type": "number" } + ] + }, + { + "id": "CSSComputedStyleProperty", + "type": "object", + "properties": [ + { "name": "name", "description": "Computed style property name.", "type": "string" }, + { "name": "value", "description": "Computed style property value.", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "collectClassNamesFromSubtree", + "description": "Collects class names for the node with given id and all of it's child nodes.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Id of the node to collect class names.", "$ref": "NodeId" } + ], + "returns": [ + { "name": "classNames", "description": "Class name list.", "type": "array", "items": { "type": "string" } } + ] + }, + { + "name": "copyTo", + "description": "Creates a deep copy of the specified node and places it into the target container before the\ngiven anchor.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Id of the node to copy.", "$ref": "NodeId" }, + { "name": "targetNodeId", "description": "Id of the element to drop the copy into.", "$ref": "NodeId" }, + { + "name": "insertBeforeNodeId", + "description": "Drop the copy before this node (if absent, the copy becomes the last child of\n`targetNodeId`).", + "optional": true, + "$ref": "NodeId" + } + ], + "returns": [{ "name": "nodeId", "description": "Id of the node clone.", "$ref": "NodeId" }] + }, + { + "name": "describeNode", + "description": "Describes node given its id, does not require domain to be enabled. Does not start tracking any\nobjects, can be used for automation.", + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "depth", + "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.", + "optional": true, + "type": "integer" + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "node", "description": "Node description.", "$ref": "Node" }] + }, + { + "name": "scrollIntoViewIfNeeded", + "description": "Scrolls the specified rect of the given node into view if not already visible.\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "rect", + "description": "The rect to be scrolled into view, relative to the node's border box, in CSS pixels.\nWhen omitted, center of the node will be used, similar to Element.scrollIntoView.", + "optional": true, + "$ref": "Rect" + } + ] + }, + { "name": "disable", "description": "Disables DOM agent for the given page." }, + { + "name": "discardSearchResults", + "description": "Discards search results from the session with the given id. `getSearchResults` should no longer\nbe called for that search.", + "experimental": true, + "parameters": [{ "name": "searchId", "description": "Unique search session identifier.", "type": "string" }] + }, + { + "name": "enable", + "description": "Enables DOM agent for the given page.", + "parameters": [ + { + "name": "includeWhitespace", + "description": "Whether to include whitespaces in the children array of returned Nodes.", + "experimental": true, + "optional": true, + "type": "string", + "enum": ["none", "all"] + } + ] + }, + { + "name": "focus", + "description": "Focuses the given element.", + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ] + }, + { + "name": "getAttributes", + "description": "Returns attributes for the specified node.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to retrieve attibutes for.", "$ref": "NodeId" } + ], + "returns": [ + { + "name": "attributes", + "description": "An interleaved array of node attribute names and values.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "getBoxModel", + "description": "Returns boxes for the given node.", + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "model", "description": "Box model for the node.", "$ref": "BoxModel" }] + }, + { + "name": "getContentQuads", + "description": "Returns quads that describe node position on the page. This method\nmight return multiple quads for inline nodes.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [ + { + "name": "quads", + "description": "Quads that describe node layout relative to viewport.", + "type": "array", + "items": { "$ref": "Quad" } + } + ] + }, + { + "name": "getDocument", + "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nImplicitly enables the DOM domain events for the current target.", + "parameters": [ + { + "name": "depth", + "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.", + "optional": true, + "type": "integer" + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "root", "description": "Resulting node.", "$ref": "Node" }] + }, + { + "name": "getFlattenedDocument", + "description": "Returns the root DOM node (and optionally the subtree) to the caller.\nDeprecated, as it is not designed to work well with the rest of the DOM agent.\nUse DOMSnapshot.captureSnapshot instead.", + "deprecated": true, + "parameters": [ + { + "name": "depth", + "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.", + "optional": true, + "type": "integer" + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "nodes", "description": "Resulting node.", "type": "array", "items": { "$ref": "Node" } } + ] + }, + { + "name": "getNodesForSubtreeByStyle", + "description": "Finds nodes with a given computed style in a subtree.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Node ID pointing to the root of a subtree.", "$ref": "NodeId" }, + { + "name": "computedStyles", + "description": "The style to filter nodes by (includes nodes if any of properties matches).", + "type": "array", + "items": { "$ref": "CSSComputedStyleProperty" } + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots in the same target should be traversed when returning the\nresults (default is false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "nodeIds", "description": "Resulting nodes.", "type": "array", "items": { "$ref": "NodeId" } } + ] + }, + { + "name": "getNodeForLocation", + "description": "Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is\neither returned or not.", + "parameters": [ + { "name": "x", "description": "X coordinate.", "type": "integer" }, + { "name": "y", "description": "Y coordinate.", "type": "integer" }, + { + "name": "includeUserAgentShadowDOM", + "description": "False to skip to the nearest non-UA shadow root ancestor (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "ignorePointerEventsNone", + "description": "Whether to ignore pointer-events: none on elements and hit test them.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "backendNodeId", "description": "Resulting node.", "$ref": "BackendNodeId" }, + { "name": "frameId", "description": "Frame this node belongs to.", "$ref": "Page.FrameId" }, + { + "name": "nodeId", + "description": "Id of the node at given coordinates, only when enabled and requested document.", + "optional": true, + "$ref": "NodeId" + } + ] + }, + { + "name": "getOuterHTML", + "description": "Returns node's HTML markup.", + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "outerHTML", "description": "Outer HTML markup.", "type": "string" }] + }, + { + "name": "getRelayoutBoundary", + "description": "Returns the id of the nearest ancestor that is a relayout boundary.", + "experimental": true, + "parameters": [{ "name": "nodeId", "description": "Id of the node.", "$ref": "NodeId" }], + "returns": [ + { "name": "nodeId", "description": "Relayout boundary node id for the given node.", "$ref": "NodeId" } + ] + }, + { + "name": "getSearchResults", + "description": "Returns search results from given `fromIndex` to given `toIndex` from the search with the given\nidentifier.", + "experimental": true, + "parameters": [ + { "name": "searchId", "description": "Unique search session identifier.", "type": "string" }, + { + "name": "fromIndex", + "description": "Start index of the search result to be returned.", + "type": "integer" + }, + { "name": "toIndex", "description": "End index of the search result to be returned.", "type": "integer" } + ], + "returns": [ + { + "name": "nodeIds", + "description": "Ids of the search result nodes.", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + }, + { "name": "hideHighlight", "description": "Hides any highlight.", "redirect": "Overlay" }, + { "name": "highlightNode", "description": "Highlights DOM node.", "redirect": "Overlay" }, + { "name": "highlightRect", "description": "Highlights given rectangle.", "redirect": "Overlay" }, + { "name": "markUndoableState", "description": "Marks last undoable state.", "experimental": true }, + { + "name": "moveTo", + "description": "Moves node into the new container, places it before the given anchor.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to move.", "$ref": "NodeId" }, + { + "name": "targetNodeId", + "description": "Id of the element to drop the moved node into.", + "$ref": "NodeId" + }, + { + "name": "insertBeforeNodeId", + "description": "Drop node before this one (if absent, the moved node becomes the last child of\n`targetNodeId`).", + "optional": true, + "$ref": "NodeId" + } + ], + "returns": [{ "name": "nodeId", "description": "New id of the moved node.", "$ref": "NodeId" }] + }, + { + "name": "performSearch", + "description": "Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or\n`cancelSearch` to end this search session.", + "experimental": true, + "parameters": [ + { "name": "query", "description": "Plain text or query selector or XPath search query.", "type": "string" }, + { + "name": "includeUserAgentShadowDOM", + "description": "True to search in user agent shadow DOM.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "searchId", "description": "Unique search session identifier.", "type": "string" }, + { "name": "resultCount", "description": "Number of search results.", "type": "integer" } + ] + }, + { + "name": "pushNodeByPathToFrontend", + "description": "Requests that the node is sent to the caller given its path. // FIXME, use XPath", + "experimental": true, + "parameters": [ + { "name": "path", "description": "Path to node in the proprietary format.", "type": "string" } + ], + "returns": [{ "name": "nodeId", "description": "Id of the node for given path.", "$ref": "NodeId" }] + }, + { + "name": "pushNodesByBackendIdsToFrontend", + "description": "Requests that a batch of nodes is sent to the caller given their backend node ids.", + "experimental": true, + "parameters": [ + { + "name": "backendNodeIds", + "description": "The array of backend node ids.", + "type": "array", + "items": { "$ref": "BackendNodeId" } + } + ], + "returns": [ + { + "name": "nodeIds", + "description": "The array of ids of pushed nodes that correspond to the backend ids specified in\nbackendNodeIds.", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + }, + { + "name": "querySelector", + "description": "Executes `querySelector` on a given node.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to query upon.", "$ref": "NodeId" }, + { "name": "selector", "description": "Selector string.", "type": "string" } + ], + "returns": [{ "name": "nodeId", "description": "Query selector result.", "$ref": "NodeId" }] + }, + { + "name": "querySelectorAll", + "description": "Executes `querySelectorAll` on a given node.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to query upon.", "$ref": "NodeId" }, + { "name": "selector", "description": "Selector string.", "type": "string" } + ], + "returns": [ + { + "name": "nodeIds", + "description": "Query selector result.", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + }, + { + "name": "getTopLayerElements", + "description": "Returns NodeIds of current top layer elements.\nTop layer is rendered closest to the user within a viewport, therefore its elements always\nappear on top of all other content.", + "experimental": true, + "returns": [ + { + "name": "nodeIds", + "description": "NodeIds of top layer elements", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + }, + { "name": "redo", "description": "Re-does the last undone action.", "experimental": true }, + { + "name": "removeAttribute", + "description": "Removes attribute with given name from an element with given id.", + "parameters": [ + { "name": "nodeId", "description": "Id of the element to remove attribute from.", "$ref": "NodeId" }, + { "name": "name", "description": "Name of the attribute to remove.", "type": "string" } + ] + }, + { + "name": "removeNode", + "description": "Removes node with given id.", + "parameters": [{ "name": "nodeId", "description": "Id of the node to remove.", "$ref": "NodeId" }] + }, + { + "name": "requestChildNodes", + "description": "Requests that children of the node with given id are returned to the caller in form of\n`setChildNodes` events where not only immediate children are retrieved, but all children down to\nthe specified depth.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to get children for.", "$ref": "NodeId" }, + { + "name": "depth", + "description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.", + "optional": true, + "type": "integer" + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots should be traversed when returning the sub-tree\n(default is false).", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "requestNode", + "description": "Requests that the node is sent to the caller given the JavaScript node object reference. All\nnodes that form the path from the node to the root are also sent to the client as a series of\n`setChildNodes` notifications.", + "parameters": [ + { + "name": "objectId", + "description": "JavaScript object id to convert into node.", + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "nodeId", "description": "Node id for given object.", "$ref": "NodeId" }] + }, + { + "name": "resolveNode", + "description": "Resolves the JavaScript node object for a given NodeId or BackendNodeId.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to resolve.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Backend identifier of the node to resolve.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectGroup", + "description": "Symbolic group name that can be used to release multiple objects.", + "optional": true, + "type": "string" + }, + { + "name": "executionContextId", + "description": "Execution context in which to resolve the node.", + "optional": true, + "$ref": "Runtime.ExecutionContextId" + } + ], + "returns": [ + { + "name": "object", + "description": "JavaScript object wrapper for given node.", + "$ref": "Runtime.RemoteObject" + } + ] + }, + { + "name": "setAttributeValue", + "description": "Sets attribute for an element with given id.", + "parameters": [ + { "name": "nodeId", "description": "Id of the element to set attribute for.", "$ref": "NodeId" }, + { "name": "name", "description": "Attribute name.", "type": "string" }, + { "name": "value", "description": "Attribute value.", "type": "string" } + ] + }, + { + "name": "setAttributesAsText", + "description": "Sets attributes on element with given id. This method is useful when user edits some existing\nattribute value and types in several attribute name/value pairs.", + "parameters": [ + { "name": "nodeId", "description": "Id of the element to set attributes for.", "$ref": "NodeId" }, + { + "name": "text", + "description": "Text with a number of attributes. Will parse this text using HTML parser.", + "type": "string" + }, + { + "name": "name", + "description": "Attribute name to replace with new attributes derived from text in case text parsed\nsuccessfully.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setFileInputFiles", + "description": "Sets files for the given file input element.", + "parameters": [ + { + "name": "files", + "description": "Array of file paths to set.", + "type": "array", + "items": { "type": "string" } + }, + { "name": "nodeId", "description": "Identifier of the node.", "optional": true, "$ref": "NodeId" }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node.", + "optional": true, + "$ref": "BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ] + }, + { + "name": "setNodeStackTracesEnabled", + "description": "Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.", + "experimental": true, + "parameters": [{ "name": "enable", "description": "Enable or disable.", "type": "boolean" }] + }, + { + "name": "getNodeStackTraces", + "description": "Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "description": "Id of the node to get stack traces for.", "$ref": "NodeId" } + ], + "returns": [ + { + "name": "creation", + "description": "Creation stack trace, if available.", + "optional": true, + "$ref": "Runtime.StackTrace" + } + ] + }, + { + "name": "getFileInfo", + "description": "Returns file information for the given\nFile wrapper.", + "experimental": true, + "parameters": [ + { + "name": "objectId", + "description": "JavaScript object id of the node wrapper.", + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "path", "type": "string" }] + }, + { + "name": "setInspectedNode", + "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details\n$x functions).", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "DOM node id to be accessible by means of $x command line API.", + "$ref": "NodeId" + } + ] + }, + { + "name": "setNodeName", + "description": "Sets node name for a node with given id.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to set name for.", "$ref": "NodeId" }, + { "name": "name", "description": "New node's name.", "type": "string" } + ], + "returns": [{ "name": "nodeId", "description": "New node's id.", "$ref": "NodeId" }] + }, + { + "name": "setNodeValue", + "description": "Sets node value for a node with given id.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to set value for.", "$ref": "NodeId" }, + { "name": "value", "description": "New node's value.", "type": "string" } + ] + }, + { + "name": "setOuterHTML", + "description": "Sets node HTML markup, returns new node id.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to set markup for.", "$ref": "NodeId" }, + { "name": "outerHTML", "description": "Outer HTML markup to set.", "type": "string" } + ] + }, + { "name": "undo", "description": "Undoes the last performed action.", "experimental": true }, + { + "name": "getFrameOwner", + "description": "Returns iframe node that owns iframe with the given domain.", + "experimental": true, + "parameters": [{ "name": "frameId", "$ref": "Page.FrameId" }], + "returns": [ + { "name": "backendNodeId", "description": "Resulting node.", "$ref": "BackendNodeId" }, + { + "name": "nodeId", + "description": "Id of the node at given coordinates, only when enabled and requested document.", + "optional": true, + "$ref": "NodeId" + } + ] + }, + { + "name": "getContainerForNode", + "description": "Returns the query container of the given node based on container query\nconditions: containerName, physical, and logical axes. If no axes are\nprovided, the style container is returned, which is the direct parent or the\nclosest element with a matching container-name.", + "experimental": true, + "parameters": [ + { "name": "nodeId", "$ref": "NodeId" }, + { "name": "containerName", "optional": true, "type": "string" }, + { "name": "physicalAxes", "optional": true, "$ref": "PhysicalAxes" }, + { "name": "logicalAxes", "optional": true, "$ref": "LogicalAxes" } + ], + "returns": [ + { + "name": "nodeId", + "description": "The container node for the given node, or null if not found.", + "optional": true, + "$ref": "NodeId" + } + ] + }, + { + "name": "getQueryingDescendantsForContainer", + "description": "Returns the descendants of a container query container that have\ncontainer queries against this container.", + "experimental": true, + "parameters": [ + { + "name": "nodeId", + "description": "Id of the container node to find querying descendants from.", + "$ref": "NodeId" + } + ], + "returns": [ + { + "name": "nodeIds", + "description": "Descendant nodes with container queries against the given container.", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + } + ], + "events": [ + { + "name": "attributeModified", + "description": "Fired when `Element`'s attribute is modified.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node that has changed.", "$ref": "NodeId" }, + { "name": "name", "description": "Attribute name.", "type": "string" }, + { "name": "value", "description": "Attribute value.", "type": "string" } + ] + }, + { + "name": "attributeRemoved", + "description": "Fired when `Element`'s attribute is removed.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node that has changed.", "$ref": "NodeId" }, + { "name": "name", "description": "A ttribute name.", "type": "string" } + ] + }, + { + "name": "characterDataModified", + "description": "Mirrors `DOMCharacterDataModified` event.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node that has changed.", "$ref": "NodeId" }, + { "name": "characterData", "description": "New text value.", "type": "string" } + ] + }, + { + "name": "childNodeCountUpdated", + "description": "Fired when `Container`'s child node count has changed.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node that has changed.", "$ref": "NodeId" }, + { "name": "childNodeCount", "description": "New node count.", "type": "integer" } + ] + }, + { + "name": "childNodeInserted", + "description": "Mirrors `DOMNodeInserted` event.", + "parameters": [ + { "name": "parentNodeId", "description": "Id of the node that has changed.", "$ref": "NodeId" }, + { "name": "previousNodeId", "description": "Id of the previous sibling.", "$ref": "NodeId" }, + { "name": "node", "description": "Inserted node data.", "$ref": "Node" } + ] + }, + { + "name": "childNodeRemoved", + "description": "Mirrors `DOMNodeRemoved` event.", + "parameters": [ + { "name": "parentNodeId", "description": "Parent id.", "$ref": "NodeId" }, + { "name": "nodeId", "description": "Id of the node that has been removed.", "$ref": "NodeId" } + ] + }, + { + "name": "distributedNodesUpdated", + "description": "Called when distribution is changed.", + "experimental": true, + "parameters": [ + { + "name": "insertionPointId", + "description": "Insertion point where distributed nodes were updated.", + "$ref": "NodeId" + }, + { + "name": "distributedNodes", + "description": "Distributed nodes for given insertion point.", + "type": "array", + "items": { "$ref": "BackendNode" } + } + ] + }, + { + "name": "documentUpdated", + "description": "Fired when `Document` has been totally updated. Node ids are no longer valid." + }, + { + "name": "inlineStyleInvalidated", + "description": "Fired when `Element`'s inline style is modified via a CSS property modification.", + "experimental": true, + "parameters": [ + { + "name": "nodeIds", + "description": "Ids of the nodes for which the inline styles have been invalidated.", + "type": "array", + "items": { "$ref": "NodeId" } + } + ] + }, + { + "name": "pseudoElementAdded", + "description": "Called when a pseudo element is added to an element.", + "experimental": true, + "parameters": [ + { "name": "parentId", "description": "Pseudo element's parent element id.", "$ref": "NodeId" }, + { "name": "pseudoElement", "description": "The added pseudo element.", "$ref": "Node" } + ] + }, + { + "name": "topLayerElementsUpdated", + "description": "Called when top layer elements are changed.", + "experimental": true + }, + { + "name": "pseudoElementRemoved", + "description": "Called when a pseudo element is removed from an element.", + "experimental": true, + "parameters": [ + { "name": "parentId", "description": "Pseudo element's parent element id.", "$ref": "NodeId" }, + { "name": "pseudoElementId", "description": "The removed pseudo element id.", "$ref": "NodeId" } + ] + }, + { + "name": "setChildNodes", + "description": "Fired when backend wants to provide client with the missing DOM structure. This happens upon\nmost of the calls requesting node ids.", + "parameters": [ + { "name": "parentId", "description": "Parent node id to populate with children.", "$ref": "NodeId" }, + { "name": "nodes", "description": "Child nodes array.", "type": "array", "items": { "$ref": "Node" } } + ] + }, + { + "name": "shadowRootPopped", + "description": "Called when shadow root is popped from the element.", + "experimental": true, + "parameters": [ + { "name": "hostId", "description": "Host element id.", "$ref": "NodeId" }, + { "name": "rootId", "description": "Shadow root id.", "$ref": "NodeId" } + ] + }, + { + "name": "shadowRootPushed", + "description": "Called when shadow root is pushed into the element.", + "experimental": true, + "parameters": [ + { "name": "hostId", "description": "Host element id.", "$ref": "NodeId" }, + { "name": "root", "description": "Shadow root.", "$ref": "Node" } + ] + } + ] + }, + { + "domain": "DOMDebugger", + "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript\nexecution will stop on these operations as if there was a regular breakpoint set.", + "dependencies": ["DOM", "Debugger", "Runtime"], + "types": [ + { + "id": "DOMBreakpointType", + "description": "DOM breakpoint type.", + "type": "string", + "enum": ["subtree-modified", "attribute-modified", "node-removed"] + }, + { + "id": "CSPViolationType", + "description": "CSP Violation type.", + "experimental": true, + "type": "string", + "enum": ["trustedtype-sink-violation", "trustedtype-policy-violation"] + }, + { + "id": "EventListener", + "description": "Object event listener.", + "type": "object", + "properties": [ + { "name": "type", "description": "`EventListener`'s type.", "type": "string" }, + { "name": "useCapture", "description": "`EventListener`'s useCapture.", "type": "boolean" }, + { "name": "passive", "description": "`EventListener`'s passive flag.", "type": "boolean" }, + { "name": "once", "description": "`EventListener`'s once flag.", "type": "boolean" }, + { "name": "scriptId", "description": "Script id of the handler code.", "$ref": "Runtime.ScriptId" }, + { "name": "lineNumber", "description": "Line number in the script (0-based).", "type": "integer" }, + { "name": "columnNumber", "description": "Column number in the script (0-based).", "type": "integer" }, + { + "name": "handler", + "description": "Event handler function value.", + "optional": true, + "$ref": "Runtime.RemoteObject" + }, + { + "name": "originalHandler", + "description": "Event original handler function value.", + "optional": true, + "$ref": "Runtime.RemoteObject" + }, + { + "name": "backendNodeId", + "description": "Node the listener is added to (if any).", + "optional": true, + "$ref": "DOM.BackendNodeId" + } + ] + } + ], + "commands": [ + { + "name": "getEventListeners", + "description": "Returns event listeners of the given object.", + "parameters": [ + { + "name": "objectId", + "description": "Identifier of the object to return listeners for.", + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "depth", + "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the\nentire subtree or provide an integer larger than 0.", + "optional": true, + "type": "integer" + }, + { + "name": "pierce", + "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree\n(default is false). Reports listeners for all contexts if pierce is enabled.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "listeners", + "description": "Array of relevant listeners.", + "type": "array", + "items": { "$ref": "EventListener" } + } + ] + }, + { + "name": "removeDOMBreakpoint", + "description": "Removes DOM breakpoint that was set using `setDOMBreakpoint`.", + "parameters": [ + { + "name": "nodeId", + "description": "Identifier of the node to remove breakpoint from.", + "$ref": "DOM.NodeId" + }, + { "name": "type", "description": "Type of the breakpoint to remove.", "$ref": "DOMBreakpointType" } + ] + }, + { + "name": "removeEventListenerBreakpoint", + "description": "Removes breakpoint on particular DOM event.", + "parameters": [ + { "name": "eventName", "description": "Event name.", "type": "string" }, + { + "name": "targetName", + "description": "EventTarget interface name.", + "experimental": true, + "optional": true, + "type": "string" + } + ] + }, + { + "name": "removeInstrumentationBreakpoint", + "description": "Removes breakpoint on particular native event.", + "experimental": true, + "parameters": [{ "name": "eventName", "description": "Instrumentation name to stop on.", "type": "string" }] + }, + { + "name": "removeXHRBreakpoint", + "description": "Removes breakpoint from XMLHttpRequest.", + "parameters": [{ "name": "url", "description": "Resource URL substring.", "type": "string" }] + }, + { + "name": "setBreakOnCSPViolation", + "description": "Sets breakpoint on particular CSP violations.", + "experimental": true, + "parameters": [ + { + "name": "violationTypes", + "description": "CSP Violations to stop upon.", + "type": "array", + "items": { "$ref": "CSPViolationType" } + } + ] + }, + { + "name": "setDOMBreakpoint", + "description": "Sets breakpoint on particular operation with DOM.", + "parameters": [ + { "name": "nodeId", "description": "Identifier of the node to set breakpoint on.", "$ref": "DOM.NodeId" }, + { "name": "type", "description": "Type of the operation to stop upon.", "$ref": "DOMBreakpointType" } + ] + }, + { + "name": "setEventListenerBreakpoint", + "description": "Sets breakpoint on particular DOM event.", + "parameters": [ + { + "name": "eventName", + "description": "DOM Event name to stop on (any DOM event will do).", + "type": "string" + }, + { + "name": "targetName", + "description": "EventTarget interface name to stop on. If equal to `\"*\"` or not provided, will stop on any\nEventTarget.", + "experimental": true, + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setInstrumentationBreakpoint", + "description": "Sets breakpoint on particular native event.", + "experimental": true, + "parameters": [{ "name": "eventName", "description": "Instrumentation name to stop on.", "type": "string" }] + }, + { + "name": "setXHRBreakpoint", + "description": "Sets breakpoint on XMLHttpRequest.", + "parameters": [ + { + "name": "url", + "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon.", + "type": "string" + } + ] + } + ] + }, + { + "domain": "DOMSnapshot", + "description": "This domain facilitates obtaining document snapshots with DOM, layout, and style information.", + "experimental": true, + "dependencies": ["CSS", "DOM", "DOMDebugger", "Page"], + "types": [ + { + "id": "DOMNode", + "description": "A Node in the DOM tree.", + "type": "object", + "properties": [ + { "name": "nodeType", "description": "`Node`'s nodeType.", "type": "integer" }, + { "name": "nodeName", "description": "`Node`'s nodeName.", "type": "string" }, + { "name": "nodeValue", "description": "`Node`'s nodeValue.", "type": "string" }, + { + "name": "textValue", + "description": "Only set for textarea elements, contains the text value.", + "optional": true, + "type": "string" + }, + { + "name": "inputValue", + "description": "Only set for input elements, contains the input's associated text value.", + "optional": true, + "type": "string" + }, + { + "name": "inputChecked", + "description": "Only set for radio and checkbox input elements, indicates if the element has been checked", + "optional": true, + "type": "boolean" + }, + { + "name": "optionSelected", + "description": "Only set for option elements, indicates if the element has been selected", + "optional": true, + "type": "boolean" + }, + { + "name": "backendNodeId", + "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.", + "$ref": "DOM.BackendNodeId" + }, + { + "name": "childNodeIndexes", + "description": "The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if\nany.", + "optional": true, + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "attributes", + "description": "Attributes of an `Element` node.", + "optional": true, + "type": "array", + "items": { "$ref": "NameValue" } + }, + { + "name": "pseudoElementIndexes", + "description": "Indexes of pseudo elements associated with this node in the `domNodes` array returned by\n`getSnapshot`, if any.", + "optional": true, + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "layoutNodeIndex", + "description": "The index of the node's related layout tree node in the `layoutTreeNodes` array returned by\n`getSnapshot`, if any.", + "optional": true, + "type": "integer" + }, + { + "name": "documentURL", + "description": "Document URL that `Document` or `FrameOwner` node points to.", + "optional": true, + "type": "string" + }, + { + "name": "baseURL", + "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", + "optional": true, + "type": "string" + }, + { + "name": "contentLanguage", + "description": "Only set for documents, contains the document's content language.", + "optional": true, + "type": "string" + }, + { + "name": "documentEncoding", + "description": "Only set for documents, contains the document's character set encoding.", + "optional": true, + "type": "string" + }, + { + "name": "publicId", + "description": "`DocumentType` node's publicId.", + "optional": true, + "type": "string" + }, + { + "name": "systemId", + "description": "`DocumentType` node's systemId.", + "optional": true, + "type": "string" + }, + { + "name": "frameId", + "description": "Frame ID for frame owner elements and also for the document node.", + "optional": true, + "$ref": "Page.FrameId" + }, + { + "name": "contentDocumentIndex", + "description": "The index of a frame owner element's content document in the `domNodes` array returned by\n`getSnapshot`, if any.", + "optional": true, + "type": "integer" + }, + { + "name": "pseudoType", + "description": "Type of a pseudo element node.", + "optional": true, + "$ref": "DOM.PseudoType" + }, + { + "name": "shadowRootType", + "description": "Shadow root type.", + "optional": true, + "$ref": "DOM.ShadowRootType" + }, + { + "name": "isClickable", + "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.", + "optional": true, + "type": "boolean" + }, + { + "name": "eventListeners", + "description": "Details of the node's event listeners, if any.", + "optional": true, + "type": "array", + "items": { "$ref": "DOMDebugger.EventListener" } + }, + { + "name": "currentSourceURL", + "description": "The selected url for nodes with a srcset attribute.", + "optional": true, + "type": "string" + }, + { + "name": "originURL", + "description": "The url of the script (if any) that generates this node.", + "optional": true, + "type": "string" + }, + { + "name": "scrollOffsetX", + "description": "Scroll offsets, set when this node is a Document.", + "optional": true, + "type": "number" + }, + { "name": "scrollOffsetY", "optional": true, "type": "number" } + ] + }, + { + "id": "InlineTextBox", + "description": "Details of post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.", + "type": "object", + "properties": [ + { + "name": "boundingBox", + "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.", + "$ref": "DOM.Rect" + }, + { + "name": "startCharacterIndex", + "description": "The starting index in characters, for this post layout textbox substring. Characters that\nwould be represented as a surrogate pair in UTF-16 have length 2.", + "type": "integer" + }, + { + "name": "numCharacters", + "description": "The number of characters in this post layout textbox substring. Characters that would be\nrepresented as a surrogate pair in UTF-16 have length 2.", + "type": "integer" + } + ] + }, + { + "id": "LayoutTreeNode", + "description": "Details of an element in the DOM tree with a LayoutObject.", + "type": "object", + "properties": [ + { + "name": "domNodeIndex", + "description": "The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.", + "type": "integer" + }, + { + "name": "boundingBox", + "description": "The bounding box in document coordinates. Note that scroll offset of the document is ignored.", + "$ref": "DOM.Rect" + }, + { + "name": "layoutText", + "description": "Contents of the LayoutText, if any.", + "optional": true, + "type": "string" + }, + { + "name": "inlineTextNodes", + "description": "The post-layout inline text nodes, if any.", + "optional": true, + "type": "array", + "items": { "$ref": "InlineTextBox" } + }, + { + "name": "styleIndex", + "description": "Index into the `computedStyles` array returned by `getSnapshot`.", + "optional": true, + "type": "integer" + }, + { + "name": "paintOrder", + "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ngetSnapshot was true.", + "optional": true, + "type": "integer" + }, + { + "name": "isStackingContext", + "description": "Set to true to indicate the element begins a new stacking context.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "ComputedStyle", + "description": "A subset of the full ComputedStyle as defined by the request whitelist.", + "type": "object", + "properties": [ + { + "name": "properties", + "description": "Name/value pairs of computed style properties.", + "type": "array", + "items": { "$ref": "NameValue" } + } + ] + }, + { + "id": "NameValue", + "description": "A name/value pair.", + "type": "object", + "properties": [ + { "name": "name", "description": "Attribute/property name.", "type": "string" }, + { "name": "value", "description": "Attribute/property value.", "type": "string" } + ] + }, + { "id": "StringIndex", "description": "Index of the string in the strings table.", "type": "integer" }, + { + "id": "ArrayOfStrings", + "description": "Index of the string in the strings table.", + "type": "array", + "items": { "$ref": "StringIndex" } + }, + { + "id": "RareStringData", + "description": "Data that is only present on rare nodes.", + "type": "object", + "properties": [ + { "name": "index", "type": "array", "items": { "type": "integer" } }, + { "name": "value", "type": "array", "items": { "$ref": "StringIndex" } } + ] + }, + { + "id": "RareBooleanData", + "type": "object", + "properties": [{ "name": "index", "type": "array", "items": { "type": "integer" } }] + }, + { + "id": "RareIntegerData", + "type": "object", + "properties": [ + { "name": "index", "type": "array", "items": { "type": "integer" } }, + { "name": "value", "type": "array", "items": { "type": "integer" } } + ] + }, + { "id": "Rectangle", "type": "array", "items": { "type": "number" } }, + { + "id": "DocumentSnapshot", + "description": "Document snapshot.", + "type": "object", + "properties": [ + { + "name": "documentURL", + "description": "Document URL that `Document` or `FrameOwner` node points to.", + "$ref": "StringIndex" + }, + { "name": "title", "description": "Document title.", "$ref": "StringIndex" }, + { + "name": "baseURL", + "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", + "$ref": "StringIndex" + }, + { + "name": "contentLanguage", + "description": "Contains the document's content language.", + "$ref": "StringIndex" + }, + { + "name": "encodingName", + "description": "Contains the document's character set encoding.", + "$ref": "StringIndex" + }, + { "name": "publicId", "description": "`DocumentType` node's publicId.", "$ref": "StringIndex" }, + { "name": "systemId", "description": "`DocumentType` node's systemId.", "$ref": "StringIndex" }, + { + "name": "frameId", + "description": "Frame ID for frame owner elements and also for the document node.", + "$ref": "StringIndex" + }, + { "name": "nodes", "description": "A table with dom nodes.", "$ref": "NodeTreeSnapshot" }, + { "name": "layout", "description": "The nodes in the layout tree.", "$ref": "LayoutTreeSnapshot" }, + { "name": "textBoxes", "description": "The post-layout inline text nodes.", "$ref": "TextBoxSnapshot" }, + { "name": "scrollOffsetX", "description": "Horizontal scroll offset.", "optional": true, "type": "number" }, + { "name": "scrollOffsetY", "description": "Vertical scroll offset.", "optional": true, "type": "number" }, + { "name": "contentWidth", "description": "Document content width.", "optional": true, "type": "number" }, + { "name": "contentHeight", "description": "Document content height.", "optional": true, "type": "number" } + ] + }, + { + "id": "NodeTreeSnapshot", + "description": "Table containing nodes.", + "type": "object", + "properties": [ + { + "name": "parentIndex", + "description": "Parent node index.", + "optional": true, + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "nodeType", + "description": "`Node`'s nodeType.", + "optional": true, + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "shadowRootType", + "description": "Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "nodeName", + "description": "`Node`'s nodeName.", + "optional": true, + "type": "array", + "items": { "$ref": "StringIndex" } + }, + { + "name": "nodeValue", + "description": "`Node`'s nodeValue.", + "optional": true, + "type": "array", + "items": { "$ref": "StringIndex" } + }, + { + "name": "backendNodeId", + "description": "`Node`'s id, corresponds to DOM.Node.backendNodeId.", + "optional": true, + "type": "array", + "items": { "$ref": "DOM.BackendNodeId" } + }, + { + "name": "attributes", + "description": "Attributes of an `Element` node. Flatten name, value pairs.", + "optional": true, + "type": "array", + "items": { "$ref": "ArrayOfStrings" } + }, + { + "name": "textValue", + "description": "Only set for textarea elements, contains the text value.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "inputValue", + "description": "Only set for input elements, contains the input's associated text value.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "inputChecked", + "description": "Only set for radio and checkbox input elements, indicates if the element has been checked", + "optional": true, + "$ref": "RareBooleanData" + }, + { + "name": "optionSelected", + "description": "Only set for option elements, indicates if the element has been selected", + "optional": true, + "$ref": "RareBooleanData" + }, + { + "name": "contentDocumentIndex", + "description": "The index of the document in the list of the snapshot documents.", + "optional": true, + "$ref": "RareIntegerData" + }, + { + "name": "pseudoType", + "description": "Type of a pseudo element node.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "pseudoIdentifier", + "description": "Pseudo element identifier for this node. Only present if there is a\nvalid pseudoType.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "isClickable", + "description": "Whether this DOM node responds to mouse clicks. This includes nodes that have had click\nevent listeners attached via JavaScript as well as anchor tags that naturally navigate when\nclicked.", + "optional": true, + "$ref": "RareBooleanData" + }, + { + "name": "currentSourceURL", + "description": "The selected url for nodes with a srcset attribute.", + "optional": true, + "$ref": "RareStringData" + }, + { + "name": "originURL", + "description": "The url of the script (if any) that generates this node.", + "optional": true, + "$ref": "RareStringData" + } + ] + }, + { + "id": "LayoutTreeSnapshot", + "description": "Table of details of an element in the DOM tree with a LayoutObject.", + "type": "object", + "properties": [ + { + "name": "nodeIndex", + "description": "Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.", + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "styles", + "description": "Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.", + "type": "array", + "items": { "$ref": "ArrayOfStrings" } + }, + { + "name": "bounds", + "description": "The absolute position bounding box.", + "type": "array", + "items": { "$ref": "Rectangle" } + }, + { + "name": "text", + "description": "Contents of the LayoutText, if any.", + "type": "array", + "items": { "$ref": "StringIndex" } + }, + { "name": "stackingContexts", "description": "Stacking context information.", "$ref": "RareBooleanData" }, + { + "name": "paintOrders", + "description": "Global paint order index, which is determined by the stacking order of the nodes. Nodes\nthat are painted together will have the same index. Only provided if includePaintOrder in\ncaptureSnapshot was true.", + "optional": true, + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "offsetRects", + "description": "The offset rect of nodes. Only available when includeDOMRects is set to true", + "optional": true, + "type": "array", + "items": { "$ref": "Rectangle" } + }, + { + "name": "scrollRects", + "description": "The scroll rect of nodes. Only available when includeDOMRects is set to true", + "optional": true, + "type": "array", + "items": { "$ref": "Rectangle" } + }, + { + "name": "clientRects", + "description": "The client rect of nodes. Only available when includeDOMRects is set to true", + "optional": true, + "type": "array", + "items": { "$ref": "Rectangle" } + }, + { + "name": "blendedBackgroundColors", + "description": "The list of background colors that are blended with colors of overlapping elements.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "$ref": "StringIndex" } + }, + { + "name": "textColorOpacities", + "description": "The list of computed text opacities.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "type": "number" } + } + ] + }, + { + "id": "TextBoxSnapshot", + "description": "Table of details of the post layout rendered text positions. The exact layout should not be regarded as\nstable and may change between versions.", + "type": "object", + "properties": [ + { + "name": "layoutIndex", + "description": "Index of the layout tree node that owns this box collection.", + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "bounds", + "description": "The absolute position bounding box.", + "type": "array", + "items": { "$ref": "Rectangle" } + }, + { + "name": "start", + "description": "The starting index in characters, for this post layout textbox substring. Characters that\nwould be represented as a surrogate pair in UTF-16 have length 2.", + "type": "array", + "items": { "type": "integer" } + }, + { + "name": "length", + "description": "The number of characters in this post layout textbox substring. Characters that would be\nrepresented as a surrogate pair in UTF-16 have length 2.", + "type": "array", + "items": { "type": "integer" } + } + ] + } + ], + "commands": [ + { "name": "disable", "description": "Disables DOM snapshot agent for the given page." }, + { "name": "enable", "description": "Enables DOM snapshot agent for the given page." }, + { + "name": "getSnapshot", + "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.", + "deprecated": true, + "parameters": [ + { + "name": "computedStyleWhitelist", + "description": "Whitelist of computed styles to return.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "includeEventListeners", + "description": "Whether or not to retrieve details of DOM listeners (default false).", + "optional": true, + "type": "boolean" + }, + { + "name": "includePaintOrder", + "description": "Whether to determine and include the paint order index of LayoutTreeNodes (default false).", + "optional": true, + "type": "boolean" + }, + { + "name": "includeUserAgentShadowTree", + "description": "Whether to include UA shadow tree in the snapshot (default false).", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "domNodes", + "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.", + "type": "array", + "items": { "$ref": "DOMNode" } + }, + { + "name": "layoutTreeNodes", + "description": "The nodes in the layout tree.", + "type": "array", + "items": { "$ref": "LayoutTreeNode" } + }, + { + "name": "computedStyles", + "description": "Whitelisted ComputedStyle properties for each node in the layout tree.", + "type": "array", + "items": { "$ref": "ComputedStyle" } + } + ] + }, + { + "name": "captureSnapshot", + "description": "Returns a document snapshot, including the full DOM tree of the root node (including iframes,\ntemplate contents, and imported documents) in a flattened array, as well as layout and\nwhite-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is\nflattened.", + "parameters": [ + { + "name": "computedStyles", + "description": "Whitelist of computed styles to return.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "includePaintOrder", + "description": "Whether to include layout object paint orders into the snapshot.", + "optional": true, + "type": "boolean" + }, + { + "name": "includeDOMRects", + "description": "Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot", + "optional": true, + "type": "boolean" + }, + { + "name": "includeBlendedBackgroundColors", + "description": "Whether to include blended background colors in the snapshot (default: false).\nBlended background color is achieved by blending background colors of all elements\nthat overlap with the current element.", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "includeTextColorOpacities", + "description": "Whether to include text color opacity in the snapshot (default: false).\nAn element might have the opacity property set that affects the text color of the element.\nThe final text color opacity is computed based on the opacity of all overlapping elements.", + "experimental": true, + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "documents", + "description": "The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.", + "type": "array", + "items": { "$ref": "DocumentSnapshot" } + }, + { + "name": "strings", + "description": "Shared string table that all string properties refer to with indexes.", + "type": "array", + "items": { "type": "string" } + } + ] + } + ] + }, + { + "domain": "DOMStorage", + "description": "Query and modify DOM storage.", + "experimental": true, + "types": [ + { "id": "SerializedStorageKey", "type": "string" }, + { + "id": "StorageId", + "description": "DOM Storage identifier.", + "type": "object", + "properties": [ + { + "name": "securityOrigin", + "description": "Security origin for the storage.", + "optional": true, + "type": "string" + }, + { + "name": "storageKey", + "description": "Represents a key by which DOM Storage keys its CachedStorageAreas", + "optional": true, + "$ref": "SerializedStorageKey" + }, + { + "name": "isLocalStorage", + "description": "Whether the storage is local storage (not session storage).", + "type": "boolean" + } + ] + }, + { "id": "Item", "description": "DOM Storage item.", "type": "array", "items": { "type": "string" } } + ], + "commands": [ + { "name": "clear", "parameters": [{ "name": "storageId", "$ref": "StorageId" }] }, + { + "name": "disable", + "description": "Disables storage tracking, prevents storage events from being sent to the client." + }, + { + "name": "enable", + "description": "Enables storage tracking, storage events will now be delivered to the client." + }, + { + "name": "getDOMStorageItems", + "parameters": [{ "name": "storageId", "$ref": "StorageId" }], + "returns": [{ "name": "entries", "type": "array", "items": { "$ref": "Item" } }] + }, + { + "name": "removeDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + }, + { + "name": "setDOMStorageItem", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" } + ] + } + ], + "events": [ + { + "name": "domStorageItemAdded", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + }, + { + "name": "domStorageItemRemoved", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" } + ] + }, + { + "name": "domStorageItemUpdated", + "parameters": [ + { "name": "storageId", "$ref": "StorageId" }, + { "name": "key", "type": "string" }, + { "name": "oldValue", "type": "string" }, + { "name": "newValue", "type": "string" } + ] + }, + { "name": "domStorageItemsCleared", "parameters": [{ "name": "storageId", "$ref": "StorageId" }] } + ] + }, + { + "domain": "Emulation", + "description": "This domain emulates different environments for the page.", + "dependencies": ["DOM", "Page", "Runtime"], + "types": [ + { + "id": "ScreenOrientation", + "description": "Screen orientation.", + "type": "object", + "properties": [ + { + "name": "type", + "description": "Orientation type.", + "type": "string", + "enum": ["portraitPrimary", "portraitSecondary", "landscapePrimary", "landscapeSecondary"] + }, + { "name": "angle", "description": "Orientation angle.", "type": "integer" } + ] + }, + { + "id": "DisplayFeature", + "type": "object", + "properties": [ + { + "name": "orientation", + "description": "Orientation of a display feature in relation to screen", + "type": "string", + "enum": ["vertical", "horizontal"] + }, + { + "name": "offset", + "description": "The offset from the screen origin in either the x (for vertical\norientation) or y (for horizontal orientation) direction.", + "type": "integer" + }, + { + "name": "maskLength", + "description": "A display feature may mask content such that it is not physically\ndisplayed - this length along with the offset describes this area.\nA display feature that only splits content will have a 0 mask_length.", + "type": "integer" + } + ] + }, + { + "id": "MediaFeature", + "type": "object", + "properties": [ + { "name": "name", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "VirtualTimePolicy", + "description": "advance: If the scheduler runs out of immediate work, the virtual time base may fast forward to\nallow the next delayed task (if any) to run; pause: The virtual time base may not advance;\npauseIfNetworkFetchesPending: The virtual time base may not advance if there are any pending\nresource fetches.", + "experimental": true, + "type": "string", + "enum": ["advance", "pause", "pauseIfNetworkFetchesPending"] + }, + { + "id": "UserAgentBrandVersion", + "description": "Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints", + "experimental": true, + "type": "object", + "properties": [ + { "name": "brand", "type": "string" }, + { "name": "version", "type": "string" } + ] + }, + { + "id": "UserAgentMetadata", + "description": "Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints\nMissing optional values will be filled in by the target with what it would normally use.", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "brands", + "description": "Brands appearing in Sec-CH-UA.", + "optional": true, + "type": "array", + "items": { "$ref": "UserAgentBrandVersion" } + }, + { + "name": "fullVersionList", + "description": "Brands appearing in Sec-CH-UA-Full-Version-List.", + "optional": true, + "type": "array", + "items": { "$ref": "UserAgentBrandVersion" } + }, + { "name": "fullVersion", "deprecated": true, "optional": true, "type": "string" }, + { "name": "platform", "type": "string" }, + { "name": "platformVersion", "type": "string" }, + { "name": "architecture", "type": "string" }, + { "name": "model", "type": "string" }, + { "name": "mobile", "type": "boolean" }, + { "name": "bitness", "optional": true, "type": "string" }, + { "name": "wow64", "optional": true, "type": "boolean" } + ] + }, + { + "id": "DisabledImageType", + "description": "Enum of image types that can be disabled.", + "experimental": true, + "type": "string", + "enum": ["avif", "webp"] + } + ], + "commands": [ + { + "name": "canEmulate", + "description": "Tells whether emulation is supported.", + "returns": [{ "name": "result", "description": "True if emulation is supported.", "type": "boolean" }] + }, + { "name": "clearDeviceMetricsOverride", "description": "Clears the overridden device metrics." }, + { "name": "clearGeolocationOverride", "description": "Clears the overridden Geolocation Position and Error." }, + { + "name": "resetPageScaleFactor", + "description": "Requests that page scale factor is reset to initial values.", + "experimental": true + }, + { + "name": "setFocusEmulationEnabled", + "description": "Enables or disables simulating a focused and active page.", + "experimental": true, + "parameters": [ + { "name": "enabled", "description": "Whether to enable to disable focus emulation.", "type": "boolean" } + ] + }, + { + "name": "setAutoDarkModeOverride", + "description": "Automatically render all web contents using a dark theme.", + "experimental": true, + "parameters": [ + { + "name": "enabled", + "description": "Whether to enable or disable automatic dark mode.\nIf not specified, any existing override will be cleared.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "setCPUThrottlingRate", + "description": "Enables CPU throttling to emulate slow CPUs.", + "experimental": true, + "parameters": [ + { + "name": "rate", + "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).", + "type": "number" + } + ] + }, + { + "name": "setDefaultBackgroundColorOverride", + "description": "Sets or clears an override of the default background color of the frame. This override is used\nif the content does not specify one.", + "parameters": [ + { + "name": "color", + "description": "RGBA of the default background color. If not specified, any existing override will be\ncleared.", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\nwindow.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\nquery results).", + "parameters": [ + { + "name": "width", + "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", + "type": "integer" + }, + { + "name": "height", + "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", + "type": "integer" + }, + { + "name": "deviceScaleFactor", + "description": "Overriding device scale factor value. 0 disables the override.", + "type": "number" + }, + { + "name": "mobile", + "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text\nautosizing and more.", + "type": "boolean" + }, + { + "name": "scale", + "description": "Scale to apply to resulting view image.", + "experimental": true, + "optional": true, + "type": "number" + }, + { + "name": "screenWidth", + "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "screenHeight", + "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "positionX", + "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "positionY", + "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "dontSetVisibleSize", + "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "screenOrientation", + "description": "Screen orientation override.", + "optional": true, + "$ref": "ScreenOrientation" + }, + { + "name": "viewport", + "description": "If set, the visible area of the page will be overridden to this viewport. This viewport\nchange is not observed by the page, e.g. viewport-relative elements do not change positions.", + "experimental": true, + "optional": true, + "$ref": "Page.Viewport" + }, + { + "name": "displayFeature", + "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support\nis turned-off.", + "experimental": true, + "optional": true, + "$ref": "DisplayFeature" + } + ] + }, + { + "name": "setScrollbarsHidden", + "experimental": true, + "parameters": [ + { "name": "hidden", "description": "Whether scrollbars should be always hidden.", "type": "boolean" } + ] + }, + { + "name": "setDocumentCookieDisabled", + "experimental": true, + "parameters": [ + { "name": "disabled", "description": "Whether document.coookie API should be disabled.", "type": "boolean" } + ] + }, + { + "name": "setEmitTouchEventsForMouse", + "experimental": true, + "parameters": [ + { + "name": "enabled", + "description": "Whether touch emulation based on mouse input should be enabled.", + "type": "boolean" + }, + { + "name": "configuration", + "description": "Touch/gesture events configuration. Default: current platform.", + "optional": true, + "type": "string", + "enum": ["mobile", "desktop"] + } + ] + }, + { + "name": "setEmulatedMedia", + "description": "Emulates the given media type or media feature for CSS media queries.", + "parameters": [ + { + "name": "media", + "description": "Media type to emulate. Empty string disables the override.", + "optional": true, + "type": "string" + }, + { + "name": "features", + "description": "Media features to emulate.", + "optional": true, + "type": "array", + "items": { "$ref": "MediaFeature" } + } + ] + }, + { + "name": "setEmulatedVisionDeficiency", + "description": "Emulates the given vision deficiency.", + "experimental": true, + "parameters": [ + { + "name": "type", + "description": "Vision deficiency to emulate. Order: best-effort emulations come first, followed by any\nphysiologically accurate emulations for medically recognized color vision deficiencies.", + "type": "string", + "enum": [ + "none", + "blurredVision", + "reducedContrast", + "achromatopsia", + "deuteranopia", + "protanopia", + "tritanopia" + ] + } + ] + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position\nunavailable.", + "parameters": [ + { "name": "latitude", "description": "Mock latitude", "optional": true, "type": "number" }, + { "name": "longitude", "description": "Mock longitude", "optional": true, "type": "number" }, + { "name": "accuracy", "description": "Mock accuracy", "optional": true, "type": "number" } + ] + }, + { + "name": "setIdleOverride", + "description": "Overrides the Idle state.", + "experimental": true, + "parameters": [ + { "name": "isUserActive", "description": "Mock isUserActive", "type": "boolean" }, + { "name": "isScreenUnlocked", "description": "Mock isScreenUnlocked", "type": "boolean" } + ] + }, + { "name": "clearIdleOverride", "description": "Clears Idle state overrides.", "experimental": true }, + { + "name": "setNavigatorOverrides", + "description": "Overrides value returned by the javascript navigator object.", + "experimental": true, + "deprecated": true, + "parameters": [ + { "name": "platform", "description": "The platform navigator.platform should return.", "type": "string" } + ] + }, + { + "name": "setPageScaleFactor", + "description": "Sets a specified page scale factor.", + "experimental": true, + "parameters": [{ "name": "pageScaleFactor", "description": "Page scale factor.", "type": "number" }] + }, + { + "name": "setScriptExecutionDisabled", + "description": "Switches script execution in the page.", + "parameters": [ + { + "name": "value", + "description": "Whether script execution should be disabled in the page.", + "type": "boolean" + } + ] + }, + { + "name": "setTouchEmulationEnabled", + "description": "Enables touch on platforms which do not support them.", + "parameters": [ + { + "name": "enabled", + "description": "Whether the touch event emulation should be enabled.", + "type": "boolean" + }, + { + "name": "maxTouchPoints", + "description": "Maximum touch points supported. Defaults to one.", + "optional": true, + "type": "integer" + } + ] + }, + { + "name": "setVirtualTimePolicy", + "description": "Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets\nthe current virtual time policy. Note this supersedes any previous time budget.", + "experimental": true, + "parameters": [ + { "name": "policy", "$ref": "VirtualTimePolicy" }, + { + "name": "budget", + "description": "If set, after this many virtual milliseconds have elapsed virtual time will be paused and a\nvirtualTimeBudgetExpired event is sent.", + "optional": true, + "type": "number" + }, + { + "name": "maxVirtualTimeTaskStarvationCount", + "description": "If set this specifies the maximum number of tasks that can be run before virtual is forced\nforwards to prevent deadlock.", + "optional": true, + "type": "integer" + }, + { + "name": "initialVirtualTime", + "description": "If set, base::Time::Now will be overridden to initially return this value.", + "optional": true, + "$ref": "Network.TimeSinceEpoch" + } + ], + "returns": [ + { + "name": "virtualTimeTicksBase", + "description": "Absolute timestamp at which virtual time was first enabled (up time in milliseconds).", + "type": "number" + } + ] + }, + { + "name": "setLocaleOverride", + "description": "Overrides default host system locale with the specified one.", + "experimental": true, + "parameters": [ + { + "name": "locale", + "description": "ICU style C locale (e.g. \"en_US\"). If not specified or empty, disables the override and\nrestores default host system locale.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setTimezoneOverride", + "description": "Overrides default host system timezone with the specified one.", + "experimental": true, + "parameters": [ + { + "name": "timezoneId", + "description": "The timezone identifier. If empty, disables the override and\nrestores default host system timezone.", + "type": "string" + } + ] + }, + { + "name": "setVisibleSize", + "description": "Resizes the frame/viewport of the page. Note that this does not affect the frame's container\n(e.g. browser window). Can be used to produce screenshots of the specified size. Not supported\non Android.", + "experimental": true, + "deprecated": true, + "parameters": [ + { "name": "width", "description": "Frame width (DIP).", "type": "integer" }, + { "name": "height", "description": "Frame height (DIP).", "type": "integer" } + ] + }, + { + "name": "setDisabledImageTypes", + "experimental": true, + "parameters": [ + { + "name": "imageTypes", + "description": "Image types to disable.", + "type": "array", + "items": { "$ref": "DisabledImageType" } + } + ] + }, + { + "name": "setHardwareConcurrencyOverride", + "experimental": true, + "parameters": [ + { "name": "hardwareConcurrency", "description": "Hardware concurrency to report", "type": "integer" } + ] + }, + { + "name": "setUserAgentOverride", + "description": "Allows overriding user agent with the given string.", + "parameters": [ + { "name": "userAgent", "description": "User agent to use.", "type": "string" }, + { + "name": "acceptLanguage", + "description": "Browser langugage to emulate.", + "optional": true, + "type": "string" + }, + { + "name": "platform", + "description": "The platform navigator.platform should return.", + "optional": true, + "type": "string" + }, + { + "name": "userAgentMetadata", + "description": "To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData", + "experimental": true, + "optional": true, + "$ref": "UserAgentMetadata" + } + ] + }, + { + "name": "setAutomationOverride", + "description": "Allows overriding the automation flag.", + "experimental": true, + "parameters": [ + { "name": "enabled", "description": "Whether the override should be enabled.", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "virtualTimeBudgetExpired", + "description": "Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.", + "experimental": true + } + ] + }, + { + "domain": "EventBreakpoints", + "description": "EventBreakpoints permits setting breakpoints on particular operations and\nevents in targets that run JavaScript but do not have a DOM.\nJavaScript execution will stop on these operations as if there was a regular\nbreakpoint set.", + "experimental": true, + "commands": [ + { + "name": "setInstrumentationBreakpoint", + "description": "Sets breakpoint on particular native event.", + "parameters": [{ "name": "eventName", "description": "Instrumentation name to stop on.", "type": "string" }] + }, + { + "name": "removeInstrumentationBreakpoint", + "description": "Removes breakpoint on particular native event.", + "parameters": [{ "name": "eventName", "description": "Instrumentation name to stop on.", "type": "string" }] + } + ] + }, + { + "domain": "FedCm", + "description": "This domain allows interacting with the FedCM dialog.", + "experimental": true, + "types": [ + { + "id": "LoginState", + "description": "Whether this is a sign-up or sign-in action for this account, i.e.\nwhether this account has ever been used to sign in to this RP before.", + "type": "string", + "enum": ["SignIn", "SignUp"] + }, + { + "id": "DialogType", + "description": "Whether the dialog shown is an account chooser or an auto re-authentication dialog.", + "type": "string", + "enum": ["AccountChooser", "AutoReauthn", "ConfirmIdpSignin"] + }, + { + "id": "Account", + "description": "Corresponds to IdentityRequestAccount", + "type": "object", + "properties": [ + { "name": "accountId", "type": "string" }, + { "name": "email", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "givenName", "type": "string" }, + { "name": "pictureUrl", "type": "string" }, + { "name": "idpConfigUrl", "type": "string" }, + { "name": "idpSigninUrl", "type": "string" }, + { "name": "loginState", "$ref": "LoginState" }, + { + "name": "termsOfServiceUrl", + "description": "These two are only set if the loginState is signUp", + "optional": true, + "type": "string" + }, + { "name": "privacyPolicyUrl", "optional": true, "type": "string" } + ] + } + ], + "events": [ + { + "name": "dialogShown", + "parameters": [ + { "name": "dialogId", "type": "string" }, + { "name": "dialogType", "$ref": "DialogType" }, + { "name": "accounts", "type": "array", "items": { "$ref": "Account" } }, + { + "name": "title", + "description": "These exist primarily so that the caller can verify the\nRP context was used appropriately.", + "type": "string" + }, + { "name": "subtitle", "optional": true, "type": "string" } + ] + } + ], + "commands": [ + { + "name": "enable", + "parameters": [ + { + "name": "disableRejectionDelay", + "description": "Allows callers to disable the promise rejection delay that would\nnormally happen, if this is unimportant to what's being tested.\n(step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)", + "optional": true, + "type": "boolean" + } + ] + }, + { "name": "disable" }, + { + "name": "selectAccount", + "parameters": [ + { "name": "dialogId", "type": "string" }, + { "name": "accountIndex", "type": "integer" } + ] + }, + { + "name": "dismissDialog", + "parameters": [ + { "name": "dialogId", "type": "string" }, + { "name": "triggerCooldown", "optional": true, "type": "boolean" } + ] + }, + { + "name": "resetCooldown", + "description": "Resets the cooldown time, if any, to allow the next FedCM call to show\na dialog even if one was recently dismissed by the user." + } + ] + }, + { + "domain": "Fetch", + "description": "A domain for letting clients substitute browser's network layer with client code.", + "dependencies": ["Network", "IO", "Page"], + "types": [ + { "id": "RequestId", "description": "Unique request identifier.", "type": "string" }, + { + "id": "RequestStage", + "description": "Stages of the request to handle. Request will intercept before the request is\nsent. Response will intercept after the response is received (but before response\nbody is received).", + "type": "string", + "enum": ["Request", "Response"] + }, + { + "id": "RequestPattern", + "type": "object", + "properties": [ + { + "name": "urlPattern", + "description": "Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is\nbackslash. Omitting is equivalent to `\"*\"`.", + "optional": true, + "type": "string" + }, + { + "name": "resourceType", + "description": "If set, only requests for matching resource types will be intercepted.", + "optional": true, + "$ref": "Network.ResourceType" + }, + { + "name": "requestStage", + "description": "Stage at which to begin intercepting requests. Default is Request.", + "optional": true, + "$ref": "RequestStage" + } + ] + }, + { + "id": "HeaderEntry", + "description": "Response HTTP header entry", + "type": "object", + "properties": [ + { "name": "name", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "AuthChallenge", + "description": "Authorization challenge for HTTP status code 401 or 407.", + "type": "object", + "properties": [ + { + "name": "source", + "description": "Source of the authentication challenge.", + "optional": true, + "type": "string", + "enum": ["Server", "Proxy"] + }, + { "name": "origin", "description": "Origin of the challenger.", "type": "string" }, + { + "name": "scheme", + "description": "The authentication scheme used, such as basic or digest", + "type": "string" + }, + { "name": "realm", "description": "The realm of the challenge. May be empty.", "type": "string" } + ] + }, + { + "id": "AuthChallengeResponse", + "description": "Response to an AuthChallenge.", + "type": "object", + "properties": [ + { + "name": "response", + "description": "The decision on what to do in response to the authorization challenge. Default means\ndeferring to the default behavior of the net stack, which will likely either the Cancel\nauthentication or display a popup dialog box.", + "type": "string", + "enum": ["Default", "CancelAuth", "ProvideCredentials"] + }, + { + "name": "username", + "description": "The username to provide, possibly empty. Should only be set if response is\nProvideCredentials.", + "optional": true, + "type": "string" + }, + { + "name": "password", + "description": "The password to provide, possibly empty. Should only be set if response is\nProvideCredentials.", + "optional": true, + "type": "string" + } + ] + } + ], + "commands": [ + { "name": "disable", "description": "Disables the fetch domain." }, + { + "name": "enable", + "description": "Enables issuing of requestPaused events. A request will be paused until client\ncalls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.", + "parameters": [ + { + "name": "patterns", + "description": "If specified, only requests matching any of these patterns will produce\nfetchRequested event and will be paused until clients response. If not set,\nall requests will be affected.", + "optional": true, + "type": "array", + "items": { "$ref": "RequestPattern" } + }, + { + "name": "handleAuthRequests", + "description": "If true, authRequired events will be issued and requests will be paused\nexpecting a call to continueWithAuth.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "failRequest", + "description": "Causes the request to fail with specified reason.", + "parameters": [ + { + "name": "requestId", + "description": "An id the client received in requestPaused event.", + "$ref": "RequestId" + }, + { + "name": "errorReason", + "description": "Causes the request to fail with the given reason.", + "$ref": "Network.ErrorReason" + } + ] + }, + { + "name": "fulfillRequest", + "description": "Provides response to the request.", + "parameters": [ + { + "name": "requestId", + "description": "An id the client received in requestPaused event.", + "$ref": "RequestId" + }, + { "name": "responseCode", "description": "An HTTP response code.", "type": "integer" }, + { + "name": "responseHeaders", + "description": "Response headers.", + "optional": true, + "type": "array", + "items": { "$ref": "HeaderEntry" } + }, + { + "name": "binaryResponseHeaders", + "description": "Alternative way of specifying response headers as a \\0-separated\nseries of name: value pairs. Prefer the above method unless you\nneed to represent some non-UTF8 values that can't be transmitted\nover the protocol as text. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { + "name": "body", + "description": "A response body. If absent, original response body will be used if\nthe request is intercepted at the response stage and empty body\nwill be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { + "name": "responsePhrase", + "description": "A textual representation of responseCode.\nIf absent, a standard phrase matching responseCode is used.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "continueRequest", + "description": "Continues the request, optionally modifying some of its parameters.", + "parameters": [ + { + "name": "requestId", + "description": "An id the client received in requestPaused event.", + "$ref": "RequestId" + }, + { + "name": "url", + "description": "If set, the request url will be modified in a way that's not observable by page.", + "optional": true, + "type": "string" + }, + { + "name": "method", + "description": "If set, the request method is overridden.", + "optional": true, + "type": "string" + }, + { + "name": "postData", + "description": "If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { + "name": "headers", + "description": "If set, overrides the request headers. Note that the overrides do not\nextend to subsequent redirect hops, if a redirect happens. Another override\nmay be applied to a different request produced by a redirect.", + "optional": true, + "type": "array", + "items": { "$ref": "HeaderEntry" } + }, + { + "name": "interceptResponse", + "description": "If set, overrides response interception behavior for this request.", + "experimental": true, + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "continueWithAuth", + "description": "Continues a request supplying authChallengeResponse following authRequired event.", + "parameters": [ + { + "name": "requestId", + "description": "An id the client received in authRequired event.", + "$ref": "RequestId" + }, + { + "name": "authChallengeResponse", + "description": "Response to with an authChallenge.", + "$ref": "AuthChallengeResponse" + } + ] + }, + { + "name": "continueResponse", + "description": "Continues loading of the paused response, optionally modifying the\nresponse headers. If either responseCode or headers are modified, all of them\nmust be present.", + "experimental": true, + "parameters": [ + { + "name": "requestId", + "description": "An id the client received in requestPaused event.", + "$ref": "RequestId" + }, + { + "name": "responseCode", + "description": "An HTTP response code. If absent, original response code will be used.", + "optional": true, + "type": "integer" + }, + { + "name": "responsePhrase", + "description": "A textual representation of responseCode.\nIf absent, a standard phrase matching responseCode is used.", + "optional": true, + "type": "string" + }, + { + "name": "responseHeaders", + "description": "Response headers. If absent, original response headers will be used.", + "optional": true, + "type": "array", + "items": { "$ref": "HeaderEntry" } + }, + { + "name": "binaryResponseHeaders", + "description": "Alternative way of specifying response headers as a \\0-separated\nseries of name: value pairs. Prefer the above method unless you\nneed to represent some non-UTF8 values that can't be transmitted\nover the protocol as text. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "getResponseBody", + "description": "Causes the body of the response to be received from the server and\nreturned as a single string. May only be issued for a request that\nis paused in the Response stage and is mutually exclusive with\ntakeResponseBodyForInterceptionAsStream. Calling other methods that\naffect the request or disabling fetch domain before body is received\nresults in an undefined behavior.\nNote that the response body is not available for redirects. Requests\npaused in the _redirect received_ state may be differentiated by\n`responseCode` and presence of `location` response header, see\ncomments to `requestPaused` for details.", + "parameters": [ + { + "name": "requestId", + "description": "Identifier for the intercepted request to get body for.", + "$ref": "RequestId" + } + ], + "returns": [ + { "name": "body", "description": "Response body.", "type": "string" }, + { "name": "base64Encoded", "description": "True, if content was sent as base64.", "type": "boolean" } + ] + }, + { + "name": "takeResponseBodyAsStream", + "description": "Returns a handle to the stream representing the response body.\nThe request must be paused in the HeadersReceived stage.\nNote that after this command the request can't be continued\nas is -- client either needs to cancel it or to provide the\nresponse body.\nThe stream only supports sequential read, IO.read will fail if the position\nis specified.\nThis method is mutually exclusive with getResponseBody.\nCalling other methods that affect the request or disabling fetch\ndomain before body is received results in an undefined behavior.", + "parameters": [{ "name": "requestId", "$ref": "RequestId" }], + "returns": [{ "name": "stream", "$ref": "IO.StreamHandle" }] + } + ], + "events": [ + { + "name": "requestPaused", + "description": "Issued when the domain is enabled and the request URL matches the\nspecified filter. The request is paused until the client responds\nwith one of continueRequest, failRequest or fulfillRequest.\nThe stage of the request can be determined by presence of responseErrorReason\nand responseStatusCode -- the request is at the response stage if either\nof these fields is present and in the request stage otherwise.\nRedirect responses and subsequent requests are reported similarly to regular\nresponses and requests. Redirect responses may be distinguished by the value\nof `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with\npresence of the `location` header. Requests resulting from a redirect will\nhave `redirectedRequestId` field set.", + "parameters": [ + { + "name": "requestId", + "description": "Each request the page makes will have a unique id.", + "$ref": "RequestId" + }, + { "name": "request", "description": "The details of the request.", "$ref": "Network.Request" }, + { + "name": "frameId", + "description": "The id of the frame that initiated the request.", + "$ref": "Page.FrameId" + }, + { + "name": "resourceType", + "description": "How the requested resource will be used.", + "$ref": "Network.ResourceType" + }, + { + "name": "responseErrorReason", + "description": "Response error if intercepted at response stage.", + "optional": true, + "$ref": "Network.ErrorReason" + }, + { + "name": "responseStatusCode", + "description": "Response code if intercepted at response stage.", + "optional": true, + "type": "integer" + }, + { + "name": "responseStatusText", + "description": "Response status text if intercepted at response stage.", + "optional": true, + "type": "string" + }, + { + "name": "responseHeaders", + "description": "Response headers if intercepted at the response stage.", + "optional": true, + "type": "array", + "items": { "$ref": "HeaderEntry" } + }, + { + "name": "networkId", + "description": "If the intercepted request had a corresponding Network.requestWillBeSent event fired for it,\nthen this networkId will be the same as the requestId present in the requestWillBeSent event.", + "optional": true, + "$ref": "Network.RequestId" + }, + { + "name": "redirectedRequestId", + "description": "If the request is due to a redirect response from the server, the id of the request that\nhas caused the redirect.", + "experimental": true, + "optional": true, + "$ref": "RequestId" + } + ] + }, + { + "name": "authRequired", + "description": "Issued when the domain is enabled with handleAuthRequests set to true.\nThe request is paused until client responds with continueWithAuth.", + "parameters": [ + { + "name": "requestId", + "description": "Each request the page makes will have a unique id.", + "$ref": "RequestId" + }, + { "name": "request", "description": "The details of the request.", "$ref": "Network.Request" }, + { + "name": "frameId", + "description": "The id of the frame that initiated the request.", + "$ref": "Page.FrameId" + }, + { + "name": "resourceType", + "description": "How the requested resource will be used.", + "$ref": "Network.ResourceType" + }, + { + "name": "authChallenge", + "description": "Details of the Authorization Challenge encountered.\nIf this is set, client should respond with continueRequest that\ncontains AuthChallengeResponse.", + "$ref": "AuthChallenge" + } + ] + } + ] + }, + { + "domain": "HeadlessExperimental", + "description": "This domain provides experimental commands only supported in headless mode.", + "experimental": true, + "dependencies": ["Page", "Runtime"], + "types": [ + { + "id": "ScreenshotParams", + "description": "Encoding options for a screenshot.", + "type": "object", + "properties": [ + { + "name": "format", + "description": "Image compression format (defaults to png).", + "optional": true, + "type": "string", + "enum": ["jpeg", "png", "webp"] + }, + { + "name": "quality", + "description": "Compression quality from range [0..100] (jpeg and webp only).", + "optional": true, + "type": "integer" + }, + { + "name": "optimizeForSpeed", + "description": "Optimize image encoding for speed, not for resulting size (defaults to false)", + "optional": true, + "type": "boolean" + } + ] + } + ], + "commands": [ + { + "name": "beginFrame", + "description": "Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a\nscreenshot from the resulting frame. Requires that the target was created with enabled\nBeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also\nhttps://goo.gle/chrome-headless-rendering for more background.", + "parameters": [ + { + "name": "frameTimeTicks", + "description": "Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set,\nthe current time will be used.", + "optional": true, + "type": "number" + }, + { + "name": "interval", + "description": "The interval between BeginFrames that is reported to the compositor, in milliseconds.\nDefaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.", + "optional": true, + "type": "number" + }, + { + "name": "noDisplayUpdates", + "description": "Whether updates should not be committed and drawn onto the display. False by default. If\ntrue, only side effects of the BeginFrame will be run, such as layout and animations, but\nany visual updates may not be visible on the display or in screenshots.", + "optional": true, + "type": "boolean" + }, + { + "name": "screenshot", + "description": "If set, a screenshot of the frame will be captured and returned in the response. Otherwise,\nno screenshot will be captured. Note that capturing a screenshot can fail, for example,\nduring renderer initialization. In such a case, no screenshot data will be returned.", + "optional": true, + "$ref": "ScreenshotParams" + } + ], + "returns": [ + { + "name": "hasDamage", + "description": "Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the\ndisplay. Reported for diagnostic uses, may be removed in the future.", + "type": "boolean" + }, + { + "name": "screenshotData", + "description": "Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + } + ] + }, + { "name": "disable", "description": "Disables headless events for the target.", "deprecated": true }, + { "name": "enable", "description": "Enables headless events for the target.", "deprecated": true } + ] + }, + { + "domain": "IndexedDB", + "experimental": true, + "dependencies": ["Runtime", "Storage"], + "types": [ + { + "id": "DatabaseWithObjectStores", + "description": "Database with an array of object stores.", + "type": "object", + "properties": [ + { "name": "name", "description": "Database name.", "type": "string" }, + { + "name": "version", + "description": "Database version (type is not 'integer', as the standard\nrequires the version number to be 'unsigned long long')", + "type": "number" + }, + { + "name": "objectStores", + "description": "Object stores in this database.", + "type": "array", + "items": { "$ref": "ObjectStore" } + } + ] + }, + { + "id": "ObjectStore", + "description": "Object store.", + "type": "object", + "properties": [ + { "name": "name", "description": "Object store name.", "type": "string" }, + { "name": "keyPath", "description": "Object store key path.", "$ref": "KeyPath" }, + { + "name": "autoIncrement", + "description": "If true, object store has auto increment flag set.", + "type": "boolean" + }, + { + "name": "indexes", + "description": "Indexes in this object store.", + "type": "array", + "items": { "$ref": "ObjectStoreIndex" } + } + ] + }, + { + "id": "ObjectStoreIndex", + "description": "Object store index.", + "type": "object", + "properties": [ + { "name": "name", "description": "Index name.", "type": "string" }, + { "name": "keyPath", "description": "Index key path.", "$ref": "KeyPath" }, + { "name": "unique", "description": "If true, index is unique.", "type": "boolean" }, + { + "name": "multiEntry", + "description": "If true, index allows multiple entries for a key.", + "type": "boolean" + } + ] + }, + { + "id": "Key", + "description": "Key.", + "type": "object", + "properties": [ + { + "name": "type", + "description": "Key type.", + "type": "string", + "enum": ["number", "string", "date", "array"] + }, + { "name": "number", "description": "Number value.", "optional": true, "type": "number" }, + { "name": "string", "description": "String value.", "optional": true, "type": "string" }, + { "name": "date", "description": "Date value.", "optional": true, "type": "number" }, + { + "name": "array", + "description": "Array value.", + "optional": true, + "type": "array", + "items": { "$ref": "Key" } + } + ] + }, + { + "id": "KeyRange", + "description": "Key range.", + "type": "object", + "properties": [ + { "name": "lower", "description": "Lower bound.", "optional": true, "$ref": "Key" }, + { "name": "upper", "description": "Upper bound.", "optional": true, "$ref": "Key" }, + { "name": "lowerOpen", "description": "If true lower bound is open.", "type": "boolean" }, + { "name": "upperOpen", "description": "If true upper bound is open.", "type": "boolean" } + ] + }, + { + "id": "DataEntry", + "description": "Data entry.", + "type": "object", + "properties": [ + { "name": "key", "description": "Key object.", "$ref": "Runtime.RemoteObject" }, + { "name": "primaryKey", "description": "Primary key object.", "$ref": "Runtime.RemoteObject" }, + { "name": "value", "description": "Value object.", "$ref": "Runtime.RemoteObject" } + ] + }, + { + "id": "KeyPath", + "description": "Key path.", + "type": "object", + "properties": [ + { "name": "type", "description": "Key path type.", "type": "string", "enum": ["null", "string", "array"] }, + { "name": "string", "description": "String value.", "optional": true, "type": "string" }, + { + "name": "array", + "description": "Array value.", + "optional": true, + "type": "array", + "items": { "type": "string" } + } + ] + } + ], + "commands": [ + { + "name": "clearObjectStore", + "description": "Clears all entries from an object store.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "description": "Database name.", "type": "string" }, + { "name": "objectStoreName", "description": "Object store name.", "type": "string" } + ] + }, + { + "name": "deleteDatabase", + "description": "Deletes a database.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "description": "Database name.", "type": "string" } + ] + }, + { + "name": "deleteObjectStoreEntries", + "description": "Delete a range of entries from an object store", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "type": "string" }, + { "name": "objectStoreName", "type": "string" }, + { "name": "keyRange", "description": "Range of entry keys to delete", "$ref": "KeyRange" } + ] + }, + { "name": "disable", "description": "Disables events from backend." }, + { "name": "enable", "description": "Enables events from backend." }, + { + "name": "requestData", + "description": "Requests data from object store or index.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "description": "Database name.", "type": "string" }, + { "name": "objectStoreName", "description": "Object store name.", "type": "string" }, + { + "name": "indexName", + "description": "Index name, empty string for object store data requests.", + "type": "string" + }, + { "name": "skipCount", "description": "Number of records to skip.", "type": "integer" }, + { "name": "pageSize", "description": "Number of records to fetch.", "type": "integer" }, + { "name": "keyRange", "description": "Key range.", "optional": true, "$ref": "KeyRange" } + ], + "returns": [ + { + "name": "objectStoreDataEntries", + "description": "Array of object store data entries.", + "type": "array", + "items": { "$ref": "DataEntry" } + }, + { + "name": "hasMore", + "description": "If true, there are more entries to fetch in the given range.", + "type": "boolean" + } + ] + }, + { + "name": "getMetadata", + "description": "Gets metadata of an object store.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "description": "Database name.", "type": "string" }, + { "name": "objectStoreName", "description": "Object store name.", "type": "string" } + ], + "returns": [ + { "name": "entriesCount", "description": "the entries count", "type": "number" }, + { + "name": "keyGeneratorValue", + "description": "the current value of key generator, to become the next inserted\nkey into the object store. Valid if objectStore.autoIncrement\nis true.", + "type": "number" + } + ] + }, + { + "name": "requestDatabase", + "description": "Requests database with given name in given frame.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + }, + { "name": "databaseName", "description": "Database name.", "type": "string" } + ], + "returns": [ + { + "name": "databaseWithObjectStores", + "description": "Database with an array of object stores.", + "$ref": "DatabaseWithObjectStores" + } + ] + }, + { + "name": "requestDatabaseNames", + "description": "Requests database names for given security origin.", + "parameters": [ + { + "name": "securityOrigin", + "description": "At least and at most one of securityOrigin, storageKey, or storageBucket must be specified.\nSecurity origin.", + "optional": true, + "type": "string" + }, + { "name": "storageKey", "description": "Storage key.", "optional": true, "type": "string" }, + { + "name": "storageBucket", + "description": "Storage bucket. If not specified, it uses the default bucket.", + "optional": true, + "$ref": "Storage.StorageBucket" + } + ], + "returns": [ + { + "name": "databaseNames", + "description": "Database names for origin.", + "type": "array", + "items": { "type": "string" } + } + ] + } + ] + }, + { + "domain": "Input", + "types": [ + { + "id": "TouchPoint", + "type": "object", + "properties": [ + { + "name": "x", + "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", + "type": "number" + }, + { + "name": "y", + "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", + "type": "number" + }, + { + "name": "radiusX", + "description": "X radius of the touch area (default: 1.0).", + "optional": true, + "type": "number" + }, + { + "name": "radiusY", + "description": "Y radius of the touch area (default: 1.0).", + "optional": true, + "type": "number" + }, + { + "name": "rotationAngle", + "description": "Rotation angle (default: 0.0).", + "optional": true, + "type": "number" + }, + { "name": "force", "description": "Force (default: 1.0).", "optional": true, "type": "number" }, + { + "name": "tangentialPressure", + "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).", + "experimental": true, + "optional": true, + "type": "number" + }, + { + "name": "tiltX", + "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "tiltY", + "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "twist", + "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "id", + "description": "Identifier used to track touch sources between events, must be unique within an event.", + "optional": true, + "type": "number" + } + ] + }, + { "id": "GestureSourceType", "experimental": true, "type": "string", "enum": ["default", "touch", "mouse"] }, + { "id": "MouseButton", "type": "string", "enum": ["none", "left", "middle", "right", "back", "forward"] }, + { + "id": "TimeSinceEpoch", + "description": "UTC time in seconds, counted from January 1, 1970.", + "type": "number" + }, + { + "id": "DragDataItem", + "experimental": true, + "type": "object", + "properties": [ + { "name": "mimeType", "description": "Mime type of the dragged data.", "type": "string" }, + { + "name": "data", + "description": "Depending of the value of `mimeType`, it contains the dragged link,\ntext, HTML markup or any other data.", + "type": "string" + }, + { + "name": "title", + "description": "Title associated with a link. Only valid when `mimeType` == \"text/uri-list\".", + "optional": true, + "type": "string" + }, + { + "name": "baseURL", + "description": "Stores the base URL for the contained markup. Only valid when `mimeType`\n== \"text/html\".", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "DragData", + "experimental": true, + "type": "object", + "properties": [ + { "name": "items", "type": "array", "items": { "$ref": "DragDataItem" } }, + { + "name": "files", + "description": "List of filenames that should be included when dropping", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "dragOperationsMask", + "description": "Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16", + "type": "integer" + } + ] + } + ], + "commands": [ + { + "name": "dispatchDragEvent", + "description": "Dispatches a drag event into the page.", + "experimental": true, + "parameters": [ + { + "name": "type", + "description": "Type of the drag event.", + "type": "string", + "enum": ["dragEnter", "dragOver", "drop", "dragCancel"] + }, + { + "name": "x", + "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", + "type": "number" + }, + { + "name": "y", + "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", + "type": "number" + }, + { "name": "data", "$ref": "DragData" }, + { + "name": "modifiers", + "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).", + "optional": true, + "type": "integer" + } + ] + }, + { + "name": "dispatchKeyEvent", + "description": "Dispatches a key event to the page.", + "parameters": [ + { + "name": "type", + "description": "Type of the key event.", + "type": "string", + "enum": ["keyDown", "keyUp", "rawKeyDown", "char"] + }, + { + "name": "modifiers", + "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "timestamp", + "description": "Time at which the event occurred.", + "optional": true, + "$ref": "TimeSinceEpoch" + }, + { + "name": "text", + "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for\nfor `keyUp` and `rawKeyDown` events (default: \"\")", + "optional": true, + "type": "string" + }, + { + "name": "unmodifiedText", + "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for\nshift). Useful for shortcut (accelerator) key handling (default: \"\").", + "optional": true, + "type": "string" + }, + { + "name": "keyIdentifier", + "description": "Unique key identifier (e.g., 'U+0041') (default: \"\").", + "optional": true, + "type": "string" + }, + { + "name": "code", + "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\").", + "optional": true, + "type": "string" + }, + { + "name": "key", + "description": "Unique DOM defined string value describing the meaning of the key in the context of active\nmodifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\").", + "optional": true, + "type": "string" + }, + { + "name": "windowsVirtualKeyCode", + "description": "Windows virtual key code (default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "nativeVirtualKeyCode", + "description": "Native virtual key code (default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "autoRepeat", + "description": "Whether the event was generated from auto repeat (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "isKeypad", + "description": "Whether the event was generated from the keypad (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "isSystemKey", + "description": "Whether the event was a system key event (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "location", + "description": "Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default:\n0).", + "optional": true, + "type": "integer" + }, + { + "name": "commands", + "description": "Editing commands to send with the key event (e.g., 'selectAll') (default: []).\nThese are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.\nSee https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.", + "experimental": true, + "optional": true, + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "insertText", + "description": "This method emulates inserting text that doesn't come from a key press,\nfor example an emoji keyboard or an IME.", + "experimental": true, + "parameters": [{ "name": "text", "description": "The text to insert.", "type": "string" }] + }, + { + "name": "imeSetComposition", + "description": "This method sets the current candidate text for ime.\nUse imeCommitComposition to commit the final text.\nUse imeSetComposition with empty string as text to cancel composition.", + "experimental": true, + "parameters": [ + { "name": "text", "description": "The text to insert", "type": "string" }, + { "name": "selectionStart", "description": "selection start", "type": "integer" }, + { "name": "selectionEnd", "description": "selection end", "type": "integer" }, + { "name": "replacementStart", "description": "replacement start", "optional": true, "type": "integer" }, + { "name": "replacementEnd", "description": "replacement end", "optional": true, "type": "integer" } + ] + }, + { + "name": "dispatchMouseEvent", + "description": "Dispatches a mouse event to the page.", + "parameters": [ + { + "name": "type", + "description": "Type of the mouse event.", + "type": "string", + "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"] + }, + { + "name": "x", + "description": "X coordinate of the event relative to the main frame's viewport in CSS pixels.", + "type": "number" + }, + { + "name": "y", + "description": "Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to\nthe top of the viewport and Y increases as it proceeds towards the bottom of the viewport.", + "type": "number" + }, + { + "name": "modifiers", + "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "timestamp", + "description": "Time at which the event occurred.", + "optional": true, + "$ref": "TimeSinceEpoch" + }, + { + "name": "button", + "description": "Mouse button (default: \"none\").", + "optional": true, + "$ref": "MouseButton" + }, + { + "name": "buttons", + "description": "A number indicating which buttons are pressed on the mouse when a mouse event is triggered.\nLeft=1, Right=2, Middle=4, Back=8, Forward=16, None=0.", + "optional": true, + "type": "integer" + }, + { + "name": "clickCount", + "description": "Number of times the mouse button was clicked (default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "force", + "description": "The normalized pressure, which has a range of [0,1] (default: 0).", + "experimental": true, + "optional": true, + "type": "number" + }, + { + "name": "tangentialPressure", + "description": "The normalized tangential pressure, which has a range of [-1,1] (default: 0).", + "experimental": true, + "optional": true, + "type": "number" + }, + { + "name": "tiltX", + "description": "The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "tiltY", + "description": "The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "twist", + "description": "The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).", + "experimental": true, + "optional": true, + "type": "integer" + }, + { + "name": "deltaX", + "description": "X delta in CSS pixels for mouse wheel event (default: 0).", + "optional": true, + "type": "number" + }, + { + "name": "deltaY", + "description": "Y delta in CSS pixels for mouse wheel event (default: 0).", + "optional": true, + "type": "number" + }, + { + "name": "pointerType", + "description": "Pointer type (default: \"mouse\").", + "optional": true, + "type": "string", + "enum": ["mouse", "pen"] + } + ] + }, + { + "name": "dispatchTouchEvent", + "description": "Dispatches a touch event to the page.", + "parameters": [ + { + "name": "type", + "description": "Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while\nTouchStart and TouchMove must contains at least one.", + "type": "string", + "enum": ["touchStart", "touchEnd", "touchMove", "touchCancel"] + }, + { + "name": "touchPoints", + "description": "Active touch points on the touch device. One event per any changed point (compared to\nprevious touch event in a sequence) is generated, emulating pressing/moving/releasing points\none by one.", + "type": "array", + "items": { "$ref": "TouchPoint" } + }, + { + "name": "modifiers", + "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "timestamp", + "description": "Time at which the event occurred.", + "optional": true, + "$ref": "TimeSinceEpoch" + } + ] + }, + { "name": "cancelDragging", "description": "Cancels any active dragging in the page." }, + { + "name": "emulateTouchFromMouseEvent", + "description": "Emulates touch event from the mouse event parameters.", + "experimental": true, + "parameters": [ + { + "name": "type", + "description": "Type of the mouse event.", + "type": "string", + "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"] + }, + { "name": "x", "description": "X coordinate of the mouse pointer in DIP.", "type": "integer" }, + { "name": "y", "description": "Y coordinate of the mouse pointer in DIP.", "type": "integer" }, + { + "name": "button", + "description": "Mouse button. Only \"none\", \"left\", \"right\" are supported.", + "$ref": "MouseButton" + }, + { + "name": "timestamp", + "description": "Time at which the event occurred (default: current time).", + "optional": true, + "$ref": "TimeSinceEpoch" + }, + { + "name": "deltaX", + "description": "X delta in DIP for mouse wheel event (default: 0).", + "optional": true, + "type": "number" + }, + { + "name": "deltaY", + "description": "Y delta in DIP for mouse wheel event (default: 0).", + "optional": true, + "type": "number" + }, + { + "name": "modifiers", + "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8\n(default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "clickCount", + "description": "Number of times the mouse button was clicked (default: 0).", + "optional": true, + "type": "integer" + } + ] + }, + { + "name": "setIgnoreInputEvents", + "description": "Ignores input events (useful while auditing page).", + "parameters": [ + { "name": "ignore", "description": "Ignores input events processing when set to true.", "type": "boolean" } + ] + }, + { + "name": "setInterceptDrags", + "description": "Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events.\nDrag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.", + "experimental": true, + "parameters": [{ "name": "enabled", "type": "boolean" }] + }, + { + "name": "synthesizePinchGesture", + "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.", + "experimental": true, + "parameters": [ + { "name": "x", "description": "X coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { "name": "y", "description": "Y coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { + "name": "scaleFactor", + "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).", + "type": "number" + }, + { + "name": "relativeSpeed", + "description": "Relative pointer speed in pixels per second (default: 800).", + "optional": true, + "type": "integer" + }, + { + "name": "gestureSourceType", + "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).", + "optional": true, + "$ref": "GestureSourceType" + } + ] + }, + { + "name": "synthesizeScrollGesture", + "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.", + "experimental": true, + "parameters": [ + { "name": "x", "description": "X coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { "name": "y", "description": "Y coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { + "name": "xDistance", + "description": "The distance to scroll along the X axis (positive to scroll left).", + "optional": true, + "type": "number" + }, + { + "name": "yDistance", + "description": "The distance to scroll along the Y axis (positive to scroll up).", + "optional": true, + "type": "number" + }, + { + "name": "xOverscroll", + "description": "The number of additional pixels to scroll back along the X axis, in addition to the given\ndistance.", + "optional": true, + "type": "number" + }, + { + "name": "yOverscroll", + "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given\ndistance.", + "optional": true, + "type": "number" + }, + { + "name": "preventFling", + "description": "Prevent fling (default: true).", + "optional": true, + "type": "boolean" + }, + { + "name": "speed", + "description": "Swipe speed in pixels per second (default: 800).", + "optional": true, + "type": "integer" + }, + { + "name": "gestureSourceType", + "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).", + "optional": true, + "$ref": "GestureSourceType" + }, + { + "name": "repeatCount", + "description": "The number of times to repeat the gesture (default: 0).", + "optional": true, + "type": "integer" + }, + { + "name": "repeatDelayMs", + "description": "The number of milliseconds delay between each repeat. (default: 250).", + "optional": true, + "type": "integer" + }, + { + "name": "interactionMarkerName", + "description": "The name of the interaction markers to generate, if not empty (default: \"\").", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "synthesizeTapGesture", + "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.", + "experimental": true, + "parameters": [ + { "name": "x", "description": "X coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { "name": "y", "description": "Y coordinate of the start of the gesture in CSS pixels.", "type": "number" }, + { + "name": "duration", + "description": "Duration between touchdown and touchup events in ms (default: 50).", + "optional": true, + "type": "integer" + }, + { + "name": "tapCount", + "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1).", + "optional": true, + "type": "integer" + }, + { + "name": "gestureSourceType", + "description": "Which type of input events to be generated (default: 'default', which queries the platform\nfor the preferred input type).", + "optional": true, + "$ref": "GestureSourceType" + } + ] + } + ], + "events": [ + { + "name": "dragIntercepted", + "description": "Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to\nrestore normal drag and drop behavior.", + "experimental": true, + "parameters": [{ "name": "data", "$ref": "DragData" }] + } + ] + }, + { + "domain": "IO", + "description": "Input/Output operations for streams produced by DevTools.", + "types": [ + { + "id": "StreamHandle", + "description": "This is either obtained from another method or specified as `blob:<uuid>` where\n`<uuid>` is an UUID of a Blob.", + "type": "string" + } + ], + "commands": [ + { + "name": "close", + "description": "Close the stream, discard any temporary backing storage.", + "parameters": [{ "name": "handle", "description": "Handle of the stream to close.", "$ref": "StreamHandle" }] + }, + { + "name": "read", + "description": "Read a chunk of the stream", + "parameters": [ + { "name": "handle", "description": "Handle of the stream to read.", "$ref": "StreamHandle" }, + { + "name": "offset", + "description": "Seek to the specified offset before reading (if not specificed, proceed with offset\nfollowing the last read). Some types of streams may only support sequential reads.", + "optional": true, + "type": "integer" + }, + { + "name": "size", + "description": "Maximum number of bytes to read (left upon the agent discretion if not specified).", + "optional": true, + "type": "integer" + } + ], + "returns": [ + { + "name": "base64Encoded", + "description": "Set if the data is base64-encoded", + "optional": true, + "type": "boolean" + }, + { "name": "data", "description": "Data that were read.", "type": "string" }, + { + "name": "eof", + "description": "Set if the end-of-file condition occurred while reading.", + "type": "boolean" + } + ] + }, + { + "name": "resolveBlob", + "description": "Return UUID of Blob object specified by a remote object id.", + "parameters": [ + { + "name": "objectId", + "description": "Object id of a Blob object wrapper.", + "$ref": "Runtime.RemoteObjectId" + } + ], + "returns": [{ "name": "uuid", "description": "UUID of the specified Blob.", "type": "string" }] + } + ] + }, + { + "domain": "LayerTree", + "experimental": true, + "dependencies": ["DOM"], + "types": [ + { "id": "LayerId", "description": "Unique Layer identifier.", "type": "string" }, + { "id": "SnapshotId", "description": "Unique snapshot identifier.", "type": "string" }, + { + "id": "ScrollRect", + "description": "Rectangle where scrolling happens on the main thread.", + "type": "object", + "properties": [ + { "name": "rect", "description": "Rectangle itself.", "$ref": "DOM.Rect" }, + { + "name": "type", + "description": "Reason for rectangle to force scrolling on the main thread", + "type": "string", + "enum": ["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"] + } + ] + }, + { + "id": "StickyPositionConstraint", + "description": "Sticky position constraints.", + "type": "object", + "properties": [ + { + "name": "stickyBoxRect", + "description": "Layout rectangle of the sticky element before being shifted", + "$ref": "DOM.Rect" + }, + { + "name": "containingBlockRect", + "description": "Layout rectangle of the containing block of the sticky element", + "$ref": "DOM.Rect" + }, + { + "name": "nearestLayerShiftingStickyBox", + "description": "The nearest sticky layer that shifts the sticky box", + "optional": true, + "$ref": "LayerId" + }, + { + "name": "nearestLayerShiftingContainingBlock", + "description": "The nearest sticky layer that shifts the containing block", + "optional": true, + "$ref": "LayerId" + } + ] + }, + { + "id": "PictureTile", + "description": "Serialized fragment of layer picture along with its offset within the layer.", + "type": "object", + "properties": [ + { "name": "x", "description": "Offset from owning layer left boundary", "type": "number" }, + { "name": "y", "description": "Offset from owning layer top boundary", "type": "number" }, + { + "name": "picture", + "description": "Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] + }, + { + "id": "Layer", + "description": "Information about a compositing layer.", + "type": "object", + "properties": [ + { "name": "layerId", "description": "The unique id for this layer.", "$ref": "LayerId" }, + { + "name": "parentLayerId", + "description": "The id of parent (not present for root).", + "optional": true, + "$ref": "LayerId" + }, + { + "name": "backendNodeId", + "description": "The backend id for the node associated with this layer.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { "name": "offsetX", "description": "Offset from parent layer, X coordinate.", "type": "number" }, + { "name": "offsetY", "description": "Offset from parent layer, Y coordinate.", "type": "number" }, + { "name": "width", "description": "Layer width.", "type": "number" }, + { "name": "height", "description": "Layer height.", "type": "number" }, + { + "name": "transform", + "description": "Transformation matrix for layer, default is identity matrix", + "optional": true, + "type": "array", + "items": { "type": "number" } + }, + { + "name": "anchorX", + "description": "Transform anchor point X, absent if no transform specified", + "optional": true, + "type": "number" + }, + { + "name": "anchorY", + "description": "Transform anchor point Y, absent if no transform specified", + "optional": true, + "type": "number" + }, + { + "name": "anchorZ", + "description": "Transform anchor point Z, absent if no transform specified", + "optional": true, + "type": "number" + }, + { + "name": "paintCount", + "description": "Indicates how many time this layer has painted.", + "type": "integer" + }, + { + "name": "drawsContent", + "description": "Indicates whether this layer hosts any content, rather than being used for\ntransform/scrolling purposes only.", + "type": "boolean" + }, + { "name": "invisible", "description": "Set if layer is not visible.", "optional": true, "type": "boolean" }, + { + "name": "scrollRects", + "description": "Rectangles scrolling on main thread only.", + "optional": true, + "type": "array", + "items": { "$ref": "ScrollRect" } + }, + { + "name": "stickyPositionConstraint", + "description": "Sticky position constraint information", + "optional": true, + "$ref": "StickyPositionConstraint" + } + ] + }, + { + "id": "PaintProfile", + "description": "Array of timings, one per paint step.", + "type": "array", + "items": { "type": "number" } + } + ], + "commands": [ + { + "name": "compositingReasons", + "description": "Provides the reasons why the given layer was composited.", + "parameters": [ + { + "name": "layerId", + "description": "The id of the layer for which we want to get the reasons it was composited.", + "$ref": "LayerId" + } + ], + "returns": [ + { + "name": "compositingReasons", + "description": "A list of strings specifying reasons for the given layer to become composited.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "compositingReasonIds", + "description": "A list of strings specifying reason IDs for the given layer to become composited.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { "name": "disable", "description": "Disables compositing tree inspection." }, + { "name": "enable", "description": "Enables compositing tree inspection." }, + { + "name": "loadSnapshot", + "description": "Returns the snapshot identifier.", + "parameters": [ + { + "name": "tiles", + "description": "An array of tiles composing the snapshot.", + "type": "array", + "items": { "$ref": "PictureTile" } + } + ], + "returns": [{ "name": "snapshotId", "description": "The id of the snapshot.", "$ref": "SnapshotId" }] + }, + { + "name": "makeSnapshot", + "description": "Returns the layer snapshot identifier.", + "parameters": [{ "name": "layerId", "description": "The id of the layer.", "$ref": "LayerId" }], + "returns": [{ "name": "snapshotId", "description": "The id of the layer snapshot.", "$ref": "SnapshotId" }] + }, + { + "name": "profileSnapshot", + "parameters": [ + { "name": "snapshotId", "description": "The id of the layer snapshot.", "$ref": "SnapshotId" }, + { + "name": "minRepeatCount", + "description": "The maximum number of times to replay the snapshot (1, if not specified).", + "optional": true, + "type": "integer" + }, + { + "name": "minDuration", + "description": "The minimum duration (in seconds) to replay the snapshot.", + "optional": true, + "type": "number" + }, + { + "name": "clipRect", + "description": "The clip rectangle to apply when replaying the snapshot.", + "optional": true, + "$ref": "DOM.Rect" + } + ], + "returns": [ + { + "name": "timings", + "description": "The array of paint profiles, one per run.", + "type": "array", + "items": { "$ref": "PaintProfile" } + } + ] + }, + { + "name": "releaseSnapshot", + "description": "Releases layer snapshot captured by the back-end.", + "parameters": [{ "name": "snapshotId", "description": "The id of the layer snapshot.", "$ref": "SnapshotId" }] + }, + { + "name": "replaySnapshot", + "description": "Replays the layer snapshot and returns the resulting bitmap.", + "parameters": [ + { "name": "snapshotId", "description": "The id of the layer snapshot.", "$ref": "SnapshotId" }, + { + "name": "fromStep", + "description": "The first step to replay from (replay from the very start if not specified).", + "optional": true, + "type": "integer" + }, + { + "name": "toStep", + "description": "The last step to replay to (replay till the end if not specified).", + "optional": true, + "type": "integer" + }, + { + "name": "scale", + "description": "The scale to apply while replaying (defaults to 1).", + "optional": true, + "type": "number" + } + ], + "returns": [{ "name": "dataURL", "description": "A data: URL for resulting image.", "type": "string" }] + }, + { + "name": "snapshotCommandLog", + "description": "Replays the layer snapshot and returns canvas log.", + "parameters": [ + { "name": "snapshotId", "description": "The id of the layer snapshot.", "$ref": "SnapshotId" } + ], + "returns": [ + { + "name": "commandLog", + "description": "The array of canvas function calls.", + "type": "array", + "items": { "type": "object" } + } + ] + } + ], + "events": [ + { + "name": "layerPainted", + "parameters": [ + { "name": "layerId", "description": "The id of the painted layer.", "$ref": "LayerId" }, + { "name": "clip", "description": "Clip rectangle.", "$ref": "DOM.Rect" } + ] + }, + { + "name": "layerTreeDidChange", + "parameters": [ + { + "name": "layers", + "description": "Layer tree, absent if not in the comspositing mode.", + "optional": true, + "type": "array", + "items": { "$ref": "Layer" } + } + ] + } + ] + }, + { + "domain": "Log", + "description": "Provides access to log entries.", + "dependencies": ["Runtime", "Network"], + "types": [ + { + "id": "LogEntry", + "description": "Log entry.", + "type": "object", + "properties": [ + { + "name": "source", + "description": "Log entry source.", + "type": "string", + "enum": [ + "xml", + "javascript", + "network", + "storage", + "appcache", + "rendering", + "security", + "deprecation", + "worker", + "violation", + "intervention", + "recommendation", + "other" + ] + }, + { + "name": "level", + "description": "Log entry severity.", + "type": "string", + "enum": ["verbose", "info", "warning", "error"] + }, + { "name": "text", "description": "Logged text.", "type": "string" }, + { "name": "category", "optional": true, "type": "string", "enum": ["cors"] }, + { "name": "timestamp", "description": "Timestamp when this entry was added.", "$ref": "Runtime.Timestamp" }, + { "name": "url", "description": "URL of the resource if known.", "optional": true, "type": "string" }, + { + "name": "lineNumber", + "description": "Line number in the resource.", + "optional": true, + "type": "integer" + }, + { + "name": "stackTrace", + "description": "JavaScript stack trace.", + "optional": true, + "$ref": "Runtime.StackTrace" + }, + { + "name": "networkRequestId", + "description": "Identifier of the network request associated with this entry.", + "optional": true, + "$ref": "Network.RequestId" + }, + { + "name": "workerId", + "description": "Identifier of the worker associated with this entry.", + "optional": true, + "type": "string" + }, + { + "name": "args", + "description": "Call arguments.", + "optional": true, + "type": "array", + "items": { "$ref": "Runtime.RemoteObject" } + } + ] + }, + { + "id": "ViolationSetting", + "description": "Violation configuration setting.", + "type": "object", + "properties": [ + { + "name": "name", + "description": "Violation type.", + "type": "string", + "enum": [ + "longTask", + "longLayout", + "blockedEvent", + "blockedParser", + "discouragedAPIUse", + "handler", + "recurringHandler" + ] + }, + { "name": "threshold", "description": "Time threshold to trigger upon.", "type": "number" } + ] + } + ], + "commands": [ + { "name": "clear", "description": "Clears the log." }, + { + "name": "disable", + "description": "Disables log domain, prevents further log entries from being reported to the client." + }, + { + "name": "enable", + "description": "Enables log domain, sends the entries collected so far to the client by means of the\n`entryAdded` notification." + }, + { + "name": "startViolationsReport", + "description": "start violation reporting.", + "parameters": [ + { + "name": "config", + "description": "Configuration for violations.", + "type": "array", + "items": { "$ref": "ViolationSetting" } + } + ] + }, + { "name": "stopViolationsReport", "description": "Stop violation reporting." } + ], + "events": [ + { + "name": "entryAdded", + "description": "Issued when new message was logged.", + "parameters": [{ "name": "entry", "description": "The entry.", "$ref": "LogEntry" }] + } + ] + }, + { + "domain": "Media", + "description": "This domain allows detailed inspection of media elements", + "experimental": true, + "types": [ + { + "id": "PlayerId", + "description": "Players will get an ID that is unique within the agent context.", + "type": "string" + }, + { "id": "Timestamp", "type": "number" }, + { + "id": "PlayerMessage", + "description": "Have one type per entry in MediaLogRecord::Type\nCorresponds to kMessage", + "type": "object", + "properties": [ + { + "name": "level", + "description": "Keep in sync with MediaLogMessageLevel\nWe are currently keeping the message level 'error' separate from the\nPlayerError type because right now they represent different things,\nthis one being a DVLOG(ERROR) style log message that gets printed\nbased on what log level is selected in the UI, and the other is a\nrepresentation of a media::PipelineStatus object. Soon however we're\ngoing to be moving away from using PipelineStatus for errors and\nintroducing a new error type which should hopefully let us integrate\nthe error log level into the PlayerError type.", + "type": "string", + "enum": ["error", "warning", "info", "debug"] + }, + { "name": "message", "type": "string" } + ] + }, + { + "id": "PlayerProperty", + "description": "Corresponds to kMediaPropertyChange", + "type": "object", + "properties": [ + { "name": "name", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "PlayerEvent", + "description": "Corresponds to kMediaEventTriggered", + "type": "object", + "properties": [ + { "name": "timestamp", "$ref": "Timestamp" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "PlayerErrorSourceLocation", + "description": "Represents logged source line numbers reported in an error.\nNOTE: file and line are from chromium c++ implementation code, not js.", + "type": "object", + "properties": [ + { "name": "file", "type": "string" }, + { "name": "line", "type": "integer" } + ] + }, + { + "id": "PlayerError", + "description": "Corresponds to kMediaError", + "type": "object", + "properties": [ + { "name": "errorType", "type": "string" }, + { + "name": "code", + "description": "Code is the numeric enum entry for a specific set of error codes, such\nas PipelineStatusCodes in media/base/pipeline_status.h", + "type": "integer" + }, + { + "name": "stack", + "description": "A trace of where this error was caused / where it passed through.", + "type": "array", + "items": { "$ref": "PlayerErrorSourceLocation" } + }, + { + "name": "cause", + "description": "Errors potentially have a root cause error, ie, a DecoderError might be\ncaused by an WindowsError", + "type": "array", + "items": { "$ref": "PlayerError" } + }, + { + "name": "data", + "description": "Extra data attached to an error, such as an HRESULT, Video Codec, etc.", + "type": "object" + } + ] + } + ], + "events": [ + { + "name": "playerPropertiesChanged", + "description": "This can be called multiple times, and can be used to set / override /\nremove player properties. A null propValue indicates removal.", + "parameters": [ + { "name": "playerId", "$ref": "PlayerId" }, + { "name": "properties", "type": "array", "items": { "$ref": "PlayerProperty" } } + ] + }, + { + "name": "playerEventsAdded", + "description": "Send events as a list, allowing them to be batched on the browser for less\ncongestion. If batched, events must ALWAYS be in chronological order.", + "parameters": [ + { "name": "playerId", "$ref": "PlayerId" }, + { "name": "events", "type": "array", "items": { "$ref": "PlayerEvent" } } + ] + }, + { + "name": "playerMessagesLogged", + "description": "Send a list of any messages that need to be delivered.", + "parameters": [ + { "name": "playerId", "$ref": "PlayerId" }, + { "name": "messages", "type": "array", "items": { "$ref": "PlayerMessage" } } + ] + }, + { + "name": "playerErrorsRaised", + "description": "Send a list of any errors that need to be delivered.", + "parameters": [ + { "name": "playerId", "$ref": "PlayerId" }, + { "name": "errors", "type": "array", "items": { "$ref": "PlayerError" } } + ] + }, + { + "name": "playersCreated", + "description": "Called whenever a player is created, or when a new agent joins and receives\na list of active players. If an agent is restored, it will receive the full\nlist of player ids and all events again.", + "parameters": [{ "name": "players", "type": "array", "items": { "$ref": "PlayerId" } }] + } + ], + "commands": [ + { "name": "enable", "description": "Enables the Media domain" }, + { "name": "disable", "description": "Disables the Media domain." } + ] + }, + { + "domain": "Overlay", + "description": "This domain provides various functionality related to drawing atop the inspected page.", + "experimental": true, + "dependencies": ["DOM", "Page", "Runtime"], + "types": [ + { + "id": "SourceOrderConfig", + "description": "Configuration data for drawing the source order of an elements children.", + "type": "object", + "properties": [ + { + "name": "parentOutlineColor", + "description": "the color to outline the givent element in.", + "$ref": "DOM.RGBA" + }, + { + "name": "childOutlineColor", + "description": "the color to outline the child elements in.", + "$ref": "DOM.RGBA" + } + ] + }, + { + "id": "GridHighlightConfig", + "description": "Configuration data for the highlighting of Grid elements.", + "type": "object", + "properties": [ + { + "name": "showGridExtensionLines", + "description": "Whether the extension lines from grid cells to the rulers should be shown (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showPositiveLineNumbers", + "description": "Show Positive line number labels (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showNegativeLineNumbers", + "description": "Show Negative line number labels (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showAreaNames", + "description": "Show area name labels (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showLineNames", + "description": "Show line name labels (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showTrackSizes", + "description": "Show track size labels (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "gridBorderColor", + "description": "The grid container border highlight color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "cellBorderColor", + "description": "The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.", + "deprecated": true, + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "rowLineColor", + "description": "The row line color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "columnLineColor", + "description": "The column line color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "gridBorderDash", + "description": "Whether the grid border is dashed (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "cellBorderDash", + "description": "Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.", + "deprecated": true, + "optional": true, + "type": "boolean" + }, + { + "name": "rowLineDash", + "description": "Whether row lines are dashed (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "columnLineDash", + "description": "Whether column lines are dashed (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "rowGapColor", + "description": "The row gap highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "rowHatchColor", + "description": "The row gap hatching fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "columnGapColor", + "description": "The column gap highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "columnHatchColor", + "description": "The column gap hatching fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "areaBorderColor", + "description": "The named grid areas border color (Default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "gridBackgroundColor", + "description": "The grid container background color (Default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "id": "FlexContainerHighlightConfig", + "description": "Configuration data for the highlighting of Flex container elements.", + "type": "object", + "properties": [ + { + "name": "containerBorder", + "description": "The style of the container border", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "lineSeparator", + "description": "The style of the separator between lines", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "itemSeparator", + "description": "The style of the separator between items", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "mainDistributedSpace", + "description": "Style of content-distribution space on the main axis (justify-content).", + "optional": true, + "$ref": "BoxStyle" + }, + { + "name": "crossDistributedSpace", + "description": "Style of content-distribution space on the cross axis (align-content).", + "optional": true, + "$ref": "BoxStyle" + }, + { + "name": "rowGapSpace", + "description": "Style of empty space caused by row gaps (gap/row-gap).", + "optional": true, + "$ref": "BoxStyle" + }, + { + "name": "columnGapSpace", + "description": "Style of empty space caused by columns gaps (gap/column-gap).", + "optional": true, + "$ref": "BoxStyle" + }, + { + "name": "crossAlignment", + "description": "Style of the self-alignment line (align-items).", + "optional": true, + "$ref": "LineStyle" + } + ] + }, + { + "id": "FlexItemHighlightConfig", + "description": "Configuration data for the highlighting of Flex item elements.", + "type": "object", + "properties": [ + { + "name": "baseSizeBox", + "description": "Style of the box representing the item's base size", + "optional": true, + "$ref": "BoxStyle" + }, + { + "name": "baseSizeBorder", + "description": "Style of the border around the box representing the item's base size", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "flexibilityArrow", + "description": "Style of the arrow representing if the item grew or shrank", + "optional": true, + "$ref": "LineStyle" + } + ] + }, + { + "id": "LineStyle", + "description": "Style information for drawing a line.", + "type": "object", + "properties": [ + { + "name": "color", + "description": "The color of the line (default: transparent)", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "pattern", + "description": "The line pattern (default: solid)", + "optional": true, + "type": "string", + "enum": ["dashed", "dotted"] + } + ] + }, + { + "id": "BoxStyle", + "description": "Style information for drawing a box.", + "type": "object", + "properties": [ + { + "name": "fillColor", + "description": "The background color for the box (default: transparent)", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "hatchColor", + "description": "The hatching color for the box (default: transparent)", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { "id": "ContrastAlgorithm", "type": "string", "enum": ["aa", "aaa", "apca"] }, + { + "id": "HighlightConfig", + "description": "Configuration data for the highlighting of page elements.", + "type": "object", + "properties": [ + { + "name": "showInfo", + "description": "Whether the node info tooltip should be shown (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showStyles", + "description": "Whether the node styles in the tooltip (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showRulers", + "description": "Whether the rulers should be shown (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "showAccessibilityInfo", + "description": "Whether the a11y info should be shown (default: true).", + "optional": true, + "type": "boolean" + }, + { + "name": "showExtensionLines", + "description": "Whether the extension lines from node to the rulers should be shown (default: false).", + "optional": true, + "type": "boolean" + }, + { + "name": "contentColor", + "description": "The content box highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "paddingColor", + "description": "The padding highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "borderColor", + "description": "The border highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "marginColor", + "description": "The margin highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "eventTargetColor", + "description": "The event target element highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "shapeColor", + "description": "The shape outside fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "shapeMarginColor", + "description": "The shape margin fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "cssGridColor", + "description": "The grid layout color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "colorFormat", + "description": "The color format used to format color styles (default: hex).", + "optional": true, + "$ref": "ColorFormat" + }, + { + "name": "gridHighlightConfig", + "description": "The grid layout highlight configuration (default: all transparent).", + "optional": true, + "$ref": "GridHighlightConfig" + }, + { + "name": "flexContainerHighlightConfig", + "description": "The flex container highlight configuration (default: all transparent).", + "optional": true, + "$ref": "FlexContainerHighlightConfig" + }, + { + "name": "flexItemHighlightConfig", + "description": "The flex item highlight configuration (default: all transparent).", + "optional": true, + "$ref": "FlexItemHighlightConfig" + }, + { + "name": "contrastAlgorithm", + "description": "The contrast algorithm to use for the contrast ratio (default: aa).", + "optional": true, + "$ref": "ContrastAlgorithm" + }, + { + "name": "containerQueryContainerHighlightConfig", + "description": "The container query container highlight configuration (default: all transparent).", + "optional": true, + "$ref": "ContainerQueryContainerHighlightConfig" + } + ] + }, + { "id": "ColorFormat", "type": "string", "enum": ["rgb", "hsl", "hwb", "hex"] }, + { + "id": "GridNodeHighlightConfig", + "description": "Configurations for Persistent Grid Highlight", + "type": "object", + "properties": [ + { + "name": "gridHighlightConfig", + "description": "A descriptor for the highlight appearance.", + "$ref": "GridHighlightConfig" + }, + { "name": "nodeId", "description": "Identifier of the node to highlight.", "$ref": "DOM.NodeId" } + ] + }, + { + "id": "FlexNodeHighlightConfig", + "type": "object", + "properties": [ + { + "name": "flexContainerHighlightConfig", + "description": "A descriptor for the highlight appearance of flex containers.", + "$ref": "FlexContainerHighlightConfig" + }, + { "name": "nodeId", "description": "Identifier of the node to highlight.", "$ref": "DOM.NodeId" } + ] + }, + { + "id": "ScrollSnapContainerHighlightConfig", + "type": "object", + "properties": [ + { + "name": "snapportBorder", + "description": "The style of the snapport border (default: transparent)", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "snapAreaBorder", + "description": "The style of the snap area border (default: transparent)", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "scrollMarginColor", + "description": "The margin highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "scrollPaddingColor", + "description": "The padding highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "id": "ScrollSnapHighlightConfig", + "type": "object", + "properties": [ + { + "name": "scrollSnapContainerHighlightConfig", + "description": "A descriptor for the highlight appearance of scroll snap containers.", + "$ref": "ScrollSnapContainerHighlightConfig" + }, + { "name": "nodeId", "description": "Identifier of the node to highlight.", "$ref": "DOM.NodeId" } + ] + }, + { + "id": "HingeConfig", + "description": "Configuration for dual screen hinge", + "type": "object", + "properties": [ + { "name": "rect", "description": "A rectangle represent hinge", "$ref": "DOM.Rect" }, + { + "name": "contentColor", + "description": "The content box highlight fill color (default: a dark color).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "outlineColor", + "description": "The content box highlight outline color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "id": "ContainerQueryHighlightConfig", + "type": "object", + "properties": [ + { + "name": "containerQueryContainerHighlightConfig", + "description": "A descriptor for the highlight appearance of container query containers.", + "$ref": "ContainerQueryContainerHighlightConfig" + }, + { "name": "nodeId", "description": "Identifier of the container node to highlight.", "$ref": "DOM.NodeId" } + ] + }, + { + "id": "ContainerQueryContainerHighlightConfig", + "type": "object", + "properties": [ + { + "name": "containerBorder", + "description": "The style of the container border.", + "optional": true, + "$ref": "LineStyle" + }, + { + "name": "descendantBorder", + "description": "The style of the descendants' borders.", + "optional": true, + "$ref": "LineStyle" + } + ] + }, + { + "id": "IsolatedElementHighlightConfig", + "type": "object", + "properties": [ + { + "name": "isolationModeHighlightConfig", + "description": "A descriptor for the highlight appearance of an element in isolation mode.", + "$ref": "IsolationModeHighlightConfig" + }, + { + "name": "nodeId", + "description": "Identifier of the isolated element to highlight.", + "$ref": "DOM.NodeId" + } + ] + }, + { + "id": "IsolationModeHighlightConfig", + "type": "object", + "properties": [ + { + "name": "resizerColor", + "description": "The fill color of the resizers (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "resizerHandleColor", + "description": "The fill color for resizer handles (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "maskColor", + "description": "The fill color for the mask covering non-isolated elements (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "id": "InspectMode", + "type": "string", + "enum": ["searchForNode", "searchForUAShadowDOM", "captureAreaScreenshot", "showDistances", "none"] + } + ], + "commands": [ + { "name": "disable", "description": "Disables domain notifications." }, + { "name": "enable", "description": "Enables domain notifications." }, + { + "name": "getHighlightObjectForTest", + "description": "For testing.", + "parameters": [ + { "name": "nodeId", "description": "Id of the node to get highlight object for.", "$ref": "DOM.NodeId" }, + { + "name": "includeDistance", + "description": "Whether to include distance info.", + "optional": true, + "type": "boolean" + }, + { + "name": "includeStyle", + "description": "Whether to include style info.", + "optional": true, + "type": "boolean" + }, + { + "name": "colorFormat", + "description": "The color format to get config with (default: hex).", + "optional": true, + "$ref": "ColorFormat" + }, + { + "name": "showAccessibilityInfo", + "description": "Whether to show accessibility info (default: true).", + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "highlight", "description": "Highlight data for the node.", "type": "object" }] + }, + { + "name": "getGridHighlightObjectsForTest", + "description": "For Persistent Grid testing.", + "parameters": [ + { + "name": "nodeIds", + "description": "Ids of the node to get highlight object for.", + "type": "array", + "items": { "$ref": "DOM.NodeId" } + } + ], + "returns": [ + { "name": "highlights", "description": "Grid Highlight data for the node ids provided.", "type": "object" } + ] + }, + { + "name": "getSourceOrderHighlightObjectForTest", + "description": "For Source Order Viewer testing.", + "parameters": [{ "name": "nodeId", "description": "Id of the node to highlight.", "$ref": "DOM.NodeId" }], + "returns": [ + { + "name": "highlight", + "description": "Source order highlight data for the node id provided.", + "type": "object" + } + ] + }, + { "name": "hideHighlight", "description": "Hides any highlight." }, + { + "name": "highlightFrame", + "description": "Highlights owner element of the frame with given id.\nDeprecated: Doesn't work reliablity and cannot be fixed due to process\nseparatation (the owner node might be in a different process). Determine\nthe owner node in the client and use highlightNode.", + "deprecated": true, + "parameters": [ + { "name": "frameId", "description": "Identifier of the frame to highlight.", "$ref": "Page.FrameId" }, + { + "name": "contentColor", + "description": "The content box highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "contentOutlineColor", + "description": "The content box highlight outline color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "name": "highlightNode", + "description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or\nobjectId must be specified.", + "parameters": [ + { + "name": "highlightConfig", + "description": "A descriptor for the highlight appearance.", + "$ref": "HighlightConfig" + }, + { + "name": "nodeId", + "description": "Identifier of the node to highlight.", + "optional": true, + "$ref": "DOM.NodeId" + }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node to highlight.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node to be highlighted.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + }, + { + "name": "selector", + "description": "Selectors to highlight relevant nodes.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "highlightQuad", + "description": "Highlights given quad. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "quad", "description": "Quad to highlight", "$ref": "DOM.Quad" }, + { + "name": "color", + "description": "The highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "outlineColor", + "description": "The highlight outline color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "name": "highlightRect", + "description": "Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.", + "parameters": [ + { "name": "x", "description": "X coordinate", "type": "integer" }, + { "name": "y", "description": "Y coordinate", "type": "integer" }, + { "name": "width", "description": "Rectangle width", "type": "integer" }, + { "name": "height", "description": "Rectangle height", "type": "integer" }, + { + "name": "color", + "description": "The highlight fill color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + }, + { + "name": "outlineColor", + "description": "The highlight outline color (default: transparent).", + "optional": true, + "$ref": "DOM.RGBA" + } + ] + }, + { + "name": "highlightSourceOrder", + "description": "Highlights the source order of the children of the DOM node with given id or with the given\nJavaScript object wrapper. Either nodeId or objectId must be specified.", + "parameters": [ + { + "name": "sourceOrderConfig", + "description": "A descriptor for the appearance of the overlay drawing.", + "$ref": "SourceOrderConfig" + }, + { + "name": "nodeId", + "description": "Identifier of the node to highlight.", + "optional": true, + "$ref": "DOM.NodeId" + }, + { + "name": "backendNodeId", + "description": "Identifier of the backend node to highlight.", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { + "name": "objectId", + "description": "JavaScript object id of the node to be highlighted.", + "optional": true, + "$ref": "Runtime.RemoteObjectId" + } + ] + }, + { + "name": "setInspectMode", + "description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.\nBackend then generates 'inspectNodeRequested' event upon element selection.", + "parameters": [ + { "name": "mode", "description": "Set an inspection mode.", "$ref": "InspectMode" }, + { + "name": "highlightConfig", + "description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled\n== false`.", + "optional": true, + "$ref": "HighlightConfig" + } + ] + }, + { + "name": "setShowAdHighlights", + "description": "Highlights owner element of all frames detected to be ads.", + "parameters": [{ "name": "show", "description": "True for showing ad highlights", "type": "boolean" }] + }, + { + "name": "setPausedInDebuggerMessage", + "parameters": [ + { + "name": "message", + "description": "The message to display, also triggers resume and step over controls.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setShowDebugBorders", + "description": "Requests that backend shows debug borders on layers", + "parameters": [{ "name": "show", "description": "True for showing debug borders", "type": "boolean" }] + }, + { + "name": "setShowFPSCounter", + "description": "Requests that backend shows the FPS counter", + "parameters": [{ "name": "show", "description": "True for showing the FPS counter", "type": "boolean" }] + }, + { + "name": "setShowGridOverlays", + "description": "Highlight multiple elements with the CSS Grid overlay.", + "parameters": [ + { + "name": "gridNodeHighlightConfigs", + "description": "An array of node identifiers and descriptors for the highlight appearance.", + "type": "array", + "items": { "$ref": "GridNodeHighlightConfig" } + } + ] + }, + { + "name": "setShowFlexOverlays", + "parameters": [ + { + "name": "flexNodeHighlightConfigs", + "description": "An array of node identifiers and descriptors for the highlight appearance.", + "type": "array", + "items": { "$ref": "FlexNodeHighlightConfig" } + } + ] + }, + { + "name": "setShowScrollSnapOverlays", + "parameters": [ + { + "name": "scrollSnapHighlightConfigs", + "description": "An array of node identifiers and descriptors for the highlight appearance.", + "type": "array", + "items": { "$ref": "ScrollSnapHighlightConfig" } + } + ] + }, + { + "name": "setShowContainerQueryOverlays", + "parameters": [ + { + "name": "containerQueryHighlightConfigs", + "description": "An array of node identifiers and descriptors for the highlight appearance.", + "type": "array", + "items": { "$ref": "ContainerQueryHighlightConfig" } + } + ] + }, + { + "name": "setShowPaintRects", + "description": "Requests that backend shows paint rectangles", + "parameters": [{ "name": "result", "description": "True for showing paint rectangles", "type": "boolean" }] + }, + { + "name": "setShowLayoutShiftRegions", + "description": "Requests that backend shows layout shift regions", + "parameters": [ + { "name": "result", "description": "True for showing layout shift regions", "type": "boolean" } + ] + }, + { + "name": "setShowScrollBottleneckRects", + "description": "Requests that backend shows scroll bottleneck rects", + "parameters": [ + { "name": "show", "description": "True for showing scroll bottleneck rects", "type": "boolean" } + ] + }, + { + "name": "setShowHitTestBorders", + "description": "Deprecated, no longer has any effect.", + "deprecated": true, + "parameters": [{ "name": "show", "description": "True for showing hit-test borders", "type": "boolean" }] + }, + { + "name": "setShowWebVitals", + "description": "Request that backend shows an overlay with web vital metrics.", + "parameters": [{ "name": "show", "type": "boolean" }] + }, + { + "name": "setShowViewportSizeOnResize", + "description": "Paints viewport size upon main frame resize.", + "parameters": [{ "name": "show", "description": "Whether to paint size or not.", "type": "boolean" }] + }, + { + "name": "setShowHinge", + "description": "Add a dual screen device hinge", + "parameters": [ + { + "name": "hingeConfig", + "description": "hinge data, null means hideHinge", + "optional": true, + "$ref": "HingeConfig" + } + ] + }, + { + "name": "setShowIsolatedElements", + "description": "Show elements in isolation mode with overlays.", + "parameters": [ + { + "name": "isolatedElementHighlightConfigs", + "description": "An array of node identifiers and descriptors for the highlight appearance.", + "type": "array", + "items": { "$ref": "IsolatedElementHighlightConfig" } + } + ] + } + ], + "events": [ + { + "name": "inspectNodeRequested", + "description": "Fired when the node should be inspected. This happens after call to `setInspectMode` or when\nuser manually inspects an element.", + "parameters": [ + { "name": "backendNodeId", "description": "Id of the node to inspect.", "$ref": "DOM.BackendNodeId" } + ] + }, + { + "name": "nodeHighlightRequested", + "description": "Fired when the node should be highlighted. This happens after call to `setInspectMode`.", + "parameters": [{ "name": "nodeId", "$ref": "DOM.NodeId" }] + }, + { + "name": "screenshotRequested", + "description": "Fired when user asks to capture screenshot of some area on the page.", + "parameters": [ + { + "name": "viewport", + "description": "Viewport to capture, in device independent pixels (dip).", + "$ref": "Page.Viewport" + } + ] + }, + { "name": "inspectModeCanceled", "description": "Fired when user cancels the inspect mode." } + ] + }, + { + "domain": "Page", + "description": "Actions and events related to the inspected page belong to the page domain.", + "dependencies": ["Debugger", "DOM", "IO", "Network", "Runtime"], + "types": [ + { "id": "FrameId", "description": "Unique frame identifier.", "type": "string" }, + { + "id": "AdFrameType", + "description": "Indicates whether a frame has been identified as an ad.", + "experimental": true, + "type": "string", + "enum": ["none", "child", "root"] + }, + { + "id": "AdFrameExplanation", + "experimental": true, + "type": "string", + "enum": ["ParentIsAd", "CreatedByAdScript", "MatchedBlockingRule"] + }, + { + "id": "AdFrameStatus", + "description": "Indicates whether a frame has been identified as an ad and why.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "adFrameType", "$ref": "AdFrameType" }, + { "name": "explanations", "optional": true, "type": "array", "items": { "$ref": "AdFrameExplanation" } } + ] + }, + { + "id": "AdScriptId", + "description": "Identifies the bottom-most script which caused the frame to be labelled\nas an ad.", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "scriptId", + "description": "Script Id of the bottom-most script which caused the frame to be labelled\nas an ad.", + "$ref": "Runtime.ScriptId" + }, + { "name": "debuggerId", "description": "Id of adScriptId's debugger.", "$ref": "Runtime.UniqueDebuggerId" } + ] + }, + { + "id": "SecureContextType", + "description": "Indicates whether the frame is a secure context and why it is the case.", + "experimental": true, + "type": "string", + "enum": ["Secure", "SecureLocalhost", "InsecureScheme", "InsecureAncestor"] + }, + { + "id": "CrossOriginIsolatedContextType", + "description": "Indicates whether the frame is cross-origin isolated and why it is the case.", + "experimental": true, + "type": "string", + "enum": ["Isolated", "NotIsolated", "NotIsolatedFeatureDisabled"] + }, + { + "id": "GatedAPIFeatures", + "experimental": true, + "type": "string", + "enum": [ + "SharedArrayBuffers", + "SharedArrayBuffersTransferAllowed", + "PerformanceMeasureMemory", + "PerformanceProfile" + ] + }, + { + "id": "PermissionsPolicyFeature", + "description": "All Permissions Policy features. This enum should match the one defined\nin third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5.", + "experimental": true, + "type": "string", + "enum": [ + "accelerometer", + "ambient-light-sensor", + "attribution-reporting", + "autoplay", + "bluetooth", + "browsing-topics", + "camera", + "ch-dpr", + "ch-device-memory", + "ch-downlink", + "ch-ect", + "ch-prefers-color-scheme", + "ch-prefers-reduced-motion", + "ch-rtt", + "ch-save-data", + "ch-ua", + "ch-ua-arch", + "ch-ua-bitness", + "ch-ua-platform", + "ch-ua-model", + "ch-ua-mobile", + "ch-ua-form-factor", + "ch-ua-full-version", + "ch-ua-full-version-list", + "ch-ua-platform-version", + "ch-ua-wow64", + "ch-viewport-height", + "ch-viewport-width", + "ch-width", + "clipboard-read", + "clipboard-write", + "compute-pressure", + "cross-origin-isolated", + "direct-sockets", + "display-capture", + "document-domain", + "encrypted-media", + "execution-while-out-of-viewport", + "execution-while-not-rendered", + "focus-without-user-activation", + "fullscreen", + "frobulate", + "gamepad", + "geolocation", + "gyroscope", + "hid", + "identity-credentials-get", + "idle-detection", + "interest-cohort", + "join-ad-interest-group", + "keyboard-map", + "local-fonts", + "magnetometer", + "microphone", + "midi", + "otp-credentials", + "payment", + "picture-in-picture", + "private-aggregation", + "private-state-token-issuance", + "private-state-token-redemption", + "publickey-credentials-get", + "run-ad-auction", + "screen-wake-lock", + "serial", + "shared-autofill", + "shared-storage", + "shared-storage-select-url", + "smart-card", + "storage-access", + "sync-xhr", + "unload", + "usb", + "vertical-scroll", + "web-share", + "window-management", + "window-placement", + "xr-spatial-tracking" + ] + }, + { + "id": "PermissionsPolicyBlockReason", + "description": "Reason for a permissions policy feature to be disabled.", + "experimental": true, + "type": "string", + "enum": ["Header", "IframeAttribute", "InFencedFrameTree", "InIsolatedApp"] + }, + { + "id": "PermissionsPolicyBlockLocator", + "experimental": true, + "type": "object", + "properties": [ + { "name": "frameId", "$ref": "FrameId" }, + { "name": "blockReason", "$ref": "PermissionsPolicyBlockReason" } + ] + }, + { + "id": "PermissionsPolicyFeatureState", + "experimental": true, + "type": "object", + "properties": [ + { "name": "feature", "$ref": "PermissionsPolicyFeature" }, + { "name": "allowed", "type": "boolean" }, + { "name": "locator", "optional": true, "$ref": "PermissionsPolicyBlockLocator" } + ] + }, + { + "id": "OriginTrialTokenStatus", + "description": "Origin Trial(https://www.chromium.org/blink/origin-trials) support.\nStatus for an Origin Trial token.", + "experimental": true, + "type": "string", + "enum": [ + "Success", + "NotSupported", + "Insecure", + "Expired", + "WrongOrigin", + "InvalidSignature", + "Malformed", + "WrongVersion", + "FeatureDisabled", + "TokenDisabled", + "FeatureDisabledForUser", + "UnknownTrial" + ] + }, + { + "id": "OriginTrialStatus", + "description": "Status for an Origin Trial.", + "experimental": true, + "type": "string", + "enum": ["Enabled", "ValidTokenNotProvided", "OSNotSupported", "TrialNotAllowed"] + }, + { "id": "OriginTrialUsageRestriction", "experimental": true, "type": "string", "enum": ["None", "Subset"] }, + { + "id": "OriginTrialToken", + "experimental": true, + "type": "object", + "properties": [ + { "name": "origin", "type": "string" }, + { "name": "matchSubDomains", "type": "boolean" }, + { "name": "trialName", "type": "string" }, + { "name": "expiryTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "isThirdParty", "type": "boolean" }, + { "name": "usageRestriction", "$ref": "OriginTrialUsageRestriction" } + ] + }, + { + "id": "OriginTrialTokenWithStatus", + "experimental": true, + "type": "object", + "properties": [ + { "name": "rawTokenText", "type": "string" }, + { + "name": "parsedToken", + "description": "`parsedToken` is present only when the token is extractable and\nparsable.", + "optional": true, + "$ref": "OriginTrialToken" + }, + { "name": "status", "$ref": "OriginTrialTokenStatus" } + ] + }, + { + "id": "OriginTrial", + "experimental": true, + "type": "object", + "properties": [ + { "name": "trialName", "type": "string" }, + { "name": "status", "$ref": "OriginTrialStatus" }, + { "name": "tokensWithStatus", "type": "array", "items": { "$ref": "OriginTrialTokenWithStatus" } } + ] + }, + { + "id": "Frame", + "description": "Information about the Frame on the page.", + "type": "object", + "properties": [ + { "name": "id", "description": "Frame unique identifier.", "$ref": "FrameId" }, + { "name": "parentId", "description": "Parent frame identifier.", "optional": true, "$ref": "FrameId" }, + { + "name": "loaderId", + "description": "Identifier of the loader associated with this frame.", + "$ref": "Network.LoaderId" + }, + { + "name": "name", + "description": "Frame's name as specified in the tag.", + "optional": true, + "type": "string" + }, + { "name": "url", "description": "Frame document's URL without fragment.", "type": "string" }, + { + "name": "urlFragment", + "description": "Frame document's URL fragment including the '#'.", + "experimental": true, + "optional": true, + "type": "string" + }, + { + "name": "domainAndRegistry", + "description": "Frame document's registered domain, taking the public suffixes list into account.\nExtracted from the Frame's url.\nExample URLs: http://www.google.com/file.html -> \"google.com\"\n http://a.b.co.uk/file.html -> \"b.co.uk\"", + "experimental": true, + "type": "string" + }, + { "name": "securityOrigin", "description": "Frame document's security origin.", "type": "string" }, + { + "name": "mimeType", + "description": "Frame document's mimeType as determined by the browser.", + "type": "string" + }, + { + "name": "unreachableUrl", + "description": "If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.", + "experimental": true, + "optional": true, + "type": "string" + }, + { + "name": "adFrameStatus", + "description": "Indicates whether this frame was tagged as an ad and why.", + "experimental": true, + "optional": true, + "$ref": "AdFrameStatus" + }, + { + "name": "secureContextType", + "description": "Indicates whether the main document is a secure context and explains why that is the case.", + "experimental": true, + "$ref": "SecureContextType" + }, + { + "name": "crossOriginIsolatedContextType", + "description": "Indicates whether this is a cross origin isolated context.", + "experimental": true, + "$ref": "CrossOriginIsolatedContextType" + }, + { + "name": "gatedAPIFeatures", + "description": "Indicated which gated APIs / features are available.", + "experimental": true, + "type": "array", + "items": { "$ref": "GatedAPIFeatures" } + } + ] + }, + { + "id": "FrameResource", + "description": "Information about the Resource on the page.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "url", "description": "Resource URL.", "type": "string" }, + { "name": "type", "description": "Type of this resource.", "$ref": "Network.ResourceType" }, + { "name": "mimeType", "description": "Resource mimeType as determined by the browser.", "type": "string" }, + { + "name": "lastModified", + "description": "last-modified timestamp as reported by server.", + "optional": true, + "$ref": "Network.TimeSinceEpoch" + }, + { "name": "contentSize", "description": "Resource content size.", "optional": true, "type": "number" }, + { + "name": "failed", + "description": "True if the resource failed to load.", + "optional": true, + "type": "boolean" + }, + { + "name": "canceled", + "description": "True if the resource was canceled during loading.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "FrameResourceTree", + "description": "Information about the Frame hierarchy along with their cached resources.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "frame", "description": "Frame information for this tree item.", "$ref": "Frame" }, + { + "name": "childFrames", + "description": "Child frames.", + "optional": true, + "type": "array", + "items": { "$ref": "FrameResourceTree" } + }, + { + "name": "resources", + "description": "Information about frame resources.", + "type": "array", + "items": { "$ref": "FrameResource" } + } + ] + }, + { + "id": "FrameTree", + "description": "Information about the Frame hierarchy.", + "type": "object", + "properties": [ + { "name": "frame", "description": "Frame information for this tree item.", "$ref": "Frame" }, + { + "name": "childFrames", + "description": "Child frames.", + "optional": true, + "type": "array", + "items": { "$ref": "FrameTree" } + } + ] + }, + { "id": "ScriptIdentifier", "description": "Unique script identifier.", "type": "string" }, + { + "id": "TransitionType", + "description": "Transition type.", + "type": "string", + "enum": [ + "link", + "typed", + "address_bar", + "auto_bookmark", + "auto_subframe", + "manual_subframe", + "generated", + "auto_toplevel", + "form_submit", + "reload", + "keyword", + "keyword_generated", + "other" + ] + }, + { + "id": "NavigationEntry", + "description": "Navigation history entry.", + "type": "object", + "properties": [ + { "name": "id", "description": "Unique id of the navigation history entry.", "type": "integer" }, + { "name": "url", "description": "URL of the navigation history entry.", "type": "string" }, + { "name": "userTypedURL", "description": "URL that the user typed in the url bar.", "type": "string" }, + { "name": "title", "description": "Title of the navigation history entry.", "type": "string" }, + { "name": "transitionType", "description": "Transition type.", "$ref": "TransitionType" } + ] + }, + { + "id": "ScreencastFrameMetadata", + "description": "Screencast frame metadata.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "offsetTop", "description": "Top offset in DIP.", "type": "number" }, + { "name": "pageScaleFactor", "description": "Page scale factor.", "type": "number" }, + { "name": "deviceWidth", "description": "Device screen width in DIP.", "type": "number" }, + { "name": "deviceHeight", "description": "Device screen height in DIP.", "type": "number" }, + { + "name": "scrollOffsetX", + "description": "Position of horizontal scroll in CSS pixels.", + "type": "number" + }, + { "name": "scrollOffsetY", "description": "Position of vertical scroll in CSS pixels.", "type": "number" }, + { + "name": "timestamp", + "description": "Frame swap timestamp.", + "optional": true, + "$ref": "Network.TimeSinceEpoch" + } + ] + }, + { + "id": "DialogType", + "description": "Javascript dialog type.", + "type": "string", + "enum": ["alert", "confirm", "prompt", "beforeunload"] + }, + { + "id": "AppManifestError", + "description": "Error while paring app manifest.", + "type": "object", + "properties": [ + { "name": "message", "description": "Error message.", "type": "string" }, + { + "name": "critical", + "description": "If criticial, this is a non-recoverable parse error.", + "type": "integer" + }, + { "name": "line", "description": "Error line.", "type": "integer" }, + { "name": "column", "description": "Error column.", "type": "integer" } + ] + }, + { + "id": "AppManifestParsedProperties", + "description": "Parsed app manifest properties.", + "experimental": true, + "type": "object", + "properties": [{ "name": "scope", "description": "Computed scope value", "type": "string" }] + }, + { + "id": "LayoutViewport", + "description": "Layout viewport position and dimensions.", + "type": "object", + "properties": [ + { + "name": "pageX", + "description": "Horizontal offset relative to the document (CSS pixels).", + "type": "integer" + }, + { + "name": "pageY", + "description": "Vertical offset relative to the document (CSS pixels).", + "type": "integer" + }, + { + "name": "clientWidth", + "description": "Width (CSS pixels), excludes scrollbar if present.", + "type": "integer" + }, + { + "name": "clientHeight", + "description": "Height (CSS pixels), excludes scrollbar if present.", + "type": "integer" + } + ] + }, + { + "id": "VisualViewport", + "description": "Visual viewport position, dimensions, and scale.", + "type": "object", + "properties": [ + { + "name": "offsetX", + "description": "Horizontal offset relative to the layout viewport (CSS pixels).", + "type": "number" + }, + { + "name": "offsetY", + "description": "Vertical offset relative to the layout viewport (CSS pixels).", + "type": "number" + }, + { + "name": "pageX", + "description": "Horizontal offset relative to the document (CSS pixels).", + "type": "number" + }, + { + "name": "pageY", + "description": "Vertical offset relative to the document (CSS pixels).", + "type": "number" + }, + { + "name": "clientWidth", + "description": "Width (CSS pixels), excludes scrollbar if present.", + "type": "number" + }, + { + "name": "clientHeight", + "description": "Height (CSS pixels), excludes scrollbar if present.", + "type": "number" + }, + { + "name": "scale", + "description": "Scale relative to the ideal viewport (size at width=device-width).", + "type": "number" + }, + { + "name": "zoom", + "description": "Page zoom factor (CSS to device independent pixels ratio).", + "optional": true, + "type": "number" + } + ] + }, + { + "id": "Viewport", + "description": "Viewport for capturing screenshot.", + "type": "object", + "properties": [ + { "name": "x", "description": "X offset in device independent pixels (dip).", "type": "number" }, + { "name": "y", "description": "Y offset in device independent pixels (dip).", "type": "number" }, + { "name": "width", "description": "Rectangle width in device independent pixels (dip).", "type": "number" }, + { + "name": "height", + "description": "Rectangle height in device independent pixels (dip).", + "type": "number" + }, + { "name": "scale", "description": "Page scale factor.", "type": "number" } + ] + }, + { + "id": "FontFamilies", + "description": "Generic font families collection.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "standard", "description": "The standard font-family.", "optional": true, "type": "string" }, + { "name": "fixed", "description": "The fixed font-family.", "optional": true, "type": "string" }, + { "name": "serif", "description": "The serif font-family.", "optional": true, "type": "string" }, + { "name": "sansSerif", "description": "The sansSerif font-family.", "optional": true, "type": "string" }, + { "name": "cursive", "description": "The cursive font-family.", "optional": true, "type": "string" }, + { "name": "fantasy", "description": "The fantasy font-family.", "optional": true, "type": "string" }, + { "name": "math", "description": "The math font-family.", "optional": true, "type": "string" } + ] + }, + { + "id": "ScriptFontFamilies", + "description": "Font families collection for a script.", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "script", + "description": "Name of the script which these font families are defined for.", + "type": "string" + }, + { + "name": "fontFamilies", + "description": "Generic font families collection for the script.", + "$ref": "FontFamilies" + } + ] + }, + { + "id": "FontSizes", + "description": "Default font sizes.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "standard", "description": "Default standard font size.", "optional": true, "type": "integer" }, + { "name": "fixed", "description": "Default fixed font size.", "optional": true, "type": "integer" } + ] + }, + { + "id": "ClientNavigationReason", + "experimental": true, + "type": "string", + "enum": [ + "formSubmissionGet", + "formSubmissionPost", + "httpHeaderRefresh", + "scriptInitiated", + "metaTagRefresh", + "pageBlockInterstitial", + "reload", + "anchorClick" + ] + }, + { + "id": "ClientNavigationDisposition", + "experimental": true, + "type": "string", + "enum": ["currentTab", "newTab", "newWindow", "download"] + }, + { + "id": "InstallabilityErrorArgument", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "name", + "description": "Argument name (e.g. name:'minimum-icon-size-in-pixels').", + "type": "string" + }, + { "name": "value", "description": "Argument value (e.g. value:'64').", "type": "string" } + ] + }, + { + "id": "InstallabilityError", + "description": "The installability error", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "errorId", + "description": "The error id (e.g. 'manifest-missing-suitable-icon').", + "type": "string" + }, + { + "name": "errorArguments", + "description": "The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).", + "type": "array", + "items": { "$ref": "InstallabilityErrorArgument" } + } + ] + }, + { + "id": "ReferrerPolicy", + "description": "The referring-policy used for the navigation.", + "experimental": true, + "type": "string", + "enum": [ + "noReferrer", + "noReferrerWhenDowngrade", + "origin", + "originWhenCrossOrigin", + "sameOrigin", + "strictOrigin", + "strictOriginWhenCrossOrigin", + "unsafeUrl" + ] + }, + { + "id": "CompilationCacheParams", + "description": "Per-script compilation cache parameters for `Page.produceCompilationCache`", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "url", + "description": "The URL of the script to produce a compilation cache entry for.", + "type": "string" + }, + { + "name": "eager", + "description": "A hint to the backend whether eager compilation is recommended.\n(the actual compilation mode used is upon backend discretion).", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "AutoResponseMode", + "description": "Enum of possible auto-reponse for permisison / prompt dialogs.", + "experimental": true, + "type": "string", + "enum": ["none", "autoAccept", "autoReject", "autoOptOut"] + }, + { + "id": "NavigationType", + "description": "The type of a frameNavigated event.", + "experimental": true, + "type": "string", + "enum": ["Navigation", "BackForwardCacheRestore"] + }, + { + "id": "BackForwardCacheNotRestoredReason", + "description": "List of not restored reasons for back-forward cache.", + "experimental": true, + "type": "string", + "enum": [ + "NotPrimaryMainFrame", + "BackForwardCacheDisabled", + "RelatedActiveContentsExist", + "HTTPStatusNotOK", + "SchemeNotHTTPOrHTTPS", + "Loading", + "WasGrantedMediaAccess", + "DisableForRenderFrameHostCalled", + "DomainNotAllowed", + "HTTPMethodNotGET", + "SubframeIsNavigating", + "Timeout", + "CacheLimit", + "JavaScriptExecution", + "RendererProcessKilled", + "RendererProcessCrashed", + "SchedulerTrackedFeatureUsed", + "ConflictingBrowsingInstance", + "CacheFlushed", + "ServiceWorkerVersionActivation", + "SessionRestored", + "ServiceWorkerPostMessage", + "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", + "RenderFrameHostReused_SameSite", + "RenderFrameHostReused_CrossSite", + "ServiceWorkerClaim", + "IgnoreEventAndEvict", + "HaveInnerContents", + "TimeoutPuttingInCache", + "BackForwardCacheDisabledByLowMemory", + "BackForwardCacheDisabledByCommandLine", + "NetworkRequestDatapipeDrainedAsBytesConsumer", + "NetworkRequestRedirected", + "NetworkRequestTimeout", + "NetworkExceedsBufferLimit", + "NavigationCancelledWhileRestoring", + "NotMostRecentNavigationEntry", + "BackForwardCacheDisabledForPrerender", + "UserAgentOverrideDiffers", + "ForegroundCacheLimit", + "BrowsingInstanceNotSwapped", + "BackForwardCacheDisabledForDelegate", + "UnloadHandlerExistsInMainFrame", + "UnloadHandlerExistsInSubFrame", + "ServiceWorkerUnregistration", + "CacheControlNoStore", + "CacheControlNoStoreCookieModified", + "CacheControlNoStoreHTTPOnlyCookieModified", + "NoResponseHead", + "Unknown", + "ActivationNavigationsDisallowedForBug1234857", + "ErrorDocument", + "FencedFramesEmbedder", + "CookieDisabled", + "HTTPAuthRequired", + "CookieFlushed", + "WebSocket", + "WebTransport", + "WebRTC", + "MainResourceHasCacheControlNoStore", + "MainResourceHasCacheControlNoCache", + "SubresourceHasCacheControlNoStore", + "SubresourceHasCacheControlNoCache", + "ContainsPlugins", + "DocumentLoaded", + "DedicatedWorkerOrWorklet", + "OutstandingNetworkRequestOthers", + "RequestedMIDIPermission", + "RequestedAudioCapturePermission", + "RequestedVideoCapturePermission", + "RequestedBackForwardCacheBlockedSensors", + "RequestedBackgroundWorkPermission", + "BroadcastChannel", + "WebXR", + "SharedWorker", + "WebLocks", + "WebHID", + "WebShare", + "RequestedStorageAccessGrant", + "WebNfc", + "OutstandingNetworkRequestFetch", + "OutstandingNetworkRequestXHR", + "AppBanner", + "Printing", + "WebDatabase", + "PictureInPicture", + "Portal", + "SpeechRecognizer", + "IdleManager", + "PaymentManager", + "SpeechSynthesis", + "KeyboardLock", + "WebOTPService", + "OutstandingNetworkRequestDirectSocket", + "InjectedJavascript", + "InjectedStyleSheet", + "KeepaliveRequest", + "IndexedDBEvent", + "Dummy", + "JsNetworkRequestReceivedCacheControlNoStoreResource", + "WebRTCSticky", + "WebTransportSticky", + "WebSocketSticky", + "ContentSecurityHandler", + "ContentWebAuthenticationAPI", + "ContentFileChooser", + "ContentSerial", + "ContentFileSystemAccess", + "ContentMediaDevicesDispatcherHost", + "ContentWebBluetooth", + "ContentWebUSB", + "ContentMediaSessionService", + "ContentScreenReader", + "EmbedderPopupBlockerTabHelper", + "EmbedderSafeBrowsingTriggeredPopupBlocker", + "EmbedderSafeBrowsingThreatDetails", + "EmbedderAppBannerManager", + "EmbedderDomDistillerViewerSource", + "EmbedderDomDistillerSelfDeletingRequestDelegate", + "EmbedderOomInterventionTabHelper", + "EmbedderOfflinePage", + "EmbedderChromePasswordManagerClientBindCredentialManager", + "EmbedderPermissionRequestManager", + "EmbedderModalDialog", + "EmbedderExtensions", + "EmbedderExtensionMessaging", + "EmbedderExtensionMessagingForOpenPort", + "EmbedderExtensionSentMessageToCachedFrame" + ] + }, + { + "id": "BackForwardCacheNotRestoredReasonType", + "description": "Types of not restored reasons for back-forward cache.", + "experimental": true, + "type": "string", + "enum": ["SupportPending", "PageSupportNeeded", "Circumstantial"] + }, + { + "id": "BackForwardCacheNotRestoredExplanation", + "experimental": true, + "type": "object", + "properties": [ + { "name": "type", "description": "Type of the reason", "$ref": "BackForwardCacheNotRestoredReasonType" }, + { "name": "reason", "description": "Not restored reason", "$ref": "BackForwardCacheNotRestoredReason" }, + { + "name": "context", + "description": "Context associated with the reason. The meaning of this context is\ndependent on the reason:\n- EmbedderExtensionSentMessageToCachedFrame: the extension ID.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "BackForwardCacheNotRestoredExplanationTree", + "experimental": true, + "type": "object", + "properties": [ + { "name": "url", "description": "URL of each frame", "type": "string" }, + { + "name": "explanations", + "description": "Not restored reasons of each frame", + "type": "array", + "items": { "$ref": "BackForwardCacheNotRestoredExplanation" } + }, + { + "name": "children", + "description": "Array of children frame", + "type": "array", + "items": { "$ref": "BackForwardCacheNotRestoredExplanationTree" } + } + ] + } + ], + "commands": [ + { + "name": "addScriptToEvaluateOnLoad", + "description": "Deprecated, please use addScriptToEvaluateOnNewDocument instead.", + "experimental": true, + "deprecated": true, + "parameters": [{ "name": "scriptSource", "type": "string" }], + "returns": [ + { "name": "identifier", "description": "Identifier of the added script.", "$ref": "ScriptIdentifier" } + ] + }, + { + "name": "addScriptToEvaluateOnNewDocument", + "description": "Evaluates given script in every frame upon creation (before loading frame's scripts).", + "parameters": [ + { "name": "source", "type": "string" }, + { + "name": "worldName", + "description": "If specified, creates an isolated world with the given name and evaluates given script in it.\nThis world name will be used as the ExecutionContextDescription::name when the corresponding\nevent is emitted.", + "experimental": true, + "optional": true, + "type": "string" + }, + { + "name": "includeCommandLineAPI", + "description": "Specifies whether command line API should be available to the script, defaults\nto false.", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "runImmediately", + "description": "If true, runs the script immediately on existing execution contexts or worlds.\nDefault: false.", + "experimental": true, + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { "name": "identifier", "description": "Identifier of the added script.", "$ref": "ScriptIdentifier" } + ] + }, + { "name": "bringToFront", "description": "Brings page to front (activates tab)." }, + { + "name": "captureScreenshot", + "description": "Capture page screenshot.", + "parameters": [ + { + "name": "format", + "description": "Image compression format (defaults to png).", + "optional": true, + "type": "string", + "enum": ["jpeg", "png", "webp"] + }, + { + "name": "quality", + "description": "Compression quality from range [0..100] (jpeg only).", + "optional": true, + "type": "integer" + }, + { + "name": "clip", + "description": "Capture the screenshot of a given region only.", + "optional": true, + "$ref": "Viewport" + }, + { + "name": "fromSurface", + "description": "Capture the screenshot from the surface, rather than the view. Defaults to true.", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "captureBeyondViewport", + "description": "Capture the screenshot beyond the viewport. Defaults to false.", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "optimizeForSpeed", + "description": "Optimize image encoding for speed, not for resulting size (defaults to false)", + "experimental": true, + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "data", + "description": "Base64-encoded image data. (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] + }, + { + "name": "captureSnapshot", + "description": "Returns a snapshot of the page as a string. For MHTML format, the serialization includes\niframes, shadow DOM, external resources, and element-inline styles.", + "experimental": true, + "parameters": [ + { + "name": "format", + "description": "Format (defaults to mhtml).", + "optional": true, + "type": "string", + "enum": ["mhtml"] + } + ], + "returns": [{ "name": "data", "description": "Serialized page data.", "type": "string" }] + }, + { + "name": "clearDeviceMetricsOverride", + "description": "Clears the overridden device metrics.", + "experimental": true, + "deprecated": true, + "redirect": "Emulation" + }, + { + "name": "clearDeviceOrientationOverride", + "description": "Clears the overridden Device Orientation.", + "experimental": true, + "deprecated": true, + "redirect": "DeviceOrientation" + }, + { + "name": "clearGeolocationOverride", + "description": "Clears the overridden Geolocation Position and Error.", + "deprecated": true, + "redirect": "Emulation" + }, + { + "name": "createIsolatedWorld", + "description": "Creates an isolated world for the given frame.", + "parameters": [ + { + "name": "frameId", + "description": "Id of the frame in which the isolated world should be created.", + "$ref": "FrameId" + }, + { + "name": "worldName", + "description": "An optional name which is reported in the Execution Context.", + "optional": true, + "type": "string" + }, + { + "name": "grantUniveralAccess", + "description": "Whether or not universal access should be granted to the isolated world. This is a powerful\noption, use with caution.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "executionContextId", + "description": "Execution context of the isolated world.", + "$ref": "Runtime.ExecutionContextId" + } + ] + }, + { + "name": "deleteCookie", + "description": "Deletes browser cookie with given name, domain and path.", + "experimental": true, + "deprecated": true, + "redirect": "Network", + "parameters": [ + { "name": "cookieName", "description": "Name of the cookie to remove.", "type": "string" }, + { "name": "url", "description": "URL to match cooke domain and path.", "type": "string" } + ] + }, + { "name": "disable", "description": "Disables page domain notifications." }, + { "name": "enable", "description": "Enables page domain notifications." }, + { + "name": "getAppManifest", + "returns": [ + { "name": "url", "description": "Manifest location.", "type": "string" }, + { "name": "errors", "type": "array", "items": { "$ref": "AppManifestError" } }, + { "name": "data", "description": "Manifest content.", "optional": true, "type": "string" }, + { + "name": "parsed", + "description": "Parsed manifest properties", + "experimental": true, + "optional": true, + "$ref": "AppManifestParsedProperties" + } + ] + }, + { + "name": "getInstallabilityErrors", + "experimental": true, + "returns": [{ "name": "installabilityErrors", "type": "array", "items": { "$ref": "InstallabilityError" } }] + }, + { + "name": "getManifestIcons", + "description": "Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation.", + "experimental": true, + "deprecated": true, + "returns": [{ "name": "primaryIcon", "optional": true, "type": "string" }] + }, + { + "name": "getAppId", + "description": "Returns the unique (PWA) app id.\nOnly returns values if the feature flag 'WebAppEnableManifestId' is enabled", + "experimental": true, + "returns": [ + { + "name": "appId", + "description": "App id, either from manifest's id attribute or computed from start_url", + "optional": true, + "type": "string" + }, + { + "name": "recommendedId", + "description": "Recommendation for manifest's id attribute to match current id computed from start_url", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "getAdScriptId", + "experimental": true, + "parameters": [{ "name": "frameId", "$ref": "FrameId" }], + "returns": [ + { + "name": "adScriptId", + "description": "Identifies the bottom-most script which caused the frame to be labelled\nas an ad. Only sent if frame is labelled as an ad and id is available.", + "optional": true, + "$ref": "AdScriptId" + } + ] + }, + { + "name": "getCookies", + "description": "Returns all browser cookies for the page and all of its subframes. Depending\non the backend support, will return detailed cookie information in the\n`cookies` field.", + "experimental": true, + "deprecated": true, + "redirect": "Network", + "returns": [ + { + "name": "cookies", + "description": "Array of cookie objects.", + "type": "array", + "items": { "$ref": "Network.Cookie" } + } + ] + }, + { + "name": "getFrameTree", + "description": "Returns present frame tree structure.", + "returns": [{ "name": "frameTree", "description": "Present frame tree structure.", "$ref": "FrameTree" }] + }, + { + "name": "getLayoutMetrics", + "description": "Returns metrics relating to the layouting of the page, such as viewport bounds/scale.", + "returns": [ + { + "name": "layoutViewport", + "description": "Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead.", + "deprecated": true, + "$ref": "LayoutViewport" + }, + { + "name": "visualViewport", + "description": "Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead.", + "deprecated": true, + "$ref": "VisualViewport" + }, + { + "name": "contentSize", + "description": "Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead.", + "deprecated": true, + "$ref": "DOM.Rect" + }, + { + "name": "cssLayoutViewport", + "description": "Metrics relating to the layout viewport in CSS pixels.", + "$ref": "LayoutViewport" + }, + { + "name": "cssVisualViewport", + "description": "Metrics relating to the visual viewport in CSS pixels.", + "$ref": "VisualViewport" + }, + { "name": "cssContentSize", "description": "Size of scrollable area in CSS pixels.", "$ref": "DOM.Rect" } + ] + }, + { + "name": "getNavigationHistory", + "description": "Returns navigation history for the current page.", + "returns": [ + { + "name": "currentIndex", + "description": "Index of the current navigation history entry.", + "type": "integer" + }, + { + "name": "entries", + "description": "Array of navigation history entries.", + "type": "array", + "items": { "$ref": "NavigationEntry" } + } + ] + }, + { "name": "resetNavigationHistory", "description": "Resets navigation history for the current page." }, + { + "name": "getResourceContent", + "description": "Returns content of the given resource.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Frame id to get resource for.", "$ref": "FrameId" }, + { "name": "url", "description": "URL of the resource to get content for.", "type": "string" } + ], + "returns": [ + { "name": "content", "description": "Resource content.", "type": "string" }, + { "name": "base64Encoded", "description": "True, if content was served as base64.", "type": "boolean" } + ] + }, + { + "name": "getResourceTree", + "description": "Returns present frame / resource tree structure.", + "experimental": true, + "returns": [ + { + "name": "frameTree", + "description": "Present frame / resource tree structure.", + "$ref": "FrameResourceTree" + } + ] + }, + { + "name": "handleJavaScriptDialog", + "description": "Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).", + "parameters": [ + { "name": "accept", "description": "Whether to accept or dismiss the dialog.", "type": "boolean" }, + { + "name": "promptText", + "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt\ndialog.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "navigate", + "description": "Navigates current page to the given URL.", + "parameters": [ + { "name": "url", "description": "URL to navigate the page to.", "type": "string" }, + { "name": "referrer", "description": "Referrer URL.", "optional": true, "type": "string" }, + { + "name": "transitionType", + "description": "Intended transition type.", + "optional": true, + "$ref": "TransitionType" + }, + { + "name": "frameId", + "description": "Frame id to navigate, if not specified navigates the top frame.", + "optional": true, + "$ref": "FrameId" + }, + { + "name": "referrerPolicy", + "description": "Referrer-policy used for the navigation.", + "experimental": true, + "optional": true, + "$ref": "ReferrerPolicy" + } + ], + "returns": [ + { + "name": "frameId", + "description": "Frame id that has navigated (or failed to navigate)", + "$ref": "FrameId" + }, + { + "name": "loaderId", + "description": "Loader identifier. This is omitted in case of same-document navigation,\nas the previously committed loaderId would not change.", + "optional": true, + "$ref": "Network.LoaderId" + }, + { + "name": "errorText", + "description": "User friendly error message, present if and only if navigation has failed.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "navigateToHistoryEntry", + "description": "Navigates current page to the given history entry.", + "parameters": [ + { "name": "entryId", "description": "Unique id of the entry to navigate to.", "type": "integer" } + ] + }, + { + "name": "printToPDF", + "description": "Print page as PDF.", + "parameters": [ + { + "name": "landscape", + "description": "Paper orientation. Defaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "displayHeaderFooter", + "description": "Display header and footer. Defaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "printBackground", + "description": "Print background graphics. Defaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "scale", + "description": "Scale of the webpage rendering. Defaults to 1.", + "optional": true, + "type": "number" + }, + { + "name": "paperWidth", + "description": "Paper width in inches. Defaults to 8.5 inches.", + "optional": true, + "type": "number" + }, + { + "name": "paperHeight", + "description": "Paper height in inches. Defaults to 11 inches.", + "optional": true, + "type": "number" + }, + { + "name": "marginTop", + "description": "Top margin in inches. Defaults to 1cm (~0.4 inches).", + "optional": true, + "type": "number" + }, + { + "name": "marginBottom", + "description": "Bottom margin in inches. Defaults to 1cm (~0.4 inches).", + "optional": true, + "type": "number" + }, + { + "name": "marginLeft", + "description": "Left margin in inches. Defaults to 1cm (~0.4 inches).", + "optional": true, + "type": "number" + }, + { + "name": "marginRight", + "description": "Right margin in inches. Defaults to 1cm (~0.4 inches).", + "optional": true, + "type": "number" + }, + { + "name": "pageRanges", + "description": "Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are\nprinted in the document order, not in the order specified, and no\nmore than once.\nDefaults to empty string, which implies the entire document is printed.\nThe page numbers are quietly capped to actual page count of the\ndocument, and ranges beyond the end of the document are ignored.\nIf this results in no pages to print, an error is reported.\nIt is an error to specify a range with start greater than end.", + "optional": true, + "type": "string" + }, + { + "name": "headerTemplate", + "description": "HTML template for the print header. Should be valid HTML markup with following\nclasses used to inject printing values into them:\n- `date`: formatted print date\n- `title`: document title\n- `url`: document location\n- `pageNumber`: current page number\n- `totalPages`: total pages in the document\n\nFor example, `<span class=title></span>` would generate span containing the title.", + "optional": true, + "type": "string" + }, + { + "name": "footerTemplate", + "description": "HTML template for the print footer. Should use the same format as the `headerTemplate`.", + "optional": true, + "type": "string" + }, + { + "name": "preferCSSPageSize", + "description": "Whether or not to prefer page size as defined by css. Defaults to false,\nin which case the content will be scaled to fit the paper size.", + "optional": true, + "type": "boolean" + }, + { + "name": "transferMode", + "description": "return as stream", + "experimental": true, + "optional": true, + "type": "string", + "enum": ["ReturnAsBase64", "ReturnAsStream"] + }, + { + "name": "generateTaggedPDF", + "description": "Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.", + "experimental": true, + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "data", + "description": "Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON)", + "type": "string" + }, + { + "name": "stream", + "description": "A handle of the stream that holds resulting PDF data.", + "experimental": true, + "optional": true, + "$ref": "IO.StreamHandle" + } + ] + }, + { + "name": "reload", + "description": "Reloads given page optionally ignoring the cache.", + "parameters": [ + { + "name": "ignoreCache", + "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh).", + "optional": true, + "type": "boolean" + }, + { + "name": "scriptToEvaluateOnLoad", + "description": "If set, the script will be injected into all frames of the inspected page after reload.\nArgument will be ignored if reloading dataURL origin.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "removeScriptToEvaluateOnLoad", + "description": "Deprecated, please use removeScriptToEvaluateOnNewDocument instead.", + "experimental": true, + "deprecated": true, + "parameters": [{ "name": "identifier", "$ref": "ScriptIdentifier" }] + }, + { + "name": "removeScriptToEvaluateOnNewDocument", + "description": "Removes given script from the list.", + "parameters": [{ "name": "identifier", "$ref": "ScriptIdentifier" }] + }, + { + "name": "screencastFrameAck", + "description": "Acknowledges that a screencast frame has been received by the frontend.", + "experimental": true, + "parameters": [{ "name": "sessionId", "description": "Frame number.", "type": "integer" }] + }, + { + "name": "searchInResource", + "description": "Searches for given string in resource content.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Frame id for resource to search in.", "$ref": "FrameId" }, + { "name": "url", "description": "URL of the resource to search in.", "type": "string" }, + { "name": "query", "description": "String to search for.", "type": "string" }, + { + "name": "caseSensitive", + "description": "If true, search is case sensitive.", + "optional": true, + "type": "boolean" + }, + { + "name": "isRegex", + "description": "If true, treats string parameter as regex.", + "optional": true, + "type": "boolean" + } + ], + "returns": [ + { + "name": "result", + "description": "List of search matches.", + "type": "array", + "items": { "$ref": "Debugger.SearchMatch" } + } + ] + }, + { + "name": "setAdBlockingEnabled", + "description": "Enable Chrome's experimental ad filter on all sites.", + "experimental": true, + "parameters": [{ "name": "enabled", "description": "Whether to block ads.", "type": "boolean" }] + }, + { + "name": "setBypassCSP", + "description": "Enable page Content Security Policy by-passing.", + "experimental": true, + "parameters": [{ "name": "enabled", "description": "Whether to bypass page CSP.", "type": "boolean" }] + }, + { + "name": "getPermissionsPolicyState", + "description": "Get Permissions Policy state on given frame.", + "experimental": true, + "parameters": [{ "name": "frameId", "$ref": "FrameId" }], + "returns": [{ "name": "states", "type": "array", "items": { "$ref": "PermissionsPolicyFeatureState" } }] + }, + { + "name": "getOriginTrials", + "description": "Get Origin Trials on given frame.", + "experimental": true, + "parameters": [{ "name": "frameId", "$ref": "FrameId" }], + "returns": [{ "name": "originTrials", "type": "array", "items": { "$ref": "OriginTrial" } }] + }, + { + "name": "setDeviceMetricsOverride", + "description": "Overrides the values of device screen dimensions (window.screen.width, window.screen.height,\nwindow.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media\nquery results).", + "experimental": true, + "deprecated": true, + "redirect": "Emulation", + "parameters": [ + { + "name": "width", + "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", + "type": "integer" + }, + { + "name": "height", + "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", + "type": "integer" + }, + { + "name": "deviceScaleFactor", + "description": "Overriding device scale factor value. 0 disables the override.", + "type": "number" + }, + { + "name": "mobile", + "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text\nautosizing and more.", + "type": "boolean" + }, + { + "name": "scale", + "description": "Scale to apply to resulting view image.", + "optional": true, + "type": "number" + }, + { + "name": "screenWidth", + "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", + "optional": true, + "type": "integer" + }, + { + "name": "screenHeight", + "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", + "optional": true, + "type": "integer" + }, + { + "name": "positionX", + "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", + "optional": true, + "type": "integer" + }, + { + "name": "positionY", + "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", + "optional": true, + "type": "integer" + }, + { + "name": "dontSetVisibleSize", + "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", + "optional": true, + "type": "boolean" + }, + { + "name": "screenOrientation", + "description": "Screen orientation override.", + "optional": true, + "$ref": "Emulation.ScreenOrientation" + }, + { + "name": "viewport", + "description": "The viewport dimensions and scale. If not set, the override is cleared.", + "optional": true, + "$ref": "Viewport" + } + ] + }, + { + "name": "setDeviceOrientationOverride", + "description": "Overrides the Device Orientation.", + "experimental": true, + "deprecated": true, + "redirect": "DeviceOrientation", + "parameters": [ + { "name": "alpha", "description": "Mock alpha", "type": "number" }, + { "name": "beta", "description": "Mock beta", "type": "number" }, + { "name": "gamma", "description": "Mock gamma", "type": "number" } + ] + }, + { + "name": "setFontFamilies", + "description": "Set generic font families.", + "experimental": true, + "parameters": [ + { + "name": "fontFamilies", + "description": "Specifies font families to set. If a font family is not specified, it won't be changed.", + "$ref": "FontFamilies" + }, + { + "name": "forScripts", + "description": "Specifies font families to set for individual scripts.", + "optional": true, + "type": "array", + "items": { "$ref": "ScriptFontFamilies" } + } + ] + }, + { + "name": "setFontSizes", + "description": "Set default font sizes.", + "experimental": true, + "parameters": [ + { + "name": "fontSizes", + "description": "Specifies font sizes to set. If a font size is not specified, it won't be changed.", + "$ref": "FontSizes" + } + ] + }, + { + "name": "setDocumentContent", + "description": "Sets given markup as the document's HTML.", + "parameters": [ + { "name": "frameId", "description": "Frame id to set HTML for.", "$ref": "FrameId" }, + { "name": "html", "description": "HTML content to set.", "type": "string" } + ] + }, + { + "name": "setDownloadBehavior", + "description": "Set the behavior when downloading a file.", + "experimental": true, + "deprecated": true, + "parameters": [ + { + "name": "behavior", + "description": "Whether to allow all or deny all download requests, or use default Chrome behavior if\navailable (otherwise deny).", + "type": "string", + "enum": ["deny", "allow", "default"] + }, + { + "name": "downloadPath", + "description": "The default path to save downloaded files to. This is required if behavior is set to 'allow'", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "setGeolocationOverride", + "description": "Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position\nunavailable.", + "deprecated": true, + "redirect": "Emulation", + "parameters": [ + { "name": "latitude", "description": "Mock latitude", "optional": true, "type": "number" }, + { "name": "longitude", "description": "Mock longitude", "optional": true, "type": "number" }, + { "name": "accuracy", "description": "Mock accuracy", "optional": true, "type": "number" } + ] + }, + { + "name": "setLifecycleEventsEnabled", + "description": "Controls whether page will emit lifecycle events.", + "experimental": true, + "parameters": [ + { "name": "enabled", "description": "If true, starts emitting lifecycle events.", "type": "boolean" } + ] + }, + { + "name": "setTouchEmulationEnabled", + "description": "Toggles mouse event-based touch event emulation.", + "experimental": true, + "deprecated": true, + "redirect": "Emulation", + "parameters": [ + { + "name": "enabled", + "description": "Whether the touch event emulation should be enabled.", + "type": "boolean" + }, + { + "name": "configuration", + "description": "Touch/gesture events configuration. Default: current platform.", + "optional": true, + "type": "string", + "enum": ["mobile", "desktop"] + } + ] + }, + { + "name": "startScreencast", + "description": "Starts sending each frame using the `screencastFrame` event.", + "experimental": true, + "parameters": [ + { + "name": "format", + "description": "Image compression format.", + "optional": true, + "type": "string", + "enum": ["jpeg", "png"] + }, + { + "name": "quality", + "description": "Compression quality from range [0..100].", + "optional": true, + "type": "integer" + }, + { "name": "maxWidth", "description": "Maximum screenshot width.", "optional": true, "type": "integer" }, + { "name": "maxHeight", "description": "Maximum screenshot height.", "optional": true, "type": "integer" }, + { "name": "everyNthFrame", "description": "Send every n-th frame.", "optional": true, "type": "integer" } + ] + }, + { "name": "stopLoading", "description": "Force the page stop all navigations and pending resource fetches." }, + { + "name": "crash", + "description": "Crashes renderer on the IO thread, generates minidumps.", + "experimental": true + }, + { + "name": "close", + "description": "Tries to close page, running its beforeunload hooks, if any.", + "experimental": true + }, + { + "name": "setWebLifecycleState", + "description": "Tries to update the web lifecycle state of the page.\nIt will transition the page to the given state according to:\nhttps://github.com/WICG/web-lifecycle/", + "experimental": true, + "parameters": [ + { "name": "state", "description": "Target lifecycle state", "type": "string", "enum": ["frozen", "active"] } + ] + }, + { + "name": "stopScreencast", + "description": "Stops sending each frame in the `screencastFrame`.", + "experimental": true + }, + { + "name": "produceCompilationCache", + "description": "Requests backend to produce compilation cache for the specified scripts.\n`scripts` are appeneded to the list of scripts for which the cache\nwould be produced. The list may be reset during page navigation.\nWhen script with a matching URL is encountered, the cache is optionally\nproduced upon backend discretion, based on internal heuristics.\nSee also: `Page.compilationCacheProduced`.", + "experimental": true, + "parameters": [{ "name": "scripts", "type": "array", "items": { "$ref": "CompilationCacheParams" } }] + }, + { + "name": "addCompilationCache", + "description": "Seeds compilation cache for given url. Compilation cache does not survive\ncross-process navigation.", + "experimental": true, + "parameters": [ + { "name": "url", "type": "string" }, + { + "name": "data", + "description": "Base64-encoded data (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] + }, + { "name": "clearCompilationCache", "description": "Clears seeded compilation cache.", "experimental": true }, + { + "name": "setSPCTransactionMode", + "description": "Sets the Secure Payment Confirmation transaction mode.\nhttps://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode", + "experimental": true, + "parameters": [{ "name": "mode", "$ref": "AutoResponseMode" }] + }, + { + "name": "setRPHRegistrationMode", + "description": "Extensions for Custom Handlers API:\nhttps://html.spec.whatwg.org/multipage/system-state.html#rph-automation", + "experimental": true, + "parameters": [{ "name": "mode", "$ref": "AutoResponseMode" }] + }, + { + "name": "generateTestReport", + "description": "Generates a report for testing.", + "experimental": true, + "parameters": [ + { "name": "message", "description": "Message to be displayed in the report.", "type": "string" }, + { + "name": "group", + "description": "Specifies the endpoint group to deliver the report to.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "waitForDebugger", + "description": "Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.", + "experimental": true + }, + { + "name": "setInterceptFileChooserDialog", + "description": "Intercept file chooser requests and transfer control to protocol clients.\nWhen file chooser interception is enabled, native file chooser dialog is not shown.\nInstead, a protocol event `Page.fileChooserOpened` is emitted.", + "experimental": true, + "parameters": [{ "name": "enabled", "type": "boolean" }] + }, + { + "name": "setPrerenderingAllowed", + "description": "Enable/disable prerendering manually.\n\nThis command is a short-term solution for https://crbug.com/1440085.\nSee https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA\nfor more details.\n\nTODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.", + "experimental": true, + "parameters": [{ "name": "isAllowed", "type": "boolean" }] + } + ], + "events": [ + { "name": "domContentEventFired", "parameters": [{ "name": "timestamp", "$ref": "Network.MonotonicTime" }] }, + { + "name": "fileChooserOpened", + "description": "Emitted only when `page.interceptFileChooser` is enabled.", + "parameters": [ + { + "name": "frameId", + "description": "Id of the frame containing input node.", + "experimental": true, + "$ref": "FrameId" + }, + { + "name": "mode", + "description": "Input mode.", + "type": "string", + "enum": ["selectSingle", "selectMultiple"] + }, + { + "name": "backendNodeId", + "description": "Input node id. Only present for file choosers opened via an `<input type=\"file\">` element.", + "experimental": true, + "optional": true, + "$ref": "DOM.BackendNodeId" + } + ] + }, + { + "name": "frameAttached", + "description": "Fired when frame has been attached to its parent.", + "parameters": [ + { "name": "frameId", "description": "Id of the frame that has been attached.", "$ref": "FrameId" }, + { "name": "parentFrameId", "description": "Parent frame identifier.", "$ref": "FrameId" }, + { + "name": "stack", + "description": "JavaScript stack trace of when frame was attached, only set if frame initiated from script.", + "optional": true, + "$ref": "Runtime.StackTrace" + } + ] + }, + { + "name": "frameClearedScheduledNavigation", + "description": "Fired when frame no longer has a scheduled navigation.", + "deprecated": true, + "parameters": [ + { + "name": "frameId", + "description": "Id of the frame that has cleared its scheduled navigation.", + "$ref": "FrameId" + } + ] + }, + { + "name": "frameDetached", + "description": "Fired when frame has been detached from its parent.", + "parameters": [ + { "name": "frameId", "description": "Id of the frame that has been detached.", "$ref": "FrameId" }, + { "name": "reason", "experimental": true, "type": "string", "enum": ["remove", "swap"] } + ] + }, + { + "name": "frameNavigated", + "description": "Fired once navigation of the frame has completed. Frame is now associated with the new loader.", + "parameters": [ + { "name": "frame", "description": "Frame object.", "$ref": "Frame" }, + { "name": "type", "experimental": true, "$ref": "NavigationType" } + ] + }, + { + "name": "documentOpened", + "description": "Fired when opening document to write to.", + "experimental": true, + "parameters": [{ "name": "frame", "description": "Frame object.", "$ref": "Frame" }] + }, + { "name": "frameResized", "experimental": true }, + { + "name": "frameRequestedNavigation", + "description": "Fired when a renderer-initiated navigation is requested.\nNavigation may still be cancelled after the event is issued.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame that is being navigated.", "$ref": "FrameId" }, + { "name": "reason", "description": "The reason for the navigation.", "$ref": "ClientNavigationReason" }, + { "name": "url", "description": "The destination URL for the requested navigation.", "type": "string" }, + { + "name": "disposition", + "description": "The disposition for the navigation.", + "$ref": "ClientNavigationDisposition" + } + ] + }, + { + "name": "frameScheduledNavigation", + "description": "Fired when frame schedules a potential navigation.", + "deprecated": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame that has scheduled a navigation.", "$ref": "FrameId" }, + { + "name": "delay", + "description": "Delay (in seconds) until the navigation is scheduled to begin. The navigation is not\nguaranteed to start.", + "type": "number" + }, + { "name": "reason", "description": "The reason for the navigation.", "$ref": "ClientNavigationReason" }, + { "name": "url", "description": "The destination URL for the scheduled navigation.", "type": "string" } + ] + }, + { + "name": "frameStartedLoading", + "description": "Fired when frame has started loading.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame that has started loading.", "$ref": "FrameId" } + ] + }, + { + "name": "frameStoppedLoading", + "description": "Fired when frame has stopped loading.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame that has stopped loading.", "$ref": "FrameId" } + ] + }, + { + "name": "downloadWillBegin", + "description": "Fired when page is about to start a download.\nDeprecated. Use Browser.downloadWillBegin instead.", + "experimental": true, + "deprecated": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame that caused download to begin.", "$ref": "FrameId" }, + { "name": "guid", "description": "Global unique identifier of the download.", "type": "string" }, + { "name": "url", "description": "URL of the resource being downloaded.", "type": "string" }, + { + "name": "suggestedFilename", + "description": "Suggested file name of the resource (the actual name of the file saved on disk may differ).", + "type": "string" + } + ] + }, + { + "name": "downloadProgress", + "description": "Fired when download makes progress. Last call has |done| == true.\nDeprecated. Use Browser.downloadProgress instead.", + "experimental": true, + "deprecated": true, + "parameters": [ + { "name": "guid", "description": "Global unique identifier of the download.", "type": "string" }, + { "name": "totalBytes", "description": "Total expected bytes to download.", "type": "number" }, + { "name": "receivedBytes", "description": "Total bytes received.", "type": "number" }, + { + "name": "state", + "description": "Download status.", + "type": "string", + "enum": ["inProgress", "completed", "canceled"] + } + ] + }, + { "name": "interstitialHidden", "description": "Fired when interstitial page was hidden" }, + { "name": "interstitialShown", "description": "Fired when interstitial page was shown" }, + { + "name": "javascriptDialogClosed", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been\nclosed.", + "parameters": [ + { "name": "result", "description": "Whether dialog was confirmed.", "type": "boolean" }, + { "name": "userInput", "description": "User input in case of prompt.", "type": "string" } + ] + }, + { + "name": "javascriptDialogOpening", + "description": "Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to\nopen.", + "parameters": [ + { "name": "url", "description": "Frame url.", "type": "string" }, + { "name": "message", "description": "Message that will be displayed by the dialog.", "type": "string" }, + { "name": "type", "description": "Dialog type.", "$ref": "DialogType" }, + { + "name": "hasBrowserHandler", + "description": "True iff browser is capable showing or acting on the given dialog. When browser has no\ndialog handler for given target, calling alert while Page domain is engaged will stall\nthe page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.", + "type": "boolean" + }, + { "name": "defaultPrompt", "description": "Default dialog prompt.", "optional": true, "type": "string" } + ] + }, + { + "name": "lifecycleEvent", + "description": "Fired for top level page lifecycle events such as navigation, load, paint, etc.", + "parameters": [ + { "name": "frameId", "description": "Id of the frame.", "$ref": "FrameId" }, + { + "name": "loaderId", + "description": "Loader identifier. Empty string if the request is fetched from worker.", + "$ref": "Network.LoaderId" + }, + { "name": "name", "type": "string" }, + { "name": "timestamp", "$ref": "Network.MonotonicTime" } + ] + }, + { + "name": "backForwardCacheNotUsed", + "description": "Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do\nnot assume any ordering with the Page.frameNavigated event. This event is fired only for\nmain-frame history navigation where the document changes (non-same-document navigations),\nwhen bfcache navigation fails.", + "experimental": true, + "parameters": [ + { + "name": "loaderId", + "description": "The loader id for the associated navgation.", + "$ref": "Network.LoaderId" + }, + { "name": "frameId", "description": "The frame id of the associated frame.", "$ref": "FrameId" }, + { + "name": "notRestoredExplanations", + "description": "Array of reasons why the page could not be cached. This must not be empty.", + "type": "array", + "items": { "$ref": "BackForwardCacheNotRestoredExplanation" } + }, + { + "name": "notRestoredExplanationsTree", + "description": "Tree structure of reasons why the page could not be cached for each frame.", + "optional": true, + "$ref": "BackForwardCacheNotRestoredExplanationTree" + } + ] + }, + { "name": "loadEventFired", "parameters": [{ "name": "timestamp", "$ref": "Network.MonotonicTime" }] }, + { + "name": "navigatedWithinDocument", + "description": "Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.", + "experimental": true, + "parameters": [ + { "name": "frameId", "description": "Id of the frame.", "$ref": "FrameId" }, + { "name": "url", "description": "Frame's new url.", "type": "string" } + ] + }, + { + "name": "screencastFrame", + "description": "Compressed image data requested by the `startScreencast`.", + "experimental": true, + "parameters": [ + { + "name": "data", + "description": "Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)", + "type": "string" + }, + { "name": "metadata", "description": "Screencast frame metadata.", "$ref": "ScreencastFrameMetadata" }, + { "name": "sessionId", "description": "Frame number.", "type": "integer" } + ] + }, + { + "name": "screencastVisibilityChanged", + "description": "Fired when the page with currently enabled screencast was shown or hidden `.", + "experimental": true, + "parameters": [{ "name": "visible", "description": "True if the page is visible.", "type": "boolean" }] + }, + { + "name": "windowOpen", + "description": "Fired when a new window is going to be opened, via window.open(), link click, form submission,\netc.", + "parameters": [ + { "name": "url", "description": "The URL for the new window.", "type": "string" }, + { "name": "windowName", "description": "Window name.", "type": "string" }, + { + "name": "windowFeatures", + "description": "An array of enabled window features.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "userGesture", + "description": "Whether or not it was triggered by user gesture.", + "type": "boolean" + } + ] + }, + { + "name": "compilationCacheProduced", + "description": "Issued for every compilation cache generated. Is only available\nif Page.setGenerateCompilationCache is enabled.", + "experimental": true, + "parameters": [ + { "name": "url", "type": "string" }, + { + "name": "data", + "description": "Base64-encoded data (Encoded as a base64 string when passed over JSON)", + "type": "string" + } + ] + } + ] + }, + { + "domain": "Performance", + "types": [ + { + "id": "Metric", + "description": "Run-time execution metric.", + "type": "object", + "properties": [ + { "name": "name", "description": "Metric name.", "type": "string" }, + { "name": "value", "description": "Metric value.", "type": "number" } + ] + } + ], + "commands": [ + { "name": "disable", "description": "Disable collecting and reporting metrics." }, + { + "name": "enable", + "description": "Enable collecting and reporting metrics.", + "parameters": [ + { + "name": "timeDomain", + "description": "Time domain to use for collecting and reporting duration metrics.", + "optional": true, + "type": "string", + "enum": ["timeTicks", "threadTicks"] + } + ] + }, + { + "name": "setTimeDomain", + "description": "Sets time domain to use for collecting and reporting duration metrics.\nNote that this must be called before enabling metrics collection. Calling\nthis method while metrics collection is enabled returns an error.", + "experimental": true, + "deprecated": true, + "parameters": [ + { + "name": "timeDomain", + "description": "Time domain", + "type": "string", + "enum": ["timeTicks", "threadTicks"] + } + ] + }, + { + "name": "getMetrics", + "description": "Retrieve current values of run-time metrics.", + "returns": [ + { + "name": "metrics", + "description": "Current values for run-time metrics.", + "type": "array", + "items": { "$ref": "Metric" } + } + ] + } + ], + "events": [ + { + "name": "metrics", + "description": "Current values of the metrics.", + "parameters": [ + { + "name": "metrics", + "description": "Current values of the metrics.", + "type": "array", + "items": { "$ref": "Metric" } + }, + { "name": "title", "description": "Timestamp title.", "type": "string" } + ] + } + ] + }, + { + "domain": "PerformanceTimeline", + "description": "Reporting of performance timeline events, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceobserver.", + "experimental": true, + "dependencies": ["DOM", "Network"], + "types": [ + { + "id": "LargestContentfulPaint", + "description": "See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl", + "type": "object", + "properties": [ + { "name": "renderTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "loadTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "size", "description": "The number of pixels being painted.", "type": "number" }, + { + "name": "elementId", + "description": "The id attribute of the element, if available.", + "optional": true, + "type": "string" + }, + { + "name": "url", + "description": "The URL of the image (may be trimmed).", + "optional": true, + "type": "string" + }, + { "name": "nodeId", "optional": true, "$ref": "DOM.BackendNodeId" } + ] + }, + { + "id": "LayoutShiftAttribution", + "type": "object", + "properties": [ + { "name": "previousRect", "$ref": "DOM.Rect" }, + { "name": "currentRect", "$ref": "DOM.Rect" }, + { "name": "nodeId", "optional": true, "$ref": "DOM.BackendNodeId" } + ] + }, + { + "id": "LayoutShift", + "description": "See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl", + "type": "object", + "properties": [ + { "name": "value", "description": "Score increment produced by this event.", "type": "number" }, + { "name": "hadRecentInput", "type": "boolean" }, + { "name": "lastInputTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "sources", "type": "array", "items": { "$ref": "LayoutShiftAttribution" } } + ] + }, + { + "id": "TimelineEvent", + "type": "object", + "properties": [ + { + "name": "frameId", + "description": "Identifies the frame that this event is related to. Empty for non-frame targets.", + "$ref": "Page.FrameId" + }, + { + "name": "type", + "description": "The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThis determines which of the optional \"details\" fiedls is present.", + "type": "string" + }, + { "name": "name", "description": "Name may be empty depending on the type.", "type": "string" }, + { + "name": "time", + "description": "Time in seconds since Epoch, monotonically increasing within document lifetime.", + "$ref": "Network.TimeSinceEpoch" + }, + { "name": "duration", "description": "Event duration, if applicable.", "optional": true, "type": "number" }, + { "name": "lcpDetails", "optional": true, "$ref": "LargestContentfulPaint" }, + { "name": "layoutShiftDetails", "optional": true, "$ref": "LayoutShift" } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Previously buffered events would be reported before method returns.\nSee also: timelineEventAdded", + "parameters": [ + { + "name": "eventTypes", + "description": "The types of event to report, as specified in\nhttps://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype\nThe specified filter overrides any previous filters, passing empty\nfilter disables recording.\nNote that not all types exposed to the web platform are currently supported.", + "type": "array", + "items": { "type": "string" } + } + ] + } + ], + "events": [ + { + "name": "timelineEventAdded", + "description": "Sent when a performance timeline event is added. See reportPerformanceTimeline method.", + "parameters": [{ "name": "event", "$ref": "TimelineEvent" }] + } + ] + }, + { + "domain": "Preload", + "experimental": true, + "types": [ + { "id": "RuleSetId", "description": "Unique id", "type": "string" }, + { + "id": "RuleSet", + "description": "Corresponds to SpeculationRuleSet", + "type": "object", + "properties": [ + { "name": "id", "$ref": "RuleSetId" }, + { + "name": "loaderId", + "description": "Identifies a document which the rule set is associated with.", + "$ref": "Network.LoaderId" + }, + { + "name": "sourceText", + "description": "Source text of JSON representing the rule set. If it comes from\n`<script>` tag, it is the textContent of the node. Note that it is\na JSON for valid case.\n\nSee also:\n- https://wicg.github.io/nav-speculation/speculation-rules.html\n- https://github.com/WICG/nav-speculation/blob/main/triggers.md", + "type": "string" + }, + { + "name": "backendNodeId", + "description": "A speculation rule set is either added through an inline\n`<script>` tag or through an external resource via the\n'Speculation-Rules' HTTP header. For the first case, we include\nthe BackendNodeId of the relevant `<script>` tag. For the second\ncase, we include the external URL where the rule set was loaded\nfrom, and also RequestId if Network domain is enabled.\n\nSee also:\n- https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script\n- https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header", + "optional": true, + "$ref": "DOM.BackendNodeId" + }, + { "name": "url", "optional": true, "type": "string" }, + { "name": "requestId", "optional": true, "$ref": "Network.RequestId" }, + { + "name": "errorType", + "description": "Error information\n`errorMessage` is null iff `errorType` is null.", + "optional": true, + "$ref": "RuleSetErrorType" + }, + { + "name": "errorMessage", + "description": "TODO(https://crbug.com/1425354): Replace this property with structured error.", + "deprecated": true, + "optional": true, + "type": "string" + } + ] + }, + { "id": "RuleSetErrorType", "type": "string", "enum": ["SourceIsNotJsonObject", "InvalidRulesSkipped"] }, + { + "id": "SpeculationAction", + "description": "The type of preloading attempted. It corresponds to\nmojom::SpeculationAction (although PrefetchWithSubresources is omitted as it\nisn't being used by clients).", + "type": "string", + "enum": ["Prefetch", "Prerender"] + }, + { + "id": "SpeculationTargetHint", + "description": "Corresponds to mojom::SpeculationTargetHint.\nSee https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints", + "type": "string", + "enum": ["Blank", "Self"] + }, + { + "id": "PreloadingAttemptKey", + "description": "A key that identifies a preloading attempt.\n\nThe url used is the url specified by the trigger (i.e. the initial URL), and\nnot the final url that is navigated to. For example, prerendering allows\nsame-origin main frame navigations during the attempt, but the attempt is\nstill keyed with the initial URL.", + "type": "object", + "properties": [ + { "name": "loaderId", "$ref": "Network.LoaderId" }, + { "name": "action", "$ref": "SpeculationAction" }, + { "name": "url", "type": "string" }, + { "name": "targetHint", "optional": true, "$ref": "SpeculationTargetHint" } + ] + }, + { + "id": "PreloadingAttemptSource", + "description": "Lists sources for a preloading attempt, specifically the ids of rule sets\nthat had a speculation rule that triggered the attempt, and the\nBackendNodeIds of <a href> or <area href> elements that triggered the\nattempt (in the case of attempts triggered by a document rule). It is\npossible for mulitple rule sets and links to trigger a single attempt.", + "type": "object", + "properties": [ + { "name": "key", "$ref": "PreloadingAttemptKey" }, + { "name": "ruleSetIds", "type": "array", "items": { "$ref": "RuleSetId" } }, + { "name": "nodeIds", "type": "array", "items": { "$ref": "DOM.BackendNodeId" } } + ] + }, + { + "id": "PrerenderFinalStatus", + "description": "List of FinalStatus reasons for Prerender2.", + "type": "string", + "enum": [ + "Activated", + "Destroyed", + "LowEndDevice", + "InvalidSchemeRedirect", + "InvalidSchemeNavigation", + "InProgressNavigation", + "NavigationRequestBlockedByCsp", + "MainFrameNavigation", + "MojoBinderPolicy", + "RendererProcessCrashed", + "RendererProcessKilled", + "Download", + "TriggerDestroyed", + "NavigationNotCommitted", + "NavigationBadHttpStatus", + "ClientCertRequested", + "NavigationRequestNetworkError", + "MaxNumOfRunningPrerendersExceeded", + "CancelAllHostsForTesting", + "DidFailLoad", + "Stop", + "SslCertificateError", + "LoginAuthRequested", + "UaChangeRequiresReload", + "BlockedByClient", + "AudioOutputDeviceRequested", + "MixedContent", + "TriggerBackgrounded", + "MemoryLimitExceeded", + "FailToGetMemoryUsage", + "DataSaverEnabled", + "HasEffectiveUrl", + "ActivatedBeforeStarted", + "InactivePageRestriction", + "StartFailed", + "TimeoutBackgrounded", + "CrossSiteRedirectInInitialNavigation", + "CrossSiteNavigationInInitialNavigation", + "SameSiteCrossOriginRedirectNotOptInInInitialNavigation", + "SameSiteCrossOriginNavigationNotOptInInInitialNavigation", + "ActivationNavigationParameterMismatch", + "ActivatedInBackground", + "EmbedderHostDisallowed", + "ActivationNavigationDestroyedBeforeSuccess", + "TabClosedByUserGesture", + "TabClosedWithoutUserGesture", + "PrimaryMainFrameRendererProcessCrashed", + "PrimaryMainFrameRendererProcessKilled", + "ActivationFramePolicyNotCompatible", + "PreloadingDisabled", + "BatterySaverEnabled", + "ActivatedDuringMainFrameNavigation", + "PreloadingUnsupportedByWebContents", + "CrossSiteRedirectInMainFrameNavigation", + "CrossSiteNavigationInMainFrameNavigation", + "SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation", + "SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation", + "MemoryPressureOnTrigger", + "MemoryPressureAfterTriggered", + "PrerenderingDisabledByDevTools", + "ResourceLoadBlockedByClient", + "SpeculationRuleRemoved", + "ActivatedWithAuxiliaryBrowsingContexts" + ] + }, + { + "id": "PreloadingStatus", + "description": "Preloading status values, see also PreloadingTriggeringOutcome. This\nstatus is shared by prefetchStatusUpdated and prerenderStatusUpdated.", + "type": "string", + "enum": ["Pending", "Running", "Ready", "Success", "Failure", "NotSupported"] + }, + { + "id": "PrefetchStatus", + "description": "TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and\nfilter out the ones that aren't necessary to the developers.", + "type": "string", + "enum": [ + "PrefetchAllowed", + "PrefetchFailedIneligibleRedirect", + "PrefetchFailedInvalidRedirect", + "PrefetchFailedMIMENotSupported", + "PrefetchFailedNetError", + "PrefetchFailedNon2XX", + "PrefetchFailedPerPageLimitExceeded", + "PrefetchEvicted", + "PrefetchHeldback", + "PrefetchIneligibleRetryAfter", + "PrefetchIsPrivacyDecoy", + "PrefetchIsStale", + "PrefetchNotEligibleBrowserContextOffTheRecord", + "PrefetchNotEligibleDataSaverEnabled", + "PrefetchNotEligibleExistingProxy", + "PrefetchNotEligibleHostIsNonUnique", + "PrefetchNotEligibleNonDefaultStoragePartition", + "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy", + "PrefetchNotEligibleSchemeIsNotHttps", + "PrefetchNotEligibleUserHasCookies", + "PrefetchNotEligibleUserHasServiceWorker", + "PrefetchNotEligibleBatterySaverEnabled", + "PrefetchNotEligiblePreloadingDisabled", + "PrefetchNotFinishedInTime", + "PrefetchNotStarted", + "PrefetchNotUsedCookiesChanged", + "PrefetchProxyNotAvailable", + "PrefetchResponseUsed", + "PrefetchSuccessfulButNotUsed", + "PrefetchNotUsedProbeFailed" + ] + } + ], + "commands": [{ "name": "enable" }, { "name": "disable" }], + "events": [ + { + "name": "ruleSetUpdated", + "description": "Upsert. Currently, it is only emitted when a rule set added.", + "parameters": [{ "name": "ruleSet", "$ref": "RuleSet" }] + }, + { "name": "ruleSetRemoved", "parameters": [{ "name": "id", "$ref": "RuleSetId" }] }, + { + "name": "prerenderAttemptCompleted", + "description": "Fired when a prerender attempt is completed.", + "parameters": [ + { "name": "key", "$ref": "PreloadingAttemptKey" }, + { + "name": "initiatingFrameId", + "description": "The frame id of the frame initiating prerendering.", + "$ref": "Page.FrameId" + }, + { "name": "prerenderingUrl", "type": "string" }, + { "name": "finalStatus", "$ref": "PrerenderFinalStatus" }, + { + "name": "disallowedApiMethod", + "description": "This is used to give users more information about the name of the API call\nthat is incompatible with prerender and has caused the cancellation of the attempt", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "preloadEnabledStateUpdated", + "description": "Fired when a preload enabled state is updated.", + "parameters": [ + { "name": "disabledByPreference", "type": "boolean" }, + { "name": "disabledByDataSaver", "type": "boolean" }, + { "name": "disabledByBatterySaver", "type": "boolean" }, + { "name": "disabledByHoldbackPrefetchSpeculationRules", "type": "boolean" }, + { "name": "disabledByHoldbackPrerenderSpeculationRules", "type": "boolean" } + ] + }, + { + "name": "prefetchStatusUpdated", + "description": "Fired when a prefetch attempt is updated.", + "parameters": [ + { "name": "key", "$ref": "PreloadingAttemptKey" }, + { + "name": "initiatingFrameId", + "description": "The frame id of the frame initiating prefetch.", + "$ref": "Page.FrameId" + }, + { "name": "prefetchUrl", "type": "string" }, + { "name": "status", "$ref": "PreloadingStatus" }, + { "name": "prefetchStatus", "$ref": "PrefetchStatus" }, + { "name": "requestId", "$ref": "Network.RequestId" } + ] + }, + { + "name": "prerenderStatusUpdated", + "description": "Fired when a prerender attempt is updated.", + "parameters": [ + { "name": "key", "$ref": "PreloadingAttemptKey" }, + { "name": "status", "$ref": "PreloadingStatus" }, + { "name": "prerenderStatus", "optional": true, "$ref": "PrerenderFinalStatus" }, + { + "name": "disallowedMojoInterface", + "description": "This is used to give users more information about the name of Mojo interface\nthat is incompatible with prerender and has caused the cancellation of the attempt.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "preloadingAttemptSourcesUpdated", + "description": "Send a list of sources for all preloading attempts in a document.", + "parameters": [ + { "name": "loaderId", "$ref": "Network.LoaderId" }, + { "name": "preloadingAttemptSources", "type": "array", "items": { "$ref": "PreloadingAttemptSource" } } + ] + } + ] + }, + { + "domain": "Schema", + "description": "This domain is deprecated.", + "deprecated": true, + "types": [ + { + "id": "Domain", + "description": "Description of the protocol domain.", + "type": "object", + "properties": [ + { "name": "name", "description": "Domain name.", "type": "string" }, + { "name": "version", "description": "Domain version.", "type": "string" } + ] + } + ], + "commands": [ + { + "name": "getDomains", + "description": "Returns supported domains.", + "returns": [ + { + "name": "domains", + "description": "List of supported domains.", + "type": "array", + "items": { "$ref": "Domain" } + } + ] + } + ] + }, + { + "domain": "Security", + "description": "Security", + "types": [ + { "id": "CertificateId", "description": "An internal certificate ID value.", "type": "integer" }, + { + "id": "MixedContentType", + "description": "A description of mixed content (HTTP resources on HTTPS pages), as defined by\nhttps://www.w3.org/TR/mixed-content/#categories", + "type": "string", + "enum": ["blockable", "optionally-blockable", "none"] + }, + { + "id": "SecurityState", + "description": "The security level of a page or resource.", + "type": "string", + "enum": ["unknown", "neutral", "insecure", "secure", "info", "insecure-broken"] + }, + { + "id": "CertificateSecurityState", + "description": "Details about the security state of the page certificate.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "protocol", "description": "Protocol name (e.g. \"TLS 1.2\" or \"QUIC\").", "type": "string" }, + { + "name": "keyExchange", + "description": "Key Exchange used by the connection, or the empty string if not applicable.", + "type": "string" + }, + { + "name": "keyExchangeGroup", + "description": "(EC)DH group used by the connection, if applicable.", + "optional": true, + "type": "string" + }, + { "name": "cipher", "description": "Cipher name.", "type": "string" }, + { + "name": "mac", + "description": "TLS MAC. Note that AEAD ciphers do not have separate MACs.", + "optional": true, + "type": "string" + }, + { + "name": "certificate", + "description": "Page certificate.", + "type": "array", + "items": { "type": "string" } + }, + { "name": "subjectName", "description": "Certificate subject name.", "type": "string" }, + { "name": "issuer", "description": "Name of the issuing CA.", "type": "string" }, + { "name": "validFrom", "description": "Certificate valid from date.", "$ref": "Network.TimeSinceEpoch" }, + { + "name": "validTo", + "description": "Certificate valid to (expiration) date", + "$ref": "Network.TimeSinceEpoch" + }, + { + "name": "certificateNetworkError", + "description": "The highest priority network error code, if the certificate has an error.", + "optional": true, + "type": "string" + }, + { + "name": "certificateHasWeakSignature", + "description": "True if the certificate uses a weak signature aglorithm.", + "type": "boolean" + }, + { + "name": "certificateHasSha1Signature", + "description": "True if the certificate has a SHA1 signature in the chain.", + "type": "boolean" + }, + { "name": "modernSSL", "description": "True if modern SSL", "type": "boolean" }, + { + "name": "obsoleteSslProtocol", + "description": "True if the connection is using an obsolete SSL protocol.", + "type": "boolean" + }, + { + "name": "obsoleteSslKeyExchange", + "description": "True if the connection is using an obsolete SSL key exchange.", + "type": "boolean" + }, + { + "name": "obsoleteSslCipher", + "description": "True if the connection is using an obsolete SSL cipher.", + "type": "boolean" + }, + { + "name": "obsoleteSslSignature", + "description": "True if the connection is using an obsolete SSL signature.", + "type": "boolean" + } + ] + }, + { "id": "SafetyTipStatus", "experimental": true, "type": "string", "enum": ["badReputation", "lookalike"] }, + { + "id": "SafetyTipInfo", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "safetyTipStatus", + "description": "Describes whether the page triggers any safety tips or reputation warnings. Default is unknown.", + "$ref": "SafetyTipStatus" + }, + { + "name": "safeUrl", + "description": "The URL the safety tip suggested (\"Did you mean?\"). Only filled in for lookalike matches.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "VisibleSecurityState", + "description": "Security state information about the page.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "securityState", "description": "The security level of the page.", "$ref": "SecurityState" }, + { + "name": "certificateSecurityState", + "description": "Security state details about the page certificate.", + "optional": true, + "$ref": "CertificateSecurityState" + }, + { + "name": "safetyTipInfo", + "description": "The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.", + "optional": true, + "$ref": "SafetyTipInfo" + }, + { + "name": "securityStateIssueIds", + "description": "Array of security state issues ids.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "id": "SecurityStateExplanation", + "description": "An explanation of an factor contributing to the security state.", + "type": "object", + "properties": [ + { + "name": "securityState", + "description": "Security state representing the severity of the factor being explained.", + "$ref": "SecurityState" + }, + { "name": "title", "description": "Title describing the type of factor.", "type": "string" }, + { "name": "summary", "description": "Short phrase describing the type of factor.", "type": "string" }, + { "name": "description", "description": "Full text explanation of the factor.", "type": "string" }, + { + "name": "mixedContentType", + "description": "The type of mixed content described by the explanation.", + "$ref": "MixedContentType" + }, + { + "name": "certificate", + "description": "Page certificate.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "recommendations", + "description": "Recommendations to fix any issues.", + "optional": true, + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "id": "InsecureContentStatus", + "description": "Information about insecure content on the page.", + "deprecated": true, + "type": "object", + "properties": [ + { "name": "ranMixedContent", "description": "Always false.", "type": "boolean" }, + { "name": "displayedMixedContent", "description": "Always false.", "type": "boolean" }, + { "name": "containedMixedForm", "description": "Always false.", "type": "boolean" }, + { "name": "ranContentWithCertErrors", "description": "Always false.", "type": "boolean" }, + { "name": "displayedContentWithCertErrors", "description": "Always false.", "type": "boolean" }, + { "name": "ranInsecureContentStyle", "description": "Always set to unknown.", "$ref": "SecurityState" }, + { + "name": "displayedInsecureContentStyle", + "description": "Always set to unknown.", + "$ref": "SecurityState" + } + ] + }, + { + "id": "CertificateErrorAction", + "description": "The action to take when a certificate error occurs. continue will continue processing the\nrequest and cancel will cancel the request.", + "type": "string", + "enum": ["continue", "cancel"] + } + ], + "commands": [ + { "name": "disable", "description": "Disables tracking security state changes." }, + { "name": "enable", "description": "Enables tracking security state changes." }, + { + "name": "setIgnoreCertificateErrors", + "description": "Enable/disable whether all certificate errors should be ignored.", + "experimental": true, + "parameters": [ + { "name": "ignore", "description": "If true, all certificate errors will be ignored.", "type": "boolean" } + ] + }, + { + "name": "handleCertificateError", + "description": "Handles a certificate error that fired a certificateError event.", + "deprecated": true, + "parameters": [ + { "name": "eventId", "description": "The ID of the event.", "type": "integer" }, + { + "name": "action", + "description": "The action to take on the certificate error.", + "$ref": "CertificateErrorAction" + } + ] + }, + { + "name": "setOverrideCertificateErrors", + "description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to\nbe handled by the DevTools client and should be answered with `handleCertificateError` commands.", + "deprecated": true, + "parameters": [ + { "name": "override", "description": "If true, certificate errors will be overridden.", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "certificateError", + "description": "There is a certificate error. If overriding certificate errors is enabled, then it should be\nhandled with the `handleCertificateError` command. Note: this event does not fire if the\ncertificate error has been allowed internally. Only one client per target should override\ncertificate errors at the same time.", + "deprecated": true, + "parameters": [ + { "name": "eventId", "description": "The ID of the event.", "type": "integer" }, + { "name": "errorType", "description": "The type of the error.", "type": "string" }, + { "name": "requestURL", "description": "The url that was requested.", "type": "string" } + ] + }, + { + "name": "visibleSecurityStateChanged", + "description": "The security state of the page changed.", + "experimental": true, + "parameters": [ + { + "name": "visibleSecurityState", + "description": "Security state information about the page.", + "$ref": "VisibleSecurityState" + } + ] + }, + { + "name": "securityStateChanged", + "description": "The security state of the page changed. No longer being sent.", + "deprecated": true, + "parameters": [ + { "name": "securityState", "description": "Security state.", "$ref": "SecurityState" }, + { + "name": "schemeIsCryptographic", + "description": "True if the page was loaded over cryptographic transport such as HTTPS.", + "deprecated": true, + "type": "boolean" + }, + { + "name": "explanations", + "description": "Previously a list of explanations for the security state. Now always\nempty.", + "deprecated": true, + "type": "array", + "items": { "$ref": "SecurityStateExplanation" } + }, + { + "name": "insecureContentStatus", + "description": "Information about insecure content on the page.", + "deprecated": true, + "$ref": "InsecureContentStatus" + }, + { + "name": "summary", + "description": "Overrides user-visible description of the state. Always omitted.", + "deprecated": true, + "optional": true, + "type": "string" + } + ] + } + ] + }, + { + "domain": "ServiceWorker", + "experimental": true, + "dependencies": ["Target"], + "types": [ + { "id": "RegistrationID", "type": "string" }, + { + "id": "ServiceWorkerRegistration", + "description": "ServiceWorker registration.", + "type": "object", + "properties": [ + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "scopeURL", "type": "string" }, + { "name": "isDeleted", "type": "boolean" } + ] + }, + { + "id": "ServiceWorkerVersionRunningStatus", + "type": "string", + "enum": ["stopped", "starting", "running", "stopping"] + }, + { + "id": "ServiceWorkerVersionStatus", + "type": "string", + "enum": ["new", "installing", "installed", "activating", "activated", "redundant"] + }, + { + "id": "ServiceWorkerVersion", + "description": "ServiceWorker version.", + "type": "object", + "properties": [ + { "name": "versionId", "type": "string" }, + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "scriptURL", "type": "string" }, + { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" }, + { "name": "status", "$ref": "ServiceWorkerVersionStatus" }, + { + "name": "scriptLastModified", + "description": "The Last-Modified header value of the main script.", + "optional": true, + "type": "number" + }, + { + "name": "scriptResponseTime", + "description": "The time at which the response headers of the main script were received from the server.\nFor cached script it is the last time the cache entry was validated.", + "optional": true, + "type": "number" + }, + { "name": "controlledClients", "optional": true, "type": "array", "items": { "$ref": "Target.TargetID" } }, + { "name": "targetId", "optional": true, "$ref": "Target.TargetID" } + ] + }, + { + "id": "ServiceWorkerErrorMessage", + "description": "ServiceWorker error message.", + "type": "object", + "properties": [ + { "name": "errorMessage", "type": "string" }, + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "versionId", "type": "string" }, + { "name": "sourceURL", "type": "string" }, + { "name": "lineNumber", "type": "integer" }, + { "name": "columnNumber", "type": "integer" } + ] + } + ], + "commands": [ + { + "name": "deliverPushMessage", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "data", "type": "string" } + ] + }, + { "name": "disable" }, + { + "name": "dispatchSyncEvent", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "tag", "type": "string" }, + { "name": "lastChance", "type": "boolean" } + ] + }, + { + "name": "dispatchPeriodicSyncEvent", + "parameters": [ + { "name": "origin", "type": "string" }, + { "name": "registrationId", "$ref": "RegistrationID" }, + { "name": "tag", "type": "string" } + ] + }, + { "name": "enable" }, + { "name": "inspectWorker", "parameters": [{ "name": "versionId", "type": "string" }] }, + { "name": "setForceUpdateOnPageLoad", "parameters": [{ "name": "forceUpdateOnPageLoad", "type": "boolean" }] }, + { "name": "skipWaiting", "parameters": [{ "name": "scopeURL", "type": "string" }] }, + { "name": "startWorker", "parameters": [{ "name": "scopeURL", "type": "string" }] }, + { "name": "stopAllWorkers" }, + { "name": "stopWorker", "parameters": [{ "name": "versionId", "type": "string" }] }, + { "name": "unregister", "parameters": [{ "name": "scopeURL", "type": "string" }] }, + { "name": "updateRegistration", "parameters": [{ "name": "scopeURL", "type": "string" }] } + ], + "events": [ + { + "name": "workerErrorReported", + "parameters": [{ "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" }] + }, + { + "name": "workerRegistrationUpdated", + "parameters": [{ "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } }] + }, + { + "name": "workerVersionUpdated", + "parameters": [{ "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } }] + } + ] + }, + { + "domain": "Storage", + "experimental": true, + "dependencies": ["Browser", "Network"], + "types": [ + { "id": "SerializedStorageKey", "type": "string" }, + { + "id": "StorageType", + "description": "Enum of possible storage types.", + "type": "string", + "enum": [ + "appcache", + "cookies", + "file_systems", + "indexeddb", + "local_storage", + "shader_cache", + "websql", + "service_workers", + "cache_storage", + "interest_groups", + "shared_storage", + "storage_buckets", + "all", + "other" + ] + }, + { + "id": "UsageForType", + "description": "Usage for a storage type.", + "type": "object", + "properties": [ + { "name": "storageType", "description": "Name of storage type.", "$ref": "StorageType" }, + { "name": "usage", "description": "Storage usage (bytes).", "type": "number" } + ] + }, + { + "id": "TrustTokens", + "description": "Pair of issuer origin and number of available (signed, but not used) Trust\nTokens from that issuer.", + "experimental": true, + "type": "object", + "properties": [ + { "name": "issuerOrigin", "type": "string" }, + { "name": "count", "type": "number" } + ] + }, + { + "id": "InterestGroupAccessType", + "description": "Enum of interest group access types.", + "type": "string", + "enum": ["join", "leave", "update", "loaded", "bid", "win"] + }, + { + "id": "InterestGroupAd", + "description": "Ad advertising element inside an interest group.", + "type": "object", + "properties": [ + { "name": "renderUrl", "type": "string" }, + { "name": "metadata", "optional": true, "type": "string" } + ] + }, + { + "id": "InterestGroupDetails", + "description": "The full details of an interest group.", + "type": "object", + "properties": [ + { "name": "ownerOrigin", "type": "string" }, + { "name": "name", "type": "string" }, + { "name": "expirationTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "joiningOrigin", "type": "string" }, + { "name": "biddingUrl", "optional": true, "type": "string" }, + { "name": "biddingWasmHelperUrl", "optional": true, "type": "string" }, + { "name": "updateUrl", "optional": true, "type": "string" }, + { "name": "trustedBiddingSignalsUrl", "optional": true, "type": "string" }, + { "name": "trustedBiddingSignalsKeys", "type": "array", "items": { "type": "string" } }, + { "name": "userBiddingSignals", "optional": true, "type": "string" }, + { "name": "ads", "type": "array", "items": { "$ref": "InterestGroupAd" } }, + { "name": "adComponents", "type": "array", "items": { "$ref": "InterestGroupAd" } } + ] + }, + { + "id": "SharedStorageAccessType", + "description": "Enum of shared storage access types.", + "type": "string", + "enum": [ + "documentAddModule", + "documentSelectURL", + "documentRun", + "documentSet", + "documentAppend", + "documentDelete", + "documentClear", + "workletSet", + "workletAppend", + "workletDelete", + "workletClear", + "workletGet", + "workletKeys", + "workletEntries", + "workletLength", + "workletRemainingBudget" + ] + }, + { + "id": "SharedStorageEntry", + "description": "Struct for a single key-value pair in an origin's shared storage.", + "type": "object", + "properties": [ + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" } + ] + }, + { + "id": "SharedStorageMetadata", + "description": "Details for an origin's shared storage.", + "type": "object", + "properties": [ + { "name": "creationTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "length", "type": "integer" }, + { "name": "remainingBudget", "type": "number" } + ] + }, + { + "id": "SharedStorageReportingMetadata", + "description": "Pair of reporting metadata details for a candidate URL for `selectURL()`.", + "type": "object", + "properties": [ + { "name": "eventType", "type": "string" }, + { "name": "reportingUrl", "type": "string" } + ] + }, + { + "id": "SharedStorageUrlWithMetadata", + "description": "Bundles a candidate URL with its reporting metadata.", + "type": "object", + "properties": [ + { "name": "url", "description": "Spec of candidate URL.", "type": "string" }, + { + "name": "reportingMetadata", + "description": "Any associated reporting metadata.", + "type": "array", + "items": { "$ref": "SharedStorageReportingMetadata" } + } + ] + }, + { + "id": "SharedStorageAccessParams", + "description": "Bundles the parameters for shared storage access events whose\npresence/absence can vary according to SharedStorageAccessType.", + "type": "object", + "properties": [ + { + "name": "scriptSourceUrl", + "description": "Spec of the module script URL.\nPresent only for SharedStorageAccessType.documentAddModule.", + "optional": true, + "type": "string" + }, + { + "name": "operationName", + "description": "Name of the registered operation to be run.\nPresent only for SharedStorageAccessType.documentRun and\nSharedStorageAccessType.documentSelectURL.", + "optional": true, + "type": "string" + }, + { + "name": "serializedData", + "description": "The operation's serialized data in bytes (converted to a string).\nPresent only for SharedStorageAccessType.documentRun and\nSharedStorageAccessType.documentSelectURL.", + "optional": true, + "type": "string" + }, + { + "name": "urlsWithMetadata", + "description": "Array of candidate URLs' specs, along with any associated metadata.\nPresent only for SharedStorageAccessType.documentSelectURL.", + "optional": true, + "type": "array", + "items": { "$ref": "SharedStorageUrlWithMetadata" } + }, + { + "name": "key", + "description": "Key for a specific entry in an origin's shared storage.\nPresent only for SharedStorageAccessType.documentSet,\nSharedStorageAccessType.documentAppend,\nSharedStorageAccessType.documentDelete,\nSharedStorageAccessType.workletSet,\nSharedStorageAccessType.workletAppend,\nSharedStorageAccessType.workletDelete, and\nSharedStorageAccessType.workletGet.", + "optional": true, + "type": "string" + }, + { + "name": "value", + "description": "Value for a specific entry in an origin's shared storage.\nPresent only for SharedStorageAccessType.documentSet,\nSharedStorageAccessType.documentAppend,\nSharedStorageAccessType.workletSet, and\nSharedStorageAccessType.workletAppend.", + "optional": true, + "type": "string" + }, + { + "name": "ignoreIfPresent", + "description": "Whether or not to set an entry for a key if that key is already present.\nPresent only for SharedStorageAccessType.documentSet and\nSharedStorageAccessType.workletSet.", + "optional": true, + "type": "boolean" + } + ] + }, + { "id": "StorageBucketsDurability", "type": "string", "enum": ["relaxed", "strict"] }, + { + "id": "StorageBucket", + "type": "object", + "properties": [ + { "name": "storageKey", "$ref": "SerializedStorageKey" }, + { + "name": "name", + "description": "If not specified, it is the default bucket of the storageKey.", + "optional": true, + "type": "string" + } + ] + }, + { + "id": "StorageBucketInfo", + "type": "object", + "properties": [ + { "name": "bucket", "$ref": "StorageBucket" }, + { "name": "id", "type": "string" }, + { "name": "expiration", "$ref": "Network.TimeSinceEpoch" }, + { "name": "quota", "description": "Storage quota (bytes).", "type": "number" }, + { "name": "persistent", "type": "boolean" }, + { "name": "durability", "$ref": "StorageBucketsDurability" } + ] + }, + { + "id": "AttributionReportingSourceType", + "experimental": true, + "type": "string", + "enum": ["navigation", "event"] + }, + { "id": "UnsignedInt64AsBase10", "experimental": true, "type": "string" }, + { "id": "UnsignedInt128AsBase16", "experimental": true, "type": "string" }, + { "id": "SignedInt64AsBase10", "experimental": true, "type": "string" }, + { + "id": "AttributionReportingFilterDataEntry", + "experimental": true, + "type": "object", + "properties": [ + { "name": "key", "type": "string" }, + { "name": "values", "type": "array", "items": { "type": "string" } } + ] + }, + { + "id": "AttributionReportingAggregationKeysEntry", + "experimental": true, + "type": "object", + "properties": [ + { "name": "key", "type": "string" }, + { "name": "value", "$ref": "UnsignedInt128AsBase16" } + ] + }, + { + "id": "AttributionReportingSourceRegistration", + "experimental": true, + "type": "object", + "properties": [ + { "name": "time", "$ref": "Network.TimeSinceEpoch" }, + { "name": "expiry", "description": "duration in seconds", "optional": true, "type": "integer" }, + { "name": "eventReportWindow", "description": "duration in seconds", "optional": true, "type": "integer" }, + { + "name": "aggregatableReportWindow", + "description": "duration in seconds", + "optional": true, + "type": "integer" + }, + { "name": "type", "$ref": "AttributionReportingSourceType" }, + { "name": "sourceOrigin", "type": "string" }, + { "name": "reportingOrigin", "type": "string" }, + { "name": "destinationSites", "type": "array", "items": { "type": "string" } }, + { "name": "eventId", "$ref": "UnsignedInt64AsBase10" }, + { "name": "priority", "$ref": "SignedInt64AsBase10" }, + { "name": "filterData", "type": "array", "items": { "$ref": "AttributionReportingFilterDataEntry" } }, + { + "name": "aggregationKeys", + "type": "array", + "items": { "$ref": "AttributionReportingAggregationKeysEntry" } + }, + { "name": "debugKey", "optional": true, "$ref": "UnsignedInt64AsBase10" } + ] + }, + { + "id": "AttributionReportingSourceRegistrationResult", + "experimental": true, + "type": "string", + "enum": [ + "success", + "internalError", + "insufficientSourceCapacity", + "insufficientUniqueDestinationCapacity", + "excessiveReportingOrigins", + "prohibitedByBrowserPolicy", + "successNoised", + "destinationReportingLimitReached", + "destinationGlobalLimitReached", + "destinationBothLimitsReached", + "reportingOriginsPerSiteLimitReached", + "exceedsMaxChannelCapacity" + ] + } + ], + "commands": [ + { + "name": "getStorageKeyForFrame", + "description": "Returns a storage key given a frame id.", + "parameters": [{ "name": "frameId", "$ref": "Page.FrameId" }], + "returns": [{ "name": "storageKey", "$ref": "SerializedStorageKey" }] + }, + { + "name": "clearDataForOrigin", + "description": "Clears storage for origin.", + "parameters": [ + { "name": "origin", "description": "Security origin.", "type": "string" }, + { "name": "storageTypes", "description": "Comma separated list of StorageType to clear.", "type": "string" } + ] + }, + { + "name": "clearDataForStorageKey", + "description": "Clears storage for storage key.", + "parameters": [ + { "name": "storageKey", "description": "Storage key.", "type": "string" }, + { "name": "storageTypes", "description": "Comma separated list of StorageType to clear.", "type": "string" } + ] + }, + { + "name": "getCookies", + "description": "Returns all browser cookies.", + "parameters": [ + { + "name": "browserContextId", + "description": "Browser context to use when called on the browser endpoint.", + "optional": true, + "$ref": "Browser.BrowserContextID" + } + ], + "returns": [ + { + "name": "cookies", + "description": "Array of cookie objects.", + "type": "array", + "items": { "$ref": "Network.Cookie" } + } + ] + }, + { + "name": "setCookies", + "description": "Sets given cookies.", + "parameters": [ + { + "name": "cookies", + "description": "Cookies to be set.", + "type": "array", + "items": { "$ref": "Network.CookieParam" } + }, + { + "name": "browserContextId", + "description": "Browser context to use when called on the browser endpoint.", + "optional": true, + "$ref": "Browser.BrowserContextID" + } + ] + }, + { + "name": "clearCookies", + "description": "Clears cookies.", + "parameters": [ + { + "name": "browserContextId", + "description": "Browser context to use when called on the browser endpoint.", + "optional": true, + "$ref": "Browser.BrowserContextID" + } + ] + }, + { + "name": "getUsageAndQuota", + "description": "Returns usage and quota in bytes.", + "parameters": [{ "name": "origin", "description": "Security origin.", "type": "string" }], + "returns": [ + { "name": "usage", "description": "Storage usage (bytes).", "type": "number" }, + { "name": "quota", "description": "Storage quota (bytes).", "type": "number" }, + { + "name": "overrideActive", + "description": "Whether or not the origin has an active storage quota override", + "type": "boolean" + }, + { + "name": "usageBreakdown", + "description": "Storage usage per type (bytes).", + "type": "array", + "items": { "$ref": "UsageForType" } + } + ] + }, + { + "name": "overrideQuotaForOrigin", + "description": "Override quota for the specified origin", + "experimental": true, + "parameters": [ + { "name": "origin", "description": "Security origin.", "type": "string" }, + { + "name": "quotaSize", + "description": "The quota size (in bytes) to override the original quota with.\nIf this is called multiple times, the overridden quota will be equal to\nthe quotaSize provided in the final call. If this is called without\nspecifying a quotaSize, the quota will be reset to the default value for\nthe specified origin. If this is called multiple times with different\norigins, the override will be maintained for each origin until it is\ndisabled (called without a quotaSize).", + "optional": true, + "type": "number" + } + ] + }, + { + "name": "trackCacheStorageForOrigin", + "description": "Registers origin to be notified when an update occurs to its cache storage list.", + "parameters": [{ "name": "origin", "description": "Security origin.", "type": "string" }] + }, + { + "name": "trackCacheStorageForStorageKey", + "description": "Registers storage key to be notified when an update occurs to its cache storage list.", + "parameters": [{ "name": "storageKey", "description": "Storage key.", "type": "string" }] + }, + { + "name": "trackIndexedDBForOrigin", + "description": "Registers origin to be notified when an update occurs to its IndexedDB.", + "parameters": [{ "name": "origin", "description": "Security origin.", "type": "string" }] + }, + { + "name": "trackIndexedDBForStorageKey", + "description": "Registers storage key to be notified when an update occurs to its IndexedDB.", + "parameters": [{ "name": "storageKey", "description": "Storage key.", "type": "string" }] + }, + { + "name": "untrackCacheStorageForOrigin", + "description": "Unregisters origin from receiving notifications for cache storage.", + "parameters": [{ "name": "origin", "description": "Security origin.", "type": "string" }] + }, + { + "name": "untrackCacheStorageForStorageKey", + "description": "Unregisters storage key from receiving notifications for cache storage.", + "parameters": [{ "name": "storageKey", "description": "Storage key.", "type": "string" }] + }, + { + "name": "untrackIndexedDBForOrigin", + "description": "Unregisters origin from receiving notifications for IndexedDB.", + "parameters": [{ "name": "origin", "description": "Security origin.", "type": "string" }] + }, + { + "name": "untrackIndexedDBForStorageKey", + "description": "Unregisters storage key from receiving notifications for IndexedDB.", + "parameters": [{ "name": "storageKey", "description": "Storage key.", "type": "string" }] + }, + { + "name": "getTrustTokens", + "description": "Returns the number of stored Trust Tokens per issuer for the\ncurrent browsing context.", + "experimental": true, + "returns": [{ "name": "tokens", "type": "array", "items": { "$ref": "TrustTokens" } }] + }, + { + "name": "clearTrustTokens", + "description": "Removes all Trust Tokens issued by the provided issuerOrigin.\nLeaves other stored data, including the issuer's Redemption Records, intact.", + "experimental": true, + "parameters": [{ "name": "issuerOrigin", "type": "string" }], + "returns": [ + { + "name": "didDeleteTokens", + "description": "True if any tokens were deleted, false otherwise.", + "type": "boolean" + } + ] + }, + { + "name": "getInterestGroupDetails", + "description": "Gets details for a named interest group.", + "experimental": true, + "parameters": [ + { "name": "ownerOrigin", "type": "string" }, + { "name": "name", "type": "string" } + ], + "returns": [{ "name": "details", "$ref": "InterestGroupDetails" }] + }, + { + "name": "setInterestGroupTracking", + "description": "Enables/Disables issuing of interestGroupAccessed events.", + "experimental": true, + "parameters": [{ "name": "enable", "type": "boolean" }] + }, + { + "name": "getSharedStorageMetadata", + "description": "Gets metadata for an origin's shared storage.", + "experimental": true, + "parameters": [{ "name": "ownerOrigin", "type": "string" }], + "returns": [{ "name": "metadata", "$ref": "SharedStorageMetadata" }] + }, + { + "name": "getSharedStorageEntries", + "description": "Gets the entries in an given origin's shared storage.", + "experimental": true, + "parameters": [{ "name": "ownerOrigin", "type": "string" }], + "returns": [{ "name": "entries", "type": "array", "items": { "$ref": "SharedStorageEntry" } }] + }, + { + "name": "setSharedStorageEntry", + "description": "Sets entry with `key` and `value` for a given origin's shared storage.", + "experimental": true, + "parameters": [ + { "name": "ownerOrigin", "type": "string" }, + { "name": "key", "type": "string" }, + { "name": "value", "type": "string" }, + { + "name": "ignoreIfPresent", + "description": "If `ignoreIfPresent` is included and true, then only sets the entry if\n`key` doesn't already exist.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "deleteSharedStorageEntry", + "description": "Deletes entry for `key` (if it exists) for a given origin's shared storage.", + "experimental": true, + "parameters": [ + { "name": "ownerOrigin", "type": "string" }, + { "name": "key", "type": "string" } + ] + }, + { + "name": "clearSharedStorageEntries", + "description": "Clears all entries for a given origin's shared storage.", + "experimental": true, + "parameters": [{ "name": "ownerOrigin", "type": "string" }] + }, + { + "name": "resetSharedStorageBudget", + "description": "Resets the budget for `ownerOrigin` by clearing all budget withdrawals.", + "experimental": true, + "parameters": [{ "name": "ownerOrigin", "type": "string" }] + }, + { + "name": "setSharedStorageTracking", + "description": "Enables/disables issuing of sharedStorageAccessed events.", + "experimental": true, + "parameters": [{ "name": "enable", "type": "boolean" }] + }, + { + "name": "setStorageBucketTracking", + "description": "Set tracking for a storage key's buckets.", + "experimental": true, + "parameters": [ + { "name": "storageKey", "type": "string" }, + { "name": "enable", "type": "boolean" } + ] + }, + { + "name": "deleteStorageBucket", + "description": "Deletes the Storage Bucket with the given storage key and bucket name.", + "experimental": true, + "parameters": [{ "name": "bucket", "$ref": "StorageBucket" }] + }, + { + "name": "runBounceTrackingMitigations", + "description": "Deletes state for sites identified as potential bounce trackers, immediately.", + "experimental": true, + "returns": [{ "name": "deletedSites", "type": "array", "items": { "type": "string" } }] + }, + { + "name": "setAttributionReportingLocalTestingMode", + "description": "https://wicg.github.io/attribution-reporting-api/", + "experimental": true, + "parameters": [ + { + "name": "enabled", + "description": "If enabled, noise is suppressed and reports are sent immediately.", + "type": "boolean" + } + ] + }, + { + "name": "setAttributionReportingTracking", + "description": "Enables/disables issuing of Attribution Reporting events.", + "experimental": true, + "parameters": [{ "name": "enable", "type": "boolean" }] + } + ], + "events": [ + { + "name": "cacheStorageContentUpdated", + "description": "A cache's contents have been modified.", + "parameters": [ + { "name": "origin", "description": "Origin to update.", "type": "string" }, + { "name": "storageKey", "description": "Storage key to update.", "type": "string" }, + { "name": "bucketId", "description": "Storage bucket to update.", "type": "string" }, + { "name": "cacheName", "description": "Name of cache in origin.", "type": "string" } + ] + }, + { + "name": "cacheStorageListUpdated", + "description": "A cache has been added/deleted.", + "parameters": [ + { "name": "origin", "description": "Origin to update.", "type": "string" }, + { "name": "storageKey", "description": "Storage key to update.", "type": "string" }, + { "name": "bucketId", "description": "Storage bucket to update.", "type": "string" } + ] + }, + { + "name": "indexedDBContentUpdated", + "description": "The origin's IndexedDB object store has been modified.", + "parameters": [ + { "name": "origin", "description": "Origin to update.", "type": "string" }, + { "name": "storageKey", "description": "Storage key to update.", "type": "string" }, + { "name": "bucketId", "description": "Storage bucket to update.", "type": "string" }, + { "name": "databaseName", "description": "Database to update.", "type": "string" }, + { "name": "objectStoreName", "description": "ObjectStore to update.", "type": "string" } + ] + }, + { + "name": "indexedDBListUpdated", + "description": "The origin's IndexedDB database list has been modified.", + "parameters": [ + { "name": "origin", "description": "Origin to update.", "type": "string" }, + { "name": "storageKey", "description": "Storage key to update.", "type": "string" }, + { "name": "bucketId", "description": "Storage bucket to update.", "type": "string" } + ] + }, + { + "name": "interestGroupAccessed", + "description": "One of the interest groups was accessed by the associated page.", + "parameters": [ + { "name": "accessTime", "$ref": "Network.TimeSinceEpoch" }, + { "name": "type", "$ref": "InterestGroupAccessType" }, + { "name": "ownerOrigin", "type": "string" }, + { "name": "name", "type": "string" } + ] + }, + { + "name": "sharedStorageAccessed", + "description": "Shared storage was accessed by the associated page.\nThe following parameters are included in all events.", + "parameters": [ + { "name": "accessTime", "description": "Time of the access.", "$ref": "Network.TimeSinceEpoch" }, + { + "name": "type", + "description": "Enum value indicating the Shared Storage API method invoked.", + "$ref": "SharedStorageAccessType" + }, + { + "name": "mainFrameId", + "description": "DevTools Frame Token for the primary frame tree's root.", + "$ref": "Page.FrameId" + }, + { + "name": "ownerOrigin", + "description": "Serialized origin for the context that invoked the Shared Storage API.", + "type": "string" + }, + { + "name": "params", + "description": "The sub-parameters warapped by `params` are all optional and their\npresence/absence depends on `type`.", + "$ref": "SharedStorageAccessParams" + } + ] + }, + { + "name": "storageBucketCreatedOrUpdated", + "parameters": [{ "name": "bucketInfo", "$ref": "StorageBucketInfo" }] + }, + { "name": "storageBucketDeleted", "parameters": [{ "name": "bucketId", "type": "string" }] }, + { + "name": "attributionReportingSourceRegistered", + "description": "TODO(crbug.com/1458532): Add other Attribution Reporting events, e.g.\ntrigger registration.", + "experimental": true, + "parameters": [ + { "name": "registration", "$ref": "AttributionReportingSourceRegistration" }, + { "name": "result", "$ref": "AttributionReportingSourceRegistrationResult" } + ] + } + ] + }, + { + "domain": "SystemInfo", + "description": "The SystemInfo domain defines methods and events for querying low-level system information.", + "experimental": true, + "types": [ + { + "id": "GPUDevice", + "description": "Describes a single graphics processor (GPU).", + "type": "object", + "properties": [ + { + "name": "vendorId", + "description": "PCI ID of the GPU vendor, if available; 0 otherwise.", + "type": "number" + }, + { + "name": "deviceId", + "description": "PCI ID of the GPU device, if available; 0 otherwise.", + "type": "number" + }, + { + "name": "subSysId", + "description": "Sub sys ID of the GPU, only available on Windows.", + "optional": true, + "type": "number" + }, + { + "name": "revision", + "description": "Revision of the GPU, only available on Windows.", + "optional": true, + "type": "number" + }, + { + "name": "vendorString", + "description": "String description of the GPU vendor, if the PCI ID is not available.", + "type": "string" + }, + { + "name": "deviceString", + "description": "String description of the GPU device, if the PCI ID is not available.", + "type": "string" + }, + { "name": "driverVendor", "description": "String description of the GPU driver vendor.", "type": "string" }, + { + "name": "driverVersion", + "description": "String description of the GPU driver version.", + "type": "string" + } + ] + }, + { + "id": "Size", + "description": "Describes the width and height dimensions of an entity.", + "type": "object", + "properties": [ + { "name": "width", "description": "Width in pixels.", "type": "integer" }, + { "name": "height", "description": "Height in pixels.", "type": "integer" } + ] + }, + { + "id": "VideoDecodeAcceleratorCapability", + "description": "Describes a supported video decoding profile with its associated minimum and\nmaximum resolutions.", + "type": "object", + "properties": [ + { + "name": "profile", + "description": "Video codec profile that is supported, e.g. VP9 Profile 2.", + "type": "string" + }, + { + "name": "maxResolution", + "description": "Maximum video dimensions in pixels supported for this |profile|.", + "$ref": "Size" + }, + { + "name": "minResolution", + "description": "Minimum video dimensions in pixels supported for this |profile|.", + "$ref": "Size" + } + ] + }, + { + "id": "VideoEncodeAcceleratorCapability", + "description": "Describes a supported video encoding profile with its associated maximum\nresolution and maximum framerate.", + "type": "object", + "properties": [ + { + "name": "profile", + "description": "Video codec profile that is supported, e.g H264 Main.", + "type": "string" + }, + { + "name": "maxResolution", + "description": "Maximum video dimensions in pixels supported for this |profile|.", + "$ref": "Size" + }, + { + "name": "maxFramerateNumerator", + "description": "Maximum encoding framerate in frames per second supported for this\n|profile|, as fraction's numerator and denominator, e.g. 24/1 fps,\n24000/1001 fps, etc.", + "type": "integer" + }, + { "name": "maxFramerateDenominator", "type": "integer" } + ] + }, + { + "id": "SubsamplingFormat", + "description": "YUV subsampling type of the pixels of a given image.", + "type": "string", + "enum": ["yuv420", "yuv422", "yuv444"] + }, + { + "id": "ImageType", + "description": "Image format of a given image.", + "type": "string", + "enum": ["jpeg", "webp", "unknown"] + }, + { + "id": "ImageDecodeAcceleratorCapability", + "description": "Describes a supported image decoding profile with its associated minimum and\nmaximum resolutions and subsampling.", + "type": "object", + "properties": [ + { "name": "imageType", "description": "Image coded, e.g. Jpeg.", "$ref": "ImageType" }, + { + "name": "maxDimensions", + "description": "Maximum supported dimensions of the image in pixels.", + "$ref": "Size" + }, + { + "name": "minDimensions", + "description": "Minimum supported dimensions of the image in pixels.", + "$ref": "Size" + }, + { + "name": "subsamplings", + "description": "Optional array of supported subsampling formats, e.g. 4:2:0, if known.", + "type": "array", + "items": { "$ref": "SubsamplingFormat" } + } + ] + }, + { + "id": "GPUInfo", + "description": "Provides information about the GPU(s) on the system.", + "type": "object", + "properties": [ + { + "name": "devices", + "description": "The graphics devices on the system. Element 0 is the primary GPU.", + "type": "array", + "items": { "$ref": "GPUDevice" } + }, + { + "name": "auxAttributes", + "description": "An optional dictionary of additional GPU related attributes.", + "optional": true, + "type": "object" + }, + { + "name": "featureStatus", + "description": "An optional dictionary of graphics features and their status.", + "optional": true, + "type": "object" + }, + { + "name": "driverBugWorkarounds", + "description": "An optional array of GPU driver bug workarounds.", + "type": "array", + "items": { "type": "string" } + }, + { + "name": "videoDecoding", + "description": "Supported accelerated video decoding capabilities.", + "type": "array", + "items": { "$ref": "VideoDecodeAcceleratorCapability" } + }, + { + "name": "videoEncoding", + "description": "Supported accelerated video encoding capabilities.", + "type": "array", + "items": { "$ref": "VideoEncodeAcceleratorCapability" } + }, + { + "name": "imageDecoding", + "description": "Supported accelerated image decoding capabilities.", + "type": "array", + "items": { "$ref": "ImageDecodeAcceleratorCapability" } + } + ] + }, + { + "id": "ProcessInfo", + "description": "Represents process info.", + "type": "object", + "properties": [ + { "name": "type", "description": "Specifies process type.", "type": "string" }, + { "name": "id", "description": "Specifies process id.", "type": "integer" }, + { + "name": "cpuTime", + "description": "Specifies cumulative CPU usage in seconds across all threads of the\nprocess since the process start.", + "type": "number" + } + ] + } + ], + "commands": [ + { + "name": "getInfo", + "description": "Returns information about the system.", + "returns": [ + { "name": "gpu", "description": "Information about the GPUs on the system.", "$ref": "GPUInfo" }, + { + "name": "modelName", + "description": "A platform-dependent description of the model of the machine. On Mac OS, this is, for\nexample, 'MacBookPro'. Will be the empty string if not supported.", + "type": "string" + }, + { + "name": "modelVersion", + "description": "A platform-dependent description of the version of the machine. On Mac OS, this is, for\nexample, '10.1'. Will be the empty string if not supported.", + "type": "string" + }, + { + "name": "commandLine", + "description": "The command line string used to launch the browser. Will be the empty string if not\nsupported.", + "type": "string" + } + ] + }, + { + "name": "getFeatureState", + "description": "Returns information about the feature state.", + "parameters": [{ "name": "featureState", "type": "string" }], + "returns": [{ "name": "featureEnabled", "type": "boolean" }] + }, + { + "name": "getProcessInfo", + "description": "Returns information about all running processes.", + "returns": [ + { + "name": "processInfo", + "description": "An array of process info blocks.", + "type": "array", + "items": { "$ref": "ProcessInfo" } + } + ] + } + ] + }, + { + "domain": "Target", + "description": "Supports additional targets discovery and allows to attach to them.", + "types": [ + { "id": "TargetID", "type": "string" }, + { "id": "SessionID", "description": "Unique identifier of attached debugging session.", "type": "string" }, + { + "id": "TargetInfo", + "type": "object", + "properties": [ + { "name": "targetId", "$ref": "TargetID" }, + { "name": "type", "type": "string" }, + { "name": "title", "type": "string" }, + { "name": "url", "type": "string" }, + { "name": "attached", "description": "Whether the target has an attached client.", "type": "boolean" }, + { "name": "openerId", "description": "Opener target Id", "optional": true, "$ref": "TargetID" }, + { + "name": "canAccessOpener", + "description": "Whether the target has access to the originating window.", + "experimental": true, + "type": "boolean" + }, + { + "name": "openerFrameId", + "description": "Frame id of originating window (is only set if target has an opener).", + "experimental": true, + "optional": true, + "$ref": "Page.FrameId" + }, + { "name": "browserContextId", "experimental": true, "optional": true, "$ref": "Browser.BrowserContextID" }, + { + "name": "subtype", + "description": "Provides additional details for specific target types. For example, for\nthe type of \"page\", this may be set to \"portal\" or \"prerender\".", + "experimental": true, + "optional": true, + "type": "string" + } + ] + }, + { + "id": "FilterEntry", + "description": "A filter used by target query/discovery/auto-attach operations.", + "experimental": true, + "type": "object", + "properties": [ + { + "name": "exclude", + "description": "If set, causes exclusion of mathcing targets from the list.", + "optional": true, + "type": "boolean" + }, + { "name": "type", "description": "If not present, matches any type.", "optional": true, "type": "string" } + ] + }, + { + "id": "TargetFilter", + "description": "The entries in TargetFilter are matched sequentially against targets and\nthe first entry that matches determines if the target is included or not,\ndepending on the value of `exclude` field in the entry.\nIf filter is not specified, the one assumed is\n[{type: \"browser\", exclude: true}, {type: \"tab\", exclude: true}, {}]\n(i.e. include everything but `browser` and `tab`).", + "experimental": true, + "type": "array", + "items": { "$ref": "FilterEntry" } + }, + { + "id": "RemoteLocation", + "experimental": true, + "type": "object", + "properties": [ + { "name": "host", "type": "string" }, + { "name": "port", "type": "integer" } + ] + } + ], + "commands": [ + { + "name": "activateTarget", + "description": "Activates (focuses) the target.", + "parameters": [{ "name": "targetId", "$ref": "TargetID" }] + }, + { + "name": "attachToTarget", + "description": "Attaches to the target with given id.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { + "name": "flatten", + "description": "Enables \"flat\" access to the session via specifying sessionId attribute in the commands.\nWe plan to make this the default, deprecate non-flattened mode,\nand eventually retire it. See crbug.com/991325.", + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "sessionId", "description": "Id assigned to the session.", "$ref": "SessionID" }] + }, + { + "name": "attachToBrowserTarget", + "description": "Attaches to the browser target, only uses flat sessionId mode.", + "experimental": true, + "returns": [{ "name": "sessionId", "description": "Id assigned to the session.", "$ref": "SessionID" }] + }, + { + "name": "closeTarget", + "description": "Closes the target. If the target is a page that gets closed too.", + "parameters": [{ "name": "targetId", "$ref": "TargetID" }], + "returns": [ + { + "name": "success", + "description": "Always set to true. If an error occurs, the response indicates protocol error.", + "deprecated": true, + "type": "boolean" + } + ] + }, + { + "name": "exposeDevToolsProtocol", + "description": "Inject object to the target's main frame that provides a communication\nchannel with browser target.\n\nInjected object will be available as `window[bindingName]`.\n\nThe object has the follwing API:\n- `binding.send(json)` - a method to send messages over the remote debugging protocol\n- `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.", + "experimental": true, + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { + "name": "bindingName", + "description": "Binding name, 'cdp' if not specified.", + "optional": true, + "type": "string" + } + ] + }, + { + "name": "createBrowserContext", + "description": "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than\none.", + "experimental": true, + "parameters": [ + { + "name": "disposeOnDetach", + "description": "If specified, disposes this context when debugging session disconnects.", + "optional": true, + "type": "boolean" + }, + { + "name": "proxyServer", + "description": "Proxy server, similar to the one passed to --proxy-server", + "optional": true, + "type": "string" + }, + { + "name": "proxyBypassList", + "description": "Proxy bypass list, similar to the one passed to --proxy-bypass-list", + "optional": true, + "type": "string" + }, + { + "name": "originsWithUniversalNetworkAccess", + "description": "An optional list of origins to grant unlimited cross-origin access to.\nParts of the URL other than those constituting origin are ignored.", + "optional": true, + "type": "array", + "items": { "type": "string" } + } + ], + "returns": [ + { + "name": "browserContextId", + "description": "The id of the context created.", + "$ref": "Browser.BrowserContextID" + } + ] + }, + { + "name": "getBrowserContexts", + "description": "Returns all browser contexts created with `Target.createBrowserContext` method.", + "experimental": true, + "returns": [ + { + "name": "browserContextIds", + "description": "An array of browser context ids.", + "type": "array", + "items": { "$ref": "Browser.BrowserContextID" } + } + ] + }, + { + "name": "createTarget", + "description": "Creates a new page.", + "parameters": [ + { + "name": "url", + "description": "The initial URL the page will be navigated to. An empty string indicates about:blank.", + "type": "string" + }, + { + "name": "width", + "description": "Frame width in DIP (headless chrome only).", + "optional": true, + "type": "integer" + }, + { + "name": "height", + "description": "Frame height in DIP (headless chrome only).", + "optional": true, + "type": "integer" + }, + { + "name": "browserContextId", + "description": "The browser context to create the page in.", + "experimental": true, + "optional": true, + "$ref": "Browser.BrowserContextID" + }, + { + "name": "enableBeginFrameControl", + "description": "Whether BeginFrames for this target will be controlled via DevTools (headless chrome only,\nnot supported on MacOS yet, false by default).", + "experimental": true, + "optional": true, + "type": "boolean" + }, + { + "name": "newWindow", + "description": "Whether to create a new Window or Tab (chrome-only, false by default).", + "optional": true, + "type": "boolean" + }, + { + "name": "background", + "description": "Whether to create the target in background or foreground (chrome-only,\nfalse by default).", + "optional": true, + "type": "boolean" + }, + { + "name": "forTab", + "description": "Whether to create the target of type \"tab\".", + "experimental": true, + "optional": true, + "type": "boolean" + } + ], + "returns": [{ "name": "targetId", "description": "The id of the page opened.", "$ref": "TargetID" }] + }, + { + "name": "detachFromTarget", + "description": "Detaches session with given id.", + "parameters": [ + { "name": "sessionId", "description": "Session to detach.", "optional": true, "$ref": "SessionID" }, + { + "name": "targetId", + "description": "Deprecated.", + "deprecated": true, + "optional": true, + "$ref": "TargetID" + } + ] + }, + { + "name": "disposeBrowserContext", + "description": "Deletes a BrowserContext. All the belonging pages will be closed without calling their\nbeforeunload hooks.", + "experimental": true, + "parameters": [{ "name": "browserContextId", "$ref": "Browser.BrowserContextID" }] + }, + { + "name": "getTargetInfo", + "description": "Returns information about a target.", + "experimental": true, + "parameters": [{ "name": "targetId", "optional": true, "$ref": "TargetID" }], + "returns": [{ "name": "targetInfo", "$ref": "TargetInfo" }] + }, + { + "name": "getTargets", + "description": "Retrieves a list of available targets.", + "parameters": [ + { + "name": "filter", + "description": "Only targets matching filter will be reported. If filter is not specified\nand target discovery is currently enabled, a filter used for target discovery\nis used for consistency.", + "experimental": true, + "optional": true, + "$ref": "TargetFilter" + } + ], + "returns": [ + { + "name": "targetInfos", + "description": "The list of targets.", + "type": "array", + "items": { "$ref": "TargetInfo" } + } + ] + }, + { + "name": "sendMessageToTarget", + "description": "Sends protocol message over session with given id.\nConsider using flat mode instead; see commands attachToTarget, setAutoAttach,\nand crbug.com/991325.", + "deprecated": true, + "parameters": [ + { "name": "message", "type": "string" }, + { "name": "sessionId", "description": "Identifier of the session.", "optional": true, "$ref": "SessionID" }, + { + "name": "targetId", + "description": "Deprecated.", + "deprecated": true, + "optional": true, + "$ref": "TargetID" + } + ] + }, + { + "name": "setAutoAttach", + "description": "Controls whether to automatically attach to new targets which are considered to be related to\nthis one. When turned on, attaches to all existing related targets as well. When turned off,\nautomatically detaches from all currently attached targets.\nThis also clears all targets added by `autoAttachRelated` from the list of targets to watch\nfor creation of related targets.", + "experimental": true, + "parameters": [ + { "name": "autoAttach", "description": "Whether to auto-attach to related targets.", "type": "boolean" }, + { + "name": "waitForDebuggerOnStart", + "description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`\nto run paused targets.", + "type": "boolean" + }, + { + "name": "flatten", + "description": "Enables \"flat\" access to the session via specifying sessionId attribute in the commands.\nWe plan to make this the default, deprecate non-flattened mode,\nand eventually retire it. See crbug.com/991325.", + "optional": true, + "type": "boolean" + }, + { + "name": "filter", + "description": "Only targets matching filter will be attached.", + "experimental": true, + "optional": true, + "$ref": "TargetFilter" + } + ] + }, + { + "name": "autoAttachRelated", + "description": "Adds the specified target to the list of targets that will be monitored for any related target\ncreation (such as child frames, child workers and new versions of service worker) and reported\nthrough `attachedToTarget`. The specified target is also auto-attached.\nThis cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent\n`setAutoAttach`. Only available at the Browser target.", + "experimental": true, + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { + "name": "waitForDebuggerOnStart", + "description": "Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger`\nto run paused targets.", + "type": "boolean" + }, + { + "name": "filter", + "description": "Only targets matching filter will be attached.", + "experimental": true, + "optional": true, + "$ref": "TargetFilter" + } + ] + }, + { + "name": "setDiscoverTargets", + "description": "Controls whether to discover available targets and notify via\n`targetCreated/targetInfoChanged/targetDestroyed` events.", + "parameters": [ + { "name": "discover", "description": "Whether to discover available targets.", "type": "boolean" }, + { + "name": "filter", + "description": "Only targets matching filter will be attached. If `discover` is false,\n`filter` must be omitted or empty.", + "experimental": true, + "optional": true, + "$ref": "TargetFilter" + } + ] + }, + { + "name": "setRemoteLocations", + "description": "Enables target discovery for the specified locations, when `setDiscoverTargets` was set to\n`true`.", + "experimental": true, + "parameters": [ + { + "name": "locations", + "description": "List of remote locations.", + "type": "array", + "items": { "$ref": "RemoteLocation" } + } + ] + } + ], + "events": [ + { + "name": "attachedToTarget", + "description": "Issued when attached to target because of auto-attach or `attachToTarget` command.", + "experimental": true, + "parameters": [ + { + "name": "sessionId", + "description": "Identifier assigned to the session used to send/receive messages.", + "$ref": "SessionID" + }, + { "name": "targetInfo", "$ref": "TargetInfo" }, + { "name": "waitingForDebugger", "type": "boolean" } + ] + }, + { + "name": "detachedFromTarget", + "description": "Issued when detached from target for any reason (including `detachFromTarget` command). Can be\nissued multiple times per target if multiple sessions have been attached to it.", + "experimental": true, + "parameters": [ + { "name": "sessionId", "description": "Detached session identifier.", "$ref": "SessionID" }, + { + "name": "targetId", + "description": "Deprecated.", + "deprecated": true, + "optional": true, + "$ref": "TargetID" + } + ] + }, + { + "name": "receivedMessageFromTarget", + "description": "Notifies about a new protocol message received from the session (as reported in\n`attachedToTarget` event).", + "parameters": [ + { + "name": "sessionId", + "description": "Identifier of a session which sends a message.", + "$ref": "SessionID" + }, + { "name": "message", "type": "string" }, + { + "name": "targetId", + "description": "Deprecated.", + "deprecated": true, + "optional": true, + "$ref": "TargetID" + } + ] + }, + { + "name": "targetCreated", + "description": "Issued when a possible inspection target is created.", + "parameters": [{ "name": "targetInfo", "$ref": "TargetInfo" }] + }, + { + "name": "targetDestroyed", + "description": "Issued when a target is destroyed.", + "parameters": [{ "name": "targetId", "$ref": "TargetID" }] + }, + { + "name": "targetCrashed", + "description": "Issued when a target has crashed.", + "parameters": [ + { "name": "targetId", "$ref": "TargetID" }, + { "name": "status", "description": "Termination status type.", "type": "string" }, + { "name": "errorCode", "description": "Termination error code.", "type": "integer" } + ] + }, + { + "name": "targetInfoChanged", + "description": "Issued when some information about a target has changed. This only happens between\n`targetCreated` and `targetDestroyed`.", + "parameters": [{ "name": "targetInfo", "$ref": "TargetInfo" }] + } + ] + }, + { + "domain": "Tethering", + "description": "The Tethering domain defines methods and events for browser port binding.", + "experimental": true, + "commands": [ + { + "name": "bind", + "description": "Request browser port binding.", + "parameters": [{ "name": "port", "description": "Port number to bind.", "type": "integer" }] + }, + { + "name": "unbind", + "description": "Request browser port unbinding.", + "parameters": [{ "name": "port", "description": "Port number to unbind.", "type": "integer" }] + } + ], + "events": [ + { + "name": "accepted", + "description": "Informs that port was successfully bound and got a specified connection id.", + "parameters": [ + { "name": "port", "description": "Port number that was successfully bound.", "type": "integer" }, + { "name": "connectionId", "description": "Connection id to be used.", "type": "string" } + ] + } + ] + }, + { + "domain": "Tracing", + "experimental": true, + "dependencies": ["IO"], + "types": [ + { + "id": "MemoryDumpConfig", + "description": "Configuration for memory dump. Used only when \"memory-infra\" category is enabled.", + "type": "object" + }, + { + "id": "TraceConfig", + "type": "object", + "properties": [ + { + "name": "recordMode", + "description": "Controls how the trace buffer stores data.", + "optional": true, + "type": "string", + "enum": ["recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole"] + }, + { + "name": "traceBufferSizeInKb", + "description": "Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value\nof 200 MB would be used.", + "optional": true, + "type": "number" + }, + { + "name": "enableSampling", + "description": "Turns on JavaScript stack sampling.", + "optional": true, + "type": "boolean" + }, + { + "name": "enableSystrace", + "description": "Turns on system tracing.", + "optional": true, + "type": "boolean" + }, + { + "name": "enableArgumentFilter", + "description": "Turns on argument filter.", + "optional": true, + "type": "boolean" + }, + { + "name": "includedCategories", + "description": "Included category filters.", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "excludedCategories", + "description": "Excluded category filters.", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "syntheticDelays", + "description": "Configuration to synthesize the delays in tracing.", + "optional": true, + "type": "array", + "items": { "type": "string" } + }, + { + "name": "memoryDumpConfig", + "description": "Configuration for memory dump triggers. Used only when \"memory-infra\" category is enabled.", + "optional": true, + "$ref": "MemoryDumpConfig" + } + ] + }, + { + "id": "StreamFormat", + "description": "Data format of a trace. Can be either the legacy JSON format or the\nprotocol buffer format. Note that the JSON format will be deprecated soon.", + "type": "string", + "enum": ["json", "proto"] + }, + { + "id": "StreamCompression", + "description": "Compression type to use for traces returned via streams.", + "type": "string", + "enum": ["none", "gzip"] + }, + { + "id": "MemoryDumpLevelOfDetail", + "description": "Details exposed when memory request explicitly declared.\nKeep consistent with memory_dump_request_args.h and\nmemory_instrumentation.mojom", + "type": "string", + "enum": ["background", "light", "detailed"] + }, + { + "id": "TracingBackend", + "description": "Backend type to use for tracing. `chrome` uses the Chrome-integrated\ntracing service and is supported on all platforms. `system` is only\nsupported on Chrome OS and uses the Perfetto system tracing service.\n`auto` chooses `system` when the perfettoConfig provided to Tracing.start\nspecifies at least one non-Chrome data source; otherwise uses `chrome`.", + "type": "string", + "enum": ["auto", "chrome", "system"] + } + ], + "commands": [ + { "name": "end", "description": "Stop trace events collection." }, + { + "name": "getCategories", + "description": "Gets supported tracing categories.", + "returns": [ + { + "name": "categories", + "description": "A list of supported tracing categories.", + "type": "array", + "items": { "type": "string" } + } + ] + }, + { + "name": "recordClockSyncMarker", + "description": "Record a clock sync marker in the trace.", + "parameters": [{ "name": "syncId", "description": "The ID of this clock sync marker", "type": "string" }] + }, + { + "name": "requestMemoryDump", + "description": "Request a global memory dump.", + "parameters": [ + { + "name": "deterministic", + "description": "Enables more deterministic results by forcing garbage collection", + "optional": true, + "type": "boolean" + }, + { + "name": "levelOfDetail", + "description": "Specifies level of details in memory dump. Defaults to \"detailed\".", + "optional": true, + "$ref": "MemoryDumpLevelOfDetail" + } + ], + "returns": [ + { "name": "dumpGuid", "description": "GUID of the resulting global memory dump.", "type": "string" }, + { "name": "success", "description": "True iff the global memory dump succeeded.", "type": "boolean" } + ] + }, + { + "name": "start", + "description": "Start trace events collection.", + "parameters": [ + { + "name": "categories", + "description": "Category/tag filter", + "deprecated": true, + "optional": true, + "type": "string" + }, + { + "name": "options", + "description": "Tracing options", + "deprecated": true, + "optional": true, + "type": "string" + }, + { + "name": "bufferUsageReportingInterval", + "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds", + "optional": true, + "type": "number" + }, + { + "name": "transferMode", + "description": "Whether to report trace events as series of dataCollected events or to save trace to a\nstream (defaults to `ReportEvents`).", + "optional": true, + "type": "string", + "enum": ["ReportEvents", "ReturnAsStream"] + }, + { + "name": "streamFormat", + "description": "Trace data format to use. This only applies when using `ReturnAsStream`\ntransfer mode (defaults to `json`).", + "optional": true, + "$ref": "StreamFormat" + }, + { + "name": "streamCompression", + "description": "Compression format to use. This only applies when using `ReturnAsStream`\ntransfer mode (defaults to `none`)", + "optional": true, + "$ref": "StreamCompression" + }, + { "name": "traceConfig", "optional": true, "$ref": "TraceConfig" }, + { + "name": "perfettoConfig", + "description": "Base64-encoded serialized perfetto.protos.TraceConfig protobuf message\nWhen specified, the parameters `categories`, `options`, `traceConfig`\nare ignored. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { + "name": "tracingBackend", + "description": "Backend type (defaults to `auto`)", + "optional": true, + "$ref": "TracingBackend" + } + ] + } + ], + "events": [ + { + "name": "bufferUsage", + "parameters": [ + { + "name": "percentFull", + "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its\ntotal size.", + "optional": true, + "type": "number" + }, + { + "name": "eventCount", + "description": "An approximate number of events in the trace log.", + "optional": true, + "type": "number" + }, + { + "name": "value", + "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its\ntotal size.", + "optional": true, + "type": "number" + } + ] + }, + { + "name": "dataCollected", + "description": "Contains a bucket of collected trace events. When tracing is stopped collected events will be\nsent as a sequence of dataCollected events followed by tracingComplete event.", + "parameters": [{ "name": "value", "type": "array", "items": { "type": "object" } }] + }, + { + "name": "tracingComplete", + "description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were\ndelivered via dataCollected events.", + "parameters": [ + { + "name": "dataLossOccurred", + "description": "Indicates whether some trace data is known to have been lost, e.g. because the trace ring\nbuffer wrapped around.", + "type": "boolean" + }, + { + "name": "stream", + "description": "A handle of the stream that holds resulting trace data.", + "optional": true, + "$ref": "IO.StreamHandle" + }, + { + "name": "traceFormat", + "description": "Trace data format of returned stream.", + "optional": true, + "$ref": "StreamFormat" + }, + { + "name": "streamCompression", + "description": "Compression format of returned stream.", + "optional": true, + "$ref": "StreamCompression" + } + ] + } + ] + }, + { + "domain": "WebAudio", + "description": "This domain allows inspection of Web Audio API.\nhttps://webaudio.github.io/web-audio-api/", + "experimental": true, + "types": [ + { + "id": "GraphObjectId", + "description": "An unique ID for a graph object (AudioContext, AudioNode, AudioParam) in Web Audio API", + "type": "string" + }, + { + "id": "ContextType", + "description": "Enum of BaseAudioContext types", + "type": "string", + "enum": ["realtime", "offline"] + }, + { + "id": "ContextState", + "description": "Enum of AudioContextState from the spec", + "type": "string", + "enum": ["suspended", "running", "closed"] + }, + { "id": "NodeType", "description": "Enum of AudioNode types", "type": "string" }, + { + "id": "ChannelCountMode", + "description": "Enum of AudioNode::ChannelCountMode from the spec", + "type": "string", + "enum": ["clamped-max", "explicit", "max"] + }, + { + "id": "ChannelInterpretation", + "description": "Enum of AudioNode::ChannelInterpretation from the spec", + "type": "string", + "enum": ["discrete", "speakers"] + }, + { "id": "ParamType", "description": "Enum of AudioParam types", "type": "string" }, + { + "id": "AutomationRate", + "description": "Enum of AudioParam::AutomationRate from the spec", + "type": "string", + "enum": ["a-rate", "k-rate"] + }, + { + "id": "ContextRealtimeData", + "description": "Fields in AudioContext that change in real-time.", + "type": "object", + "properties": [ + { + "name": "currentTime", + "description": "The current context time in second in BaseAudioContext.", + "type": "number" + }, + { + "name": "renderCapacity", + "description": "The time spent on rendering graph divided by render quantum duration,\nand multiplied by 100. 100 means the audio renderer reached the full\ncapacity and glitch may occur.", + "type": "number" + }, + { "name": "callbackIntervalMean", "description": "A running mean of callback interval.", "type": "number" }, + { + "name": "callbackIntervalVariance", + "description": "A running variance of callback interval.", + "type": "number" + } + ] + }, + { + "id": "BaseAudioContext", + "description": "Protocol object for BaseAudioContext", + "type": "object", + "properties": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "contextType", "$ref": "ContextType" }, + { "name": "contextState", "$ref": "ContextState" }, + { "name": "realtimeData", "optional": true, "$ref": "ContextRealtimeData" }, + { + "name": "callbackBufferSize", + "description": "Platform-dependent callback buffer size.", + "type": "number" + }, + { + "name": "maxOutputChannelCount", + "description": "Number of output channels supported by audio hardware in use.", + "type": "number" + }, + { "name": "sampleRate", "description": "Context sample rate.", "type": "number" } + ] + }, + { + "id": "AudioListener", + "description": "Protocol object for AudioListener", + "type": "object", + "properties": [ + { "name": "listenerId", "$ref": "GraphObjectId" }, + { "name": "contextId", "$ref": "GraphObjectId" } + ] + }, + { + "id": "AudioNode", + "description": "Protocol object for AudioNode", + "type": "object", + "properties": [ + { "name": "nodeId", "$ref": "GraphObjectId" }, + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "nodeType", "$ref": "NodeType" }, + { "name": "numberOfInputs", "type": "number" }, + { "name": "numberOfOutputs", "type": "number" }, + { "name": "channelCount", "type": "number" }, + { "name": "channelCountMode", "$ref": "ChannelCountMode" }, + { "name": "channelInterpretation", "$ref": "ChannelInterpretation" } + ] + }, + { + "id": "AudioParam", + "description": "Protocol object for AudioParam", + "type": "object", + "properties": [ + { "name": "paramId", "$ref": "GraphObjectId" }, + { "name": "nodeId", "$ref": "GraphObjectId" }, + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "paramType", "$ref": "ParamType" }, + { "name": "rate", "$ref": "AutomationRate" }, + { "name": "defaultValue", "type": "number" }, + { "name": "minValue", "type": "number" }, + { "name": "maxValue", "type": "number" } + ] + } + ], + "commands": [ + { "name": "enable", "description": "Enables the WebAudio domain and starts sending context lifetime events." }, + { "name": "disable", "description": "Disables the WebAudio domain." }, + { + "name": "getRealtimeData", + "description": "Fetch the realtime data from the registered contexts.", + "parameters": [{ "name": "contextId", "$ref": "GraphObjectId" }], + "returns": [{ "name": "realtimeData", "$ref": "ContextRealtimeData" }] + } + ], + "events": [ + { + "name": "contextCreated", + "description": "Notifies that a new BaseAudioContext has been created.", + "parameters": [{ "name": "context", "$ref": "BaseAudioContext" }] + }, + { + "name": "contextWillBeDestroyed", + "description": "Notifies that an existing BaseAudioContext will be destroyed.", + "parameters": [{ "name": "contextId", "$ref": "GraphObjectId" }] + }, + { + "name": "contextChanged", + "description": "Notifies that existing BaseAudioContext has changed some properties (id stays the same)..", + "parameters": [{ "name": "context", "$ref": "BaseAudioContext" }] + }, + { + "name": "audioListenerCreated", + "description": "Notifies that the construction of an AudioListener has finished.", + "parameters": [{ "name": "listener", "$ref": "AudioListener" }] + }, + { + "name": "audioListenerWillBeDestroyed", + "description": "Notifies that a new AudioListener has been created.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "listenerId", "$ref": "GraphObjectId" } + ] + }, + { + "name": "audioNodeCreated", + "description": "Notifies that a new AudioNode has been created.", + "parameters": [{ "name": "node", "$ref": "AudioNode" }] + }, + { + "name": "audioNodeWillBeDestroyed", + "description": "Notifies that an existing AudioNode has been destroyed.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "nodeId", "$ref": "GraphObjectId" } + ] + }, + { + "name": "audioParamCreated", + "description": "Notifies that a new AudioParam has been created.", + "parameters": [{ "name": "param", "$ref": "AudioParam" }] + }, + { + "name": "audioParamWillBeDestroyed", + "description": "Notifies that an existing AudioParam has been destroyed.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "nodeId", "$ref": "GraphObjectId" }, + { "name": "paramId", "$ref": "GraphObjectId" } + ] + }, + { + "name": "nodesConnected", + "description": "Notifies that two AudioNodes are connected.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "sourceId", "$ref": "GraphObjectId" }, + { "name": "destinationId", "$ref": "GraphObjectId" }, + { "name": "sourceOutputIndex", "optional": true, "type": "number" }, + { "name": "destinationInputIndex", "optional": true, "type": "number" } + ] + }, + { + "name": "nodesDisconnected", + "description": "Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "sourceId", "$ref": "GraphObjectId" }, + { "name": "destinationId", "$ref": "GraphObjectId" }, + { "name": "sourceOutputIndex", "optional": true, "type": "number" }, + { "name": "destinationInputIndex", "optional": true, "type": "number" } + ] + }, + { + "name": "nodeParamConnected", + "description": "Notifies that an AudioNode is connected to an AudioParam.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "sourceId", "$ref": "GraphObjectId" }, + { "name": "destinationId", "$ref": "GraphObjectId" }, + { "name": "sourceOutputIndex", "optional": true, "type": "number" } + ] + }, + { + "name": "nodeParamDisconnected", + "description": "Notifies that an AudioNode is disconnected to an AudioParam.", + "parameters": [ + { "name": "contextId", "$ref": "GraphObjectId" }, + { "name": "sourceId", "$ref": "GraphObjectId" }, + { "name": "destinationId", "$ref": "GraphObjectId" }, + { "name": "sourceOutputIndex", "optional": true, "type": "number" } + ] + } + ] + }, + { + "domain": "WebAuthn", + "description": "This domain allows configuring virtual authenticators to test the WebAuthn\nAPI.", + "experimental": true, + "types": [ + { "id": "AuthenticatorId", "type": "string" }, + { "id": "AuthenticatorProtocol", "type": "string", "enum": ["u2f", "ctap2"] }, + { "id": "Ctap2Version", "type": "string", "enum": ["ctap2_0", "ctap2_1"] }, + { "id": "AuthenticatorTransport", "type": "string", "enum": ["usb", "nfc", "ble", "cable", "internal"] }, + { + "id": "VirtualAuthenticatorOptions", + "type": "object", + "properties": [ + { "name": "protocol", "$ref": "AuthenticatorProtocol" }, + { + "name": "ctap2Version", + "description": "Defaults to ctap2_0. Ignored if |protocol| == u2f.", + "optional": true, + "$ref": "Ctap2Version" + }, + { "name": "transport", "$ref": "AuthenticatorTransport" }, + { "name": "hasResidentKey", "description": "Defaults to false.", "optional": true, "type": "boolean" }, + { "name": "hasUserVerification", "description": "Defaults to false.", "optional": true, "type": "boolean" }, + { + "name": "hasLargeBlob", + "description": "If set to true, the authenticator will support the largeBlob extension.\nhttps://w3c.github.io/webauthn#largeBlob\nDefaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "hasCredBlob", + "description": "If set to true, the authenticator will support the credBlob extension.\nhttps://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension\nDefaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "hasMinPinLength", + "description": "If set to true, the authenticator will support the minPinLength extension.\nhttps://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension\nDefaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "hasPrf", + "description": "If set to true, the authenticator will support the prf extension.\nhttps://w3c.github.io/webauthn/#prf-extension\nDefaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "automaticPresenceSimulation", + "description": "If set to true, tests of user presence will succeed immediately.\nOtherwise, they will not be resolved. Defaults to true.", + "optional": true, + "type": "boolean" + }, + { + "name": "isUserVerified", + "description": "Sets whether User Verification succeeds or fails for an authenticator.\nDefaults to false.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "id": "Credential", + "type": "object", + "properties": [ + { "name": "credentialId", "type": "string" }, + { "name": "isResidentCredential", "type": "boolean" }, + { + "name": "rpId", + "description": "Relying Party ID the credential is scoped to. Must be set when adding a\ncredential.", + "optional": true, + "type": "string" + }, + { + "name": "privateKey", + "description": "The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)", + "type": "string" + }, + { + "name": "userHandle", + "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the\ncredential to a specific user. (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + }, + { + "name": "signCount", + "description": "Signature counter. This is incremented by one for each successful\nassertion.\nSee https://w3c.github.io/webauthn/#signature-counter", + "type": "integer" + }, + { + "name": "largeBlob", + "description": "The large blob associated with the credential.\nSee https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)", + "optional": true, + "type": "string" + } + ] + } + ], + "commands": [ + { + "name": "enable", + "description": "Enable the WebAuthn domain and start intercepting credential storage and\nretrieval with a virtual authenticator.", + "parameters": [ + { + "name": "enableUI", + "description": "Whether to enable the WebAuthn user interface. Enabling the UI is\nrecommended for debugging and demo purposes, as it is closer to the real\nexperience. Disabling the UI is recommended for automated testing.\nSupported at the embedder's discretion if UI is available.\nDefaults to false.", + "optional": true, + "type": "boolean" + } + ] + }, + { "name": "disable", "description": "Disable the WebAuthn domain." }, + { + "name": "addVirtualAuthenticator", + "description": "Creates and adds a virtual authenticator.", + "parameters": [{ "name": "options", "$ref": "VirtualAuthenticatorOptions" }], + "returns": [{ "name": "authenticatorId", "$ref": "AuthenticatorId" }] + }, + { + "name": "setResponseOverrideBits", + "description": "Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { + "name": "isBogusSignature", + "description": "If isBogusSignature is set, overrides the signature in the authenticator response to be zero.\nDefaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "isBadUV", + "description": "If isBadUV is set, overrides the UV bit in the flags in the authenticator response to\nbe zero. Defaults to false.", + "optional": true, + "type": "boolean" + }, + { + "name": "isBadUP", + "description": "If isBadUP is set, overrides the UP bit in the flags in the authenticator response to\nbe zero. Defaults to false.", + "optional": true, + "type": "boolean" + } + ] + }, + { + "name": "removeVirtualAuthenticator", + "description": "Removes the given authenticator.", + "parameters": [{ "name": "authenticatorId", "$ref": "AuthenticatorId" }] + }, + { + "name": "addCredential", + "description": "Adds the credential to the specified authenticator.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "credential", "$ref": "Credential" } + ] + }, + { + "name": "getCredential", + "description": "Returns a single credential stored in the given virtual authenticator that\nmatches the credential ID.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "credentialId", "type": "string" } + ], + "returns": [{ "name": "credential", "$ref": "Credential" }] + }, + { + "name": "getCredentials", + "description": "Returns all the credentials stored in the given virtual authenticator.", + "parameters": [{ "name": "authenticatorId", "$ref": "AuthenticatorId" }], + "returns": [{ "name": "credentials", "type": "array", "items": { "$ref": "Credential" } }] + }, + { + "name": "removeCredential", + "description": "Removes a credential from the authenticator.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "credentialId", "type": "string" } + ] + }, + { + "name": "clearCredentials", + "description": "Clears all the credentials from the specified device.", + "parameters": [{ "name": "authenticatorId", "$ref": "AuthenticatorId" }] + }, + { + "name": "setUserVerified", + "description": "Sets whether User Verification succeeds or fails for an authenticator.\nThe default is true.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "isUserVerified", "type": "boolean" } + ] + }, + { + "name": "setAutomaticPresenceSimulation", + "description": "Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator.\nThe default is true.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "enabled", "type": "boolean" } + ] + } + ], + "events": [ + { + "name": "credentialAdded", + "description": "Triggered when a credential is added to an authenticator.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "credential", "$ref": "Credential" } + ] + }, + { + "name": "credentialAsserted", + "description": "Triggered when a credential is used in a webauthn assertion.", + "parameters": [ + { "name": "authenticatorId", "$ref": "AuthenticatorId" }, + { "name": "credential", "$ref": "Credential" } + ] + } + ] + } + ] +} diff --git a/packages/bun-debug-adapter-protocol/debugger/preview.ts b/packages/bun-inspector-protocol/src/util/preview.ts index 6012623d2..c6d748304 100644 --- a/packages/bun-debug-adapter-protocol/debugger/preview.ts +++ b/packages/bun-inspector-protocol/src/util/preview.ts @@ -1,6 +1,6 @@ -import type { JSC } from "../../bun-inspector-protocol"; +import type { JSC } from "../protocol"; -export function remoteObjectToString(remoteObject: JSC.Runtime.RemoteObject): string { +export function remoteObjectToString(remoteObject: JSC.Runtime.RemoteObject, topLevel?: boolean): string { const { type, subtype, value, description, className, preview } = remoteObject; switch (type) { case "undefined": @@ -9,6 +9,9 @@ export function remoteObjectToString(remoteObject: JSC.Runtime.RemoteObject): st case "number": return description ?? JSON.stringify(value); case "string": + if (topLevel) { + return String(value ?? description); + } return JSON.stringify(value ?? description); case "symbol": case "bigint": diff --git a/packages/bun-debug-adapter-protocol/debugger/__snapshots__/preview.test.ts.snap b/packages/bun-inspector-protocol/test/util/__snapshots__/preview.test.ts.snap index 0acc17575..0acc17575 100644 --- a/packages/bun-debug-adapter-protocol/debugger/__snapshots__/preview.test.ts.snap +++ b/packages/bun-inspector-protocol/test/util/__snapshots__/preview.test.ts.snap diff --git a/packages/bun-debug-adapter-protocol/debugger/fixtures/preview.js b/packages/bun-inspector-protocol/test/util/preview.js index 15062240b..15062240b 100644 --- a/packages/bun-debug-adapter-protocol/debugger/fixtures/preview.js +++ b/packages/bun-inspector-protocol/test/util/preview.js diff --git a/packages/bun-debug-adapter-protocol/debugger/preview.test.ts b/packages/bun-inspector-protocol/test/util/preview.test.ts index 666913719..99214ef0e 100644 --- a/packages/bun-debug-adapter-protocol/debugger/preview.test.ts +++ b/packages/bun-inspector-protocol/test/util/preview.test.ts @@ -1,9 +1,8 @@ import { beforeAll, afterAll, test, expect } from "bun:test"; -import type { JSC } from "../../bun-inspector-protocol"; -import { WebSocketInspector } from "../../bun-inspector-protocol"; import type { PipedSubprocess } from "bun"; import { spawn } from "bun"; -import { remoteObjectToString } from "./preview"; +import type { JSC } from "../.."; +import { WebSocketInspector, remoteObjectToString } from "../.."; let subprocess: PipedSubprocess | undefined; let objects: JSC.Runtime.RemoteObject[] = []; @@ -11,7 +10,7 @@ let objects: JSC.Runtime.RemoteObject[] = []; beforeAll(async () => { subprocess = spawn({ cwd: import.meta.dir, - cmd: [process.argv0, "--inspect-wait=0", "fixtures/preview.js"], + cmd: [process.argv0, "--inspect-wait=0", "preview.js"], stdout: "pipe", stderr: "pipe", stdin: "pipe", diff --git a/packages/bun-inspector-protocol/tsconfig.json b/packages/bun-inspector-protocol/tsconfig.json index f954cc16f..4710b24d4 100644 --- a/packages/bun-inspector-protocol/tsconfig.json +++ b/packages/bun-inspector-protocol/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { "lib": ["ESNext"], - "module": "esnext", - "target": "esnext", - "moduleResolution": "nodenext", + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "NodeNext", "moduleDetection": "force", "strict": true, "downlevelIteration": true, @@ -13,7 +13,6 @@ "inlineSourceMap": true, "allowJs": true, "outDir": "dist", - "types": ["node"] }, "include": [".", "../bun-types/index.d.ts"] } diff --git a/packages/bun-vscode/.gitignore b/packages/bun-vscode/.gitignore index 9db2648e4..cafc85cea 100644 --- a/packages/bun-vscode/.gitignore +++ b/packages/bun-vscode/.gitignore @@ -1,2 +1,3 @@ node_modules extension +example/.vscode diff --git a/packages/bun-vscode/.vscode/launch.json b/packages/bun-vscode/.vscode/launch.json index 3ec1574d3..5922fb1b6 100644 --- a/packages/bun-vscode/.vscode/launch.json +++ b/packages/bun-vscode/.vscode/launch.json @@ -5,22 +5,28 @@ "name": "Extension", "type": "extensionHost", "request": "launch", + "env": { + "NODE_ENV": "development" + }, "args": ["--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/example"], "outFiles": ["${workspaceFolder}/dist/**/*.js"], - "preLaunchTask": "Build (watch)" + "preLaunchTask": "Build" }, { "name": "Extension (web)", "type": "extensionHost", "debugWebWorkerHost": true, "request": "launch", + "env": { + "NODE_ENV": "development" + }, "args": [ "--extensionDevelopmentPath=${workspaceFolder}", "--extensionDevelopmentKind=web", "${workspaceFolder}/example" ], "outFiles": ["${workspaceFolder}/dist/**/*.js"], - "preLaunchTask": "Build (watch)" + "preLaunchTask": "Build" } ] } diff --git a/packages/bun-vscode/.vscode/tasks.json b/packages/bun-vscode/.vscode/tasks.json index a471df3ec..8675db611 100644 --- a/packages/bun-vscode/.vscode/tasks.json +++ b/packages/bun-vscode/.vscode/tasks.json @@ -6,13 +6,6 @@ "type": "shell", "command": "bun run build", "problemMatcher": "$esbuild" - }, - { - "label": "Build (watch)", - "type": "shell", - "command": "bun run build:watch", - "isBackground": true, - "problemMatcher": "$esbuild-watch" } ] } diff --git a/packages/bun-vscode/LICENSE b/packages/bun-vscode/LICENSE new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/packages/bun-vscode/LICENSE diff --git a/packages/bun-vscode/src/assets/icon-small.png b/packages/bun-vscode/assets/icon-small.png Binary files differindex 69bc385e8..69bc385e8 100644 --- a/packages/bun-vscode/src/assets/icon-small.png +++ b/packages/bun-vscode/assets/icon-small.png diff --git a/packages/bun-vscode/src/assets/icon.png b/packages/bun-vscode/assets/icon.png Binary files differindex 29cda9124..29cda9124 100644 --- a/packages/bun-vscode/src/assets/icon.png +++ b/packages/bun-vscode/assets/icon.png diff --git a/packages/bun-vscode/src/resources/package.json b/packages/bun-vscode/assets/package.json index 021c8125e..021c8125e 100644 --- a/packages/bun-vscode/src/resources/package.json +++ b/packages/bun-vscode/assets/package.json diff --git a/packages/bun-vscode/bun.lockb b/packages/bun-vscode/bun.lockb Binary files differindex c0949dd2d..599310c25 100755 --- a/packages/bun-vscode/bun.lockb +++ b/packages/bun-vscode/bun.lockb diff --git a/packages/bun-vscode/example/.vscode/launch.json b/packages/bun-vscode/example/.vscode/launch.json deleted file mode 100644 index 7ab446fad..000000000 --- a/packages/bun-vscode/example/.vscode/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "type": "bun", - "request": "launch", - "name": "Debug Bun", - "program": "${file}", - "watch": "hot" - }, - { - "type": "bun", - "request": "attach", - "name": "Attach to Bun", - "url": "ws://localhost:6499/", - } - ] -} diff --git a/packages/bun-vscode/example/bun.lockb b/packages/bun-vscode/example/bun.lockb Binary files differindex b6516d9ed..7153db03e 100755 --- a/packages/bun-vscode/example/bun.lockb +++ b/packages/bun-vscode/example/bun.lockb diff --git a/packages/bun-vscode/example/example-sourcemap.js b/packages/bun-vscode/example/example-sourcemap.js deleted file mode 100644 index 82035bedb..000000000 --- a/packages/bun-vscode/example/example-sourcemap.js +++ /dev/null @@ -1,30 +0,0 @@ -// @bun -// example.ts -var a = function (request) { - b(request); -}; -var b = function (request) { - c(request); -}; -var c = function (request) { - console.log(request); -}; -var example_default = { - async fetch(request, server) { - a(request); - const coolThing = new SuperCoolThing(); - coolThing.doCoolThing(); - debugger; - return new Response(request.url); - }, -}; - -class SuperCoolThing { - doCoolThing() { - console.log("super cool thing!"); - } -} -export { example_default as default }; - -//# debugId=9BB0B773A8E4771564756e2164756e21 -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiZXhhbXBsZS50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsKICAgICJpbXBvcnQgdHlwZSB7IFNlcnZlciB9IGZyb20gXCJidW5cIjtcblxuZXhwb3J0IGRlZmF1bHQge1xuICBhc3luYyBmZXRjaChyZXF1ZXN0OiBSZXF1ZXN0LCBzZXJ2ZXI6IFNlcnZlcik6IFByb21pc2U8UmVzcG9uc2U+IHtcbiAgICBhKHJlcXVlc3QpO1xuICAgIGNvbnN0IGNvb2xUaGluZzogQ29vbFRoaW5nID0gbmV3IFN1cGVyQ29vbFRoaW5nKCk7XG4gICAgY29vbFRoaW5nLmRvQ29vbFRoaW5nKCk7XG4gICAgZGVidWdnZXI7XG4gICAgcmV0dXJuIG5ldyBSZXNwb25zZShyZXF1ZXN0LnVybCk7XG4gIH1cbn07XG5cbi8vIGFcbmZ1bmN0aW9uIGEocmVxdWVzdDogUmVxdWVzdCk6IHZvaWQge1xuICBiKHJlcXVlc3QpO1xufVxuXG4vLyBiXG5mdW5jdGlvbiBiKHJlcXVlc3Q6IFJlcXVlc3QpOiB2b2lkIHtcbiAgYyhyZXF1ZXN0KTtcbn1cblxuLy8gY1xuZnVuY3Rpb24gYyhyZXF1ZXN0OiBSZXF1ZXN0KSB7XG4gIGNvbnNvbGUubG9nKHJlcXVlc3QpO1xufVxuXG5pbnRlcmZhY2UgQ29vbFRoaW5nIHtcbiAgZG9Db29sVGhpbmcoKTogdm9pZDtcbn1cblxuY2xhc3MgU3VwZXJDb29sVGhpbmcgaW1wbGVtZW50cyBDb29sVGhpbmcge1xuICBkb0Nvb2xUaGluZygpOiB2b2lkIHtcbiAgICBjb25zb2xlLmxvZyhcInN1cGVyIGNvb2wgdGhpbmchXCIpO1xuICB9XG59XG4iCiAgXSwKICAibWFwcGluZ3MiOiAiOztBQS8vLy8vZkFhQSxJQUFTLFlBQUMsQ0FBQyxTQUF3QjtBQUNqQyxJQUFFLE9BQU87QUFBQTtBQUlYLElBQVMsWUFBQyxDQUFDLFNBQXdCO0FBQ2pDLElBQUUsT0FBTztBQUFBO0FBSVgsSUFBUyxZQUFDLENBQUMsU0FBa0I7QUFDM0IsVUFBUSxJQUFJLE9BQU87QUFBQTtBQXRCckIsSUFBZTtBQUFBLE9BQ1AsTUFBSyxDQUFDLFNBQWtCLFFBQW1DO0FBQy9ELE1BQUUsT0FBTztBQUNULFVBQU0sWUFBdUIsSUFBSTtBQUNqQyxjQUFVLFlBQVk7QUFDdEI7QUFDQSxXQUFPLElBQUksU0FBUyxRQUFRLEdBQUc7QUFBQTtBQUVuQztBQXFCQTtBQUFBLE1BQU0sZUFBb0M7QUFBQSxFQUN4QyxXQUFXLEdBQVM7QUFDbEIsWUFBUSxJQUFJLG1CQUFtQjtBQUFBO0FBRW5DOyIsCiAgImRlYnVnSWQiOiAiOUJCMEI3NzNBOEU0NzcxNTY0NzU2ZTIxNjQ3NTZlMjEiLAogICJuYW1lcyI6IFtdCn0= diff --git a/packages/bun-vscode/example/example.js b/packages/bun-vscode/example/example.js deleted file mode 100644 index 31831824b..000000000 --- a/packages/bun-vscode/example/example.js +++ /dev/null @@ -1,63 +0,0 @@ -// @bun -const express = import.meta.require("express"); -const app = express(); -import { readFile } from "node:fs/promises"; - -app - .get("/", (req, res) => { - console.log("I am logging a request!??"); - readFile(import.meta.path, "utf-8").then(data => { - console.log(data.length); - debugger; - res.send("hello world"); - }); - }) - .listen(3000); - -const va = 1; -let vb = 2; -var vc = 3; - -function fa() { - fb(); -} - -function fb() { - fc(); -} - -function fc() { - fd(); -} - -function fd() { - let map = new Map([ - [1, 2], - [2, 3], - [3, 4], - ]); - let set = new Set([1, 2, 3, 4, 5]); - let arr = [1, 2, 3, 4, 5]; - let obj = { - a: 1, - b: 2, - c: 3, - }; - function fd1() { - let date = new Date(); - console.log(new Error().stack); - debugger; - console.log(date); - } - fd1(); -} - -Bun.serve({ - port: 9229, - inspector: true, - development: true, - fetch(request, server) { - // console.log(request); - return new Response(request.url); - }, -}); diff --git a/packages/bun-vscode/example/example.test.ts b/packages/bun-vscode/example/example.test.ts new file mode 100644 index 000000000..a9da929eb --- /dev/null +++ b/packages/bun-vscode/example/example.test.ts @@ -0,0 +1,11 @@ +import { describe, test, expect } from "bun:test"; + +describe("example", () => { + test("it works", () => { + expect(1).toBe(1); + expect(1).not.toBe(2); + expect(() => { + throw new Error("error"); + }).toThrow(); + }); +}); diff --git a/packages/bun-vscode/example/example.ts b/packages/bun-vscode/example/example.ts index 386b97f7c..536852902 100644 --- a/packages/bun-vscode/example/example.ts +++ b/packages/bun-vscode/example/example.ts @@ -4,7 +4,7 @@ export default { const coolThing: CoolThing = new SuperCoolThing(); coolThing.doCoolThing(); debugger; - return new Response("HELLO WORLD"); + return new Response("BAI BAI"); }, }; diff --git a/packages/bun-vscode/example/package.json b/packages/bun-vscode/example/package.json index 0d7d79529..602fba159 100644 --- a/packages/bun-vscode/example/package.json +++ b/packages/bun-vscode/example/package.json @@ -1,4 +1,6 @@ { + "private": true, + "name": "example", "dependencies": { "elysia": "^0.6.3", "express": "^4.18.2", @@ -7,5 +9,11 @@ }, "trustedDependencies": [ "mime" - ] -} + ], + "devDependencies": { + "bun-types": "latest" + }, + "peerDependencies": { + "typescript": "^5.0.0" + } +}
\ No newline at end of file diff --git a/packages/bun-vscode/example/tsconfig.json b/packages/bun-vscode/example/tsconfig.json new file mode 100644 index 000000000..1449bc3d9 --- /dev/null +++ b/packages/bun-vscode/example/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "esnext", + "target": "esnext", + "moduleResolution": "bundler", + "moduleDetection": "force", + "allowImportingTsExtensions": true, + "noEmit": true, + "composite": true, + "strict": true, + "downlevelIteration": true, + "skipLibCheck": true, + "jsx": "preserve", + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "allowJs": true, + "types": [ + "bun-types" // add Bun global + ] + } +} diff --git a/packages/bun-vscode/package.json b/packages/bun-vscode/package.json index c959cd8ab..985730196 100644 --- a/packages/bun-vscode/package.json +++ b/packages/bun-vscode/package.json @@ -7,18 +7,14 @@ "url": "https://github.com/oven-sh/bun" }, "main": "dist/extension.js", - "dependencies": { - "semver": "^7.5.4", - "source-map-js": "^1.0.2", - "ws": "^8.13.0" - }, "devDependencies": { "@types/vscode": "^1.81.0", "@vscode/debugadapter": "^1.56.0", "@vscode/debugadapter-testsupport": "^1.56.0", + "@vscode/vsce": "^2.20.1", "bun-types": "^0.7.3", - "typescript": "^5.0.0", - "esbuild": "^0.19.2" + "esbuild": "^0.19.2", + "typescript": "^5.0.0" }, "activationEvents": [ "onLanguage:javascript", @@ -59,14 +55,16 @@ "commands": [ { "command": "extension.bun.runFile", - "title": "Run File", + "title": "Run Bun", + "shortTitle": "Run", "category": "Bun", "enablement": "!inDebugMode", "icon": "$(play)" }, { "command": "extension.bun.debugFile", - "title": "Debug File", + "title": "Debug Bun", + "shortTitle": "Debug", "category": "Bun", "enablement": "!inDebugMode", "icon": "$(debug-alt)" @@ -169,6 +167,11 @@ false, "hot" ], + "default": false + }, + "debug": { + "type": "boolean", + "description": "If the process should be started in debug mode.", "default": true } } @@ -177,48 +180,11 @@ "properties": { "url": { "type": "string", - "description": "The URL of the Bun process to attach to.", - "default": "ws://localhost:6499/" + "description": "The URL of the Bun process to attach to." } } } - }, - "initialConfigurations": [ - { - "type": "bun", - "request": "launch", - "name": "Bun: Debug", - "program": "${file}" - }, - { - "type": "bun", - "request": "attach", - "name": "Bun: Attach", - "url": "ws://localhost:6499/" - } - ], - "configurationSnippets": [ - { - "label": "Bun: Debug", - "description": "A new configuration for 'debugging' a Bun process.", - "body": { - "type": "bun", - "request": "launch", - "name": "Ask for file name", - "program": "^\"\\${file}\"" - } - }, - { - "label": "Bun: Attach", - "description": "A new configuration for 'attaching' to a running Bun process.", - "body": { - "type": "bun", - "request": "attach", - "name": "Attach to Bun", - "url": "ws://localhost:6499/" - } - } - ] + } } ], "languages": [ @@ -231,15 +197,15 @@ ".lockb" ], "icon": { - "dark": "src/assets/icon-small.png", - "light": "src/assets/icon-small.png" + "dark": "assets/icon-small.png", + "light": "assets/icon-small.png" } } ], "jsonValidation": [ { "fileMatch": "package.json", - "url": "src/resources/package.json" + "url": "assets/package.json" } ], "customEditors": [ @@ -268,7 +234,7 @@ "theme": "dark" }, "homepage": "https://bun.sh/", - "icon": "src/assets/icon.png", + "icon": "assets/icon.png", "keywords": [ "bun", "node.js", @@ -279,10 +245,8 @@ "license": "MIT", "publisher": "oven", "scripts": { - "bundle": "./node_modules/.bin/esbuild src/extension.ts src/web-extension.ts --bundle --external:vscode --outdir=dist --platform=node --format=cjs", - "prebuild": "bun run bundle && rm -rf extension && mkdir -p extension/src && cp -r dist extension/dist && cp -r src/assets extension/src/assets && cp package.json extension && cp README.md extension", - "build": "cd extension && vsce package", - "build:watch": "./node_modules/.bin/esbuild --watch src/extension.ts src/web-extension.ts --bundle --external:vscode --outdir=dist --platform=node --format=cjs" + "build": "node scripts/build.mjs", + "test": "node scripts/test.mjs" }, "workspaceTrust": { "request": "never" diff --git a/packages/bun-vscode/scripts/build.mjs b/packages/bun-vscode/scripts/build.mjs new file mode 100644 index 000000000..261965840 --- /dev/null +++ b/packages/bun-vscode/scripts/build.mjs @@ -0,0 +1,29 @@ +import { buildSync } from "esbuild"; +import { rmSync, mkdirSync, cpSync } from "node:fs"; +import { spawnSync } from "node:child_process"; + +const { pathname } = new URL("..", import.meta.url); +process.chdir(pathname); + +buildSync({ + entryPoints: ["src/extension.ts", "src/web-extension.ts"], + outdir: "dist", + bundle: true, + external: ["vscode"], + platform: "node", + format: "cjs", +}); + +rmSync("extension", { recursive: true, force: true }); +mkdirSync("extension", { recursive: true }); +cpSync("dist", "extension/dist", { recursive: true }); +cpSync("assets", "extension/assets", { recursive: true }); +cpSync("README.md", "extension/README.md"); +cpSync("LICENSE", "extension/LICENSE"); +cpSync("package.json", "extension/package.json"); + +const cmd = process.isBun ? "bunx" : "npx"; +spawnSync(cmd, ["vsce", "package"], { + cwd: "extension", + stdio: "inherit", +}); diff --git a/packages/bun-vscode/scripts/test.mjs b/packages/bun-vscode/scripts/test.mjs new file mode 100644 index 000000000..6e890c420 --- /dev/null +++ b/packages/bun-vscode/scripts/test.mjs @@ -0,0 +1,21 @@ +import { readdirSync } from "node:fs"; +import { spawn } from "node:child_process"; + +const { pathname } = new URL("..", import.meta.url); +process.chdir(pathname); + +let path; +for (const filename of readdirSync("extension")) { + if (filename.endsWith(".vsix")) { + path = `extension/${filename}`; + break; + } +} + +if (!path) { + throw new Error("No .vsix file found"); +} + +spawn("code", ["--new-window", `--install-extension=${path}`, `--extensionDevelopmentPath=${pathname}`, "example"], { + stdio: "inherit", +}); diff --git a/packages/bun-vscode/src/features/debug.ts b/packages/bun-vscode/src/features/debug.ts index 3b841ea66..eae2b1c33 100644 --- a/packages/bun-vscode/src/features/debug.ts +++ b/packages/bun-vscode/src/features/debug.ts @@ -3,13 +3,15 @@ import type { CancellationToken, DebugConfiguration, ProviderResult, WorkspaceFo import type { DAP } from "../../../bun-debug-adapter-protocol"; import { DebugAdapter } from "../../../bun-debug-adapter-protocol"; import { DebugSession } from "@vscode/debugadapter"; +import { inspect } from "node:util"; +import { tmpdir } from "node:os"; const debugConfiguration: vscode.DebugConfiguration = { type: "bun", request: "launch", name: "Debug Bun", program: "${file}", - watch: true, + watch: false, }; const runConfiguration: vscode.DebugConfiguration = { @@ -17,117 +19,131 @@ const runConfiguration: vscode.DebugConfiguration = { request: "launch", name: "Run Bun", program: "${file}", - watch: true, + debug: false, + watch: false, }; const attachConfiguration: vscode.DebugConfiguration = { type: "bun", request: "attach", - name: "Attach to Bun", + name: "Attach Bun", url: "ws://localhost:6499/", }; -const debugConfigurations: vscode.DebugConfiguration[] = [debugConfiguration, attachConfiguration]; +let channels: Record<string, vscode.OutputChannel> = {}; +let terminal: TerminalDebugSession | undefined; export default function (context: vscode.ExtensionContext, factory?: vscode.DebugAdapterDescriptorFactory) { context.subscriptions.push( - vscode.commands.registerCommand("extension.bun.runFile", (resource: vscode.Uri) => { - let targetResource = resource; - if (!targetResource && vscode.window.activeTextEditor) { - targetResource = vscode.window.activeTextEditor.document.uri; - } - if (targetResource) { - vscode.debug.startDebugging(undefined, runConfiguration, { - noDebug: true, - }); - } - }), - vscode.commands.registerCommand("extension.bun.debugFile", (resource: vscode.Uri) => { - let targetResource = resource; - if (!targetResource && vscode.window.activeTextEditor) { - targetResource = vscode.window.activeTextEditor.document.uri; - } - if (targetResource) { - vscode.debug.startDebugging(undefined, { - ...debugConfiguration, - program: targetResource.fsPath, - }); - } - }), - ); - - const provider = new BunConfigurationProvider(); - context.subscriptions.push(vscode.debug.registerDebugConfigurationProvider("bun", provider)); - - context.subscriptions.push( + vscode.commands.registerCommand("extension.bun.runFile", RunFileCommand), + vscode.commands.registerCommand("extension.bun.debugFile", DebugFileCommand), vscode.debug.registerDebugConfigurationProvider( "bun", - { - provideDebugConfigurations(folder: WorkspaceFolder | undefined): ProviderResult<DebugConfiguration[]> { - return debugConfigurations; - }, - }, + new DebugConfigurationProvider(), + vscode.DebugConfigurationProviderTriggerKind.Initial, + ), + vscode.debug.registerDebugConfigurationProvider( + "bun", + new DebugConfigurationProvider(), vscode.DebugConfigurationProviderTriggerKind.Dynamic, ), + vscode.debug.registerDebugAdapterDescriptorFactory("bun", factory ?? new InlineDebugAdapterFactory()), + (channels["dap"] = vscode.window.createOutputChannel("Debug Adapter Protocol (Bun)")), + (channels["jsc"] = vscode.window.createOutputChannel("JavaScript Inspector (Bun)")), + (channels["console"] = vscode.window.createOutputChannel("Console (Bun)")), + (terminal = new TerminalDebugSession()), ); +} - if (!factory) { - factory = new InlineDebugAdapterFactory(); +function RunFileCommand(resource?: vscode.Uri): void { + const path = getCurrentPath(resource); + if (path) { + vscode.debug.startDebugging(undefined, { + ...runConfiguration, + noDebug: true, + program: path, + }); } - context.subscriptions.push(vscode.debug.registerDebugAdapterDescriptorFactory("bun", factory)); - if ("dispose" in factory && typeof factory.dispose === "function") { - // @ts-ignore - context.subscriptions.push(factory); +} + +function DebugFileCommand(resource?: vscode.Uri): void { + const path = getCurrentPath(resource); + if (path) { + vscode.debug.startDebugging(undefined, { + ...debugConfiguration, + program: path, + }); } } -class BunConfigurationProvider implements vscode.DebugConfigurationProvider { +class DebugConfigurationProvider implements vscode.DebugConfigurationProvider { + provideDebugConfigurations(folder: WorkspaceFolder | undefined): ProviderResult<DebugConfiguration[]> { + return [debugConfiguration, runConfiguration, attachConfiguration]; + } + resolveDebugConfiguration( folder: WorkspaceFolder | undefined, config: DebugConfiguration, token?: CancellationToken, ): ProviderResult<DebugConfiguration> { - if (!config.type && !config.request && !config.name) { - const editor = vscode.window.activeTextEditor; - if (editor && isJavaScript(editor.document.languageId)) { - Object.assign(config, debugConfiguration); + let target: DebugConfiguration; + + const { request } = config; + if (request === "attach") { + target = attachConfiguration; + } else { + target = debugConfiguration; + } + + for (const [key, value] of Object.entries(target)) { + if (config[key] === undefined) { + config[key] = value; } } + return config; } } class InlineDebugAdapterFactory implements vscode.DebugAdapterDescriptorFactory { - createDebugAdapterDescriptor(_session: vscode.DebugSession): ProviderResult<vscode.DebugAdapterDescriptor> { - const adapter = new VSCodeAdapter(_session); + createDebugAdapterDescriptor(session: vscode.DebugSession): ProviderResult<vscode.DebugAdapterDescriptor> { + const { configuration } = session; + const { request, url } = configuration; + + if (request === "attach" && url === terminal?.url) { + return new vscode.DebugAdapterInlineImplementation(terminal); + } + + const adapter = new FileDebugSession(session.id); return new vscode.DebugAdapterInlineImplementation(adapter); } } -function isJavaScript(languageId: string): boolean { - return ( - languageId === "javascript" || - languageId === "javascriptreact" || - languageId === "typescript" || - languageId === "typescriptreact" - ); -} +class FileDebugSession extends DebugSession { + readonly url: string; + readonly adapter: DebugAdapter; -export class VSCodeAdapter extends DebugSession { - #adapter: DebugAdapter; - #dap: vscode.OutputChannel; - - constructor(session: vscode.DebugSession) { + constructor(sessionId?: string) { super(); - this.#dap = vscode.window.createOutputChannel("Debug Adapter Protocol"); - this.#adapter = new DebugAdapter({ - sendToAdapter: this.sendMessage.bind(this), + const uniqueId = sessionId ?? Math.random().toString(36).slice(2); + this.url = `ws+unix://${tmpdir()}/bun-vscode-${uniqueId}.sock`; + this.adapter = new DebugAdapter({ + url: this.url, + send: this.sendMessage.bind(this), + logger(...messages) { + log("jsc", ...messages); + }, + stdout(message) { + log("console", message); + }, + stderr(message) { + log("console", message); + }, }); } sendMessage(message: DAP.Request | DAP.Response | DAP.Event): void { - console.log("[dap] -->", message); - this.#dap.appendLine("--> " + JSON.stringify(message)); + log("dap", "-->", message); const { type } = message; if (type === "response") { @@ -140,14 +156,59 @@ export class VSCodeAdapter extends DebugSession { } handleMessage(message: DAP.Event | DAP.Request | DAP.Response): void { - console.log("[dap] <--", message); - this.#dap.appendLine("<-- " + JSON.stringify(message)); + log("dap", "<--", message); - this.#adapter.accept(message); + this.adapter.accept(message); } dispose() { - this.#adapter.close(); - this.#dap.dispose(); + this.adapter.close(); + } +} + +class TerminalDebugSession extends FileDebugSession { + readonly terminal: vscode.Terminal; + + constructor() { + super(); + this.terminal = vscode.window.createTerminal({ + name: "Bun Terminal", + env: { + "BUN_INSPECT": `1${this.url}`, + "BUN_INSPECT_NOTIFY": `unix://${this.adapter.inspector.unix}`, + }, + isTransient: true, + iconPath: new vscode.ThemeIcon("debug-console"), + }); + this.terminal.show(); + this.adapter.inspector.startDebugging = () => { + vscode.debug.startDebugging(undefined, { + ...attachConfiguration, + url: this.url, + }); + }; + } +} + +function log(channel: string, ...message: unknown[]): void { + if (process.env.NODE_ENV === "development") { + console.log(`[${channel}]`, ...message); + channels[channel]?.appendLine(message.map(v => inspect(v)).join(" ")); + } +} + +function isJavaScript(languageId: string): boolean { + return ( + languageId === "javascript" || + languageId === "javascriptreact" || + languageId === "typescript" || + languageId === "typescriptreact" + ); +} + +function getCurrentPath(target?: vscode.Uri): string | undefined { + if (!target && vscode.window.activeTextEditor) { + target = vscode.window.activeTextEditor.document.uri; } + return target?.fsPath; } |