/********************************************************************** * Auto-generated by protocol-dts-generator.ts, do not edit manually. * **********************************************************************/ /** * The Chrome DevTools Protocol. * @public */ export namespace Protocol { export type integer = number /** * This domain is deprecated - use Runtime or Log instead. * @deprecated */ export namespace Console { export const enum ConsoleMessageSource { XML = 'xml', Javascript = 'javascript', Network = 'network', ConsoleAPI = 'console-api', Storage = 'storage', Appcache = 'appcache', Rendering = 'rendering', Security = 'security', Other = 'other', Deprecation = 'deprecation', Worker = 'worker', } export const enum ConsoleMessageLevel { Log = 'log', Warning = 'warning', Error = 'error', Debug = 'debug', Info = 'info', } /** * Console message. */ export interface ConsoleMessage { /** * Message source. */ source: ('xml' | 'javascript' | 'network' | 'console-api' | 'storage' | 'appcache' | 'rendering' | 'security' | 'other' | 'deprecation' | 'worker'); /** * Message severity. */ level: ('log' | 'warning' | 'error' | 'debug' | 'info'); /** * Message text. */ text: string; /** * URL of the message origin. */ url?: string; /** * Line number in the resource that generated this message (1-based). */ line?: integer; /** * Column number in the resource that generated this message (1-based). */ column?: integer; } /** * Issued when new console message is added. */ export interface MessageAddedEvent { /** * Console message that has been added. */ message: ConsoleMessage; } } /** * Debugger domain exposes JavaScript debugging capabilities. It allows setting and removing * breakpoints, stepping through execution, exploring stack traces, etc. */ export namespace Debugger { /** * Breakpoint identifier. */ export type BreakpointId = string; /** * Call frame identifier. */ export type CallFrameId = string; /** * Location in the source code. */ export interface Location { /** * Script identifier as reported in the `Debugger.scriptParsed`. */ scriptId: Runtime.ScriptId; /** * Line number in the script (0-based). */ lineNumber: integer; /** * Column number in the script (0-based). */ columnNumber?: integer; } /** * Location in the source code. * @experimental */ export interface ScriptPosition { lineNumber: integer; columnNumber: integer; } /** * Location range within one script. * @experimental */ export interface LocationRange { scriptId: Runtime.ScriptId; start: ScriptPosition; end: ScriptPosition; } /** * JavaScript call frame. Array of call frames form the call stack. */ export interface CallFrame { /** * Call frame identifier. This identifier is only valid while the virtual machine is paused. */ callFrameId: CallFrameId; /** * Name of the JavaScript function called on this call frame. */ functionName: string; /** * Location in the source code. */ functionLocation?: Location; /** * Location in the source code. */ location: Location; /** * JavaScript script name or url. * Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously * sent `Debugger.scriptParsed` event. * @deprecated */ url: string; /** * Scope chain for this call frame. */ scopeChain: Scope[]; /** * `this` object for this call frame. */ this: Runtime.RemoteObject; /** * The value being returned, if the function is at return point. */ returnValue?: Runtime.RemoteObject; /** * Valid only while the VM is paused and indicates whether this frame * can be restarted or not. Note that a `true` value here does not * guarantee that Debugger#restartFrame with this CallFrameId will be * successful, but it is very likely. * @experimental */ canBeRestarted?: boolean; } export const enum ScopeType { Global = 'global', Local = 'local', With = 'with', Closure = 'closure', Catch = 'catch', Block = 'block', Script = 'script', Eval = 'eval', Module = 'module', WasmExpressionStack = 'wasm-expression-stack', } /** * Scope description. */ export interface Scope { /** * Scope type. */ type: ('global' | 'local' | 'with' | 'closure' | 'catch' | 'block' | 'script' | 'eval' | 'module' | 'wasm-expression-stack'); /** * Object representing the scope. For `global` and `with` scopes it represents the actual * object; for the rest of the scopes, it is artificial transient object enumerating scope * variables as its properties. */ object: Runtime.RemoteObject; name?: string; /** * Location in the source code where scope starts */ startLocation?: Location; /** * Location in the source code where scope ends */ endLocation?: Location; } /** * Search match for resource. */ export interface SearchMatch { /** * Line number in resource content. */ lineNumber: number; /** * Line with match content. */ lineContent: string; } export const enum BreakLocationType { DebuggerStatement = 'debuggerStatement', Call = 'call', Return = 'return', } export interface BreakLocation { /** * Script identifier as reported in the `Debugger.scriptParsed`. */ scriptId: Runtime.ScriptId; /** * Line number in the script (0-based). */ lineNumber: integer; /** * Column number in the script (0-based). */ columnNumber?: integer; type?: ('debuggerStatement' | 'call' | 'return'); } /** * @experimental */ export interface WasmDisassemblyChunk { /** * The next chunk of disassembled lines. */ lines: string[]; /** * The bytecode offsets describing the start of each line. */ bytecodeOffsets: integer[]; } /** * Enum of possible script languages. */ export type ScriptLanguage = ('JavaScript' | 'WebAssembly'); export const enum DebugSymbolsType { SourceMap = 'SourceMap', EmbeddedDWARF = 'EmbeddedDWARF', ExternalDWARF = 'ExternalDWARF', } /** * Debug symbols available for a wasm script. */ export interface DebugSymbols { /** * Type of the debug symbols. */ type: ('SourceMap' | 'EmbeddedDWARF' | 'ExternalDWARF'); /** * URL of the external symbol source. */ externalURL?: string; } export interface ResolvedBreakpoint { /** * Breakpoint unique identifier. */ breakpointId: BreakpointId; /** * Actual breakpoint location. */ location: Location; } export const enum ContinueToLocationRequestTargetCallFrames { Any = 'any', Current = 'current', } export interface ContinueToLocationRequest { /** * Location to continue to. */ location: Location; targetCallFrames?: ('any' | 'current'); } export interface EnableRequest { /** * The maximum size in bytes of collected scripts (not referenced by other heap objects) * the debugger can hold. Puts no limit if parameter is omitted. * @experimental */ maxScriptsCacheSize?: number; } export interface EnableResponse { /** * Unique identifier of the debugger. * @experimental */ debuggerId: Runtime.UniqueDebuggerId; } export interface EvaluateOnCallFrameRequest { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; /** * Expression to evaluate. */ expression: string; /** * String object group name to put result into (allows rapid releasing resulting object handles * using `releaseObjectGroup`). */ objectGroup?: string; /** * Specifies whether command line API should be available to the evaluated expression, defaults * to false. */ includeCommandLineAPI?: boolean; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause * execution. Overrides `setPauseOnException` state. */ silent?: boolean; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether to throw an exception if side effect cannot be ruled out during evaluation. */ throwOnSideEffect?: boolean; /** * Terminate execution after timing out (number of milliseconds). * @experimental */ timeout?: Runtime.TimeDelta; } export interface EvaluateOnCallFrameResponse { /** * Object wrapper for the evaluation result. */ result: Runtime.RemoteObject; /** * Exception details. */ exceptionDetails?: Runtime.ExceptionDetails; } export interface GetPossibleBreakpointsRequest { /** * Start of range to search possible breakpoint locations in. */ start: Location; /** * End of range to search possible breakpoint locations in (excluding). When not specified, end * of scripts is used as end of range. */ end?: Location; /** * Only consider locations which are in the same (non-nested) function as start. */ restrictToFunction?: boolean; } export interface GetPossibleBreakpointsResponse { /** * List of the possible breakpoint locations. */ locations: BreakLocation[]; } export interface GetScriptSourceRequest { /** * Id of the script to get source for. */ scriptId: Runtime.ScriptId; } export interface GetScriptSourceResponse { /** * Script source (empty in case of Wasm bytecode). */ scriptSource: string; /** * Wasm bytecode. (Encoded as a base64 string when passed over JSON) */ bytecode?: string; } export interface DisassembleWasmModuleRequest { /** * Id of the script to disassemble */ scriptId: Runtime.ScriptId; } export interface DisassembleWasmModuleResponse { /** * For large modules, return a stream from which additional chunks of * disassembly can be read successively. */ streamId?: string; /** * The total number of lines in the disassembly text. */ totalNumberOfLines: integer; /** * The offsets of all function bodies, in the format [start1, end1, * start2, end2, ...] where all ends are exclusive. */ functionBodyOffsets: integer[]; /** * The first chunk of disassembly. */ chunk: WasmDisassemblyChunk; } export interface NextWasmDisassemblyChunkRequest { streamId: string; } export interface NextWasmDisassemblyChunkResponse { /** * The next chunk of disassembly. */ chunk: WasmDisassemblyChunk; } export interface GetWasmBytecodeRequest { /** * Id of the Wasm script to get source for. */ scriptId: Runtime.ScriptId; } export interface GetWasmBytecodeResponse { /** * Script source. (Encoded as a base64 string when passed over JSON) */ bytecode: string; } export interface GetStackTraceRequest { stackTraceId: Runtime.StackTraceId; } export interface GetStackTraceResponse { stackTrace: Runtime.StackTrace; } export interface PauseOnAsyncCallRequest { /** * Debugger will pause when async call with given stack trace is started. */ parentStackTraceId: Runtime.StackTraceId; } export interface RemoveBreakpointRequest { breakpointId: BreakpointId; } export const enum RestartFrameRequestMode { StepInto = 'StepInto', } export interface RestartFrameRequest { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; /** * The `mode` parameter must be present and set to 'StepInto', otherwise * `restartFrame` will error out. * @experimental */ mode?: ('StepInto'); } export interface RestartFrameResponse { /** * New stack trace. * @deprecated */ callFrames: CallFrame[]; /** * Async stack trace, if any. * @deprecated */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @deprecated */ asyncStackTraceId?: Runtime.StackTraceId; } export interface ResumeRequest { /** * Set to true to terminate execution upon resuming execution. In contrast * to Runtime.terminateExecution, this will allows to execute further * JavaScript (i.e. via evaluation) until execution of the paused code * is actually resumed, at which point termination is triggered. * If execution is currently not paused, this parameter has no effect. */ terminateOnResume?: boolean; } export interface SearchInContentRequest { /** * Id of the script to search in. */ scriptId: Runtime.ScriptId; /** * String to search for. */ query: string; /** * If true, search is case sensitive. */ caseSensitive?: boolean; /** * If true, treats string parameter as regex. */ isRegex?: boolean; } export interface SearchInContentResponse { /** * List of search matches. */ result: SearchMatch[]; } export interface SetAsyncCallStackDepthRequest { /** * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async * call stacks (default). */ maxDepth: integer; } export interface SetBlackboxExecutionContextsRequest { /** * Array of execution context unique ids for the debugger to ignore. */ uniqueIds: string[]; } export interface SetBlackboxPatternsRequest { /** * Array of regexps that will be used to check script url for blackbox state. */ patterns: string[]; /** * If true, also ignore scripts with no source url. */ skipAnonymous?: boolean; } export interface SetBlackboxedRangesRequest { /** * Id of the script. */ scriptId: Runtime.ScriptId; positions: ScriptPosition[]; } export interface SetBreakpointRequest { /** * Location to set breakpoint in. */ location: Location; /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the * breakpoint if this expression evaluates to true. */ condition?: string; } export interface SetBreakpointResponse { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; /** * Location this breakpoint resolved into. */ actualLocation: Location; } export const enum SetInstrumentationBreakpointRequestInstrumentation { BeforeScriptExecution = 'beforeScriptExecution', BeforeScriptWithSourceMapExecution = 'beforeScriptWithSourceMapExecution', } export interface SetInstrumentationBreakpointRequest { /** * Instrumentation name. */ instrumentation: ('beforeScriptExecution' | 'beforeScriptWithSourceMapExecution'); } export interface SetInstrumentationBreakpointResponse { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; } export interface SetBreakpointByUrlRequest { /** * Line number to set breakpoint at. */ lineNumber: integer; /** * URL of the resources to set breakpoint on. */ url?: string; /** * Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or * `urlRegex` must be specified. */ urlRegex?: string; /** * Script hash of the resources to set breakpoint on. */ scriptHash?: string; /** * Offset in the line to set breakpoint at. */ columnNumber?: integer; /** * Expression to use as a breakpoint condition. When specified, debugger will only stop on the * breakpoint if this expression evaluates to true. */ condition?: string; } export interface SetBreakpointByUrlResponse { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; /** * List of the locations this breakpoint resolved into upon addition. */ locations: Location[]; } export interface SetBreakpointOnFunctionCallRequest { /** * Function object id. */ objectId: Runtime.RemoteObjectId; /** * Expression to use as a breakpoint condition. When specified, debugger will * stop on the breakpoint if this expression evaluates to true. */ condition?: string; } export interface SetBreakpointOnFunctionCallResponse { /** * Id of the created breakpoint for further reference. */ breakpointId: BreakpointId; } export interface SetBreakpointsActiveRequest { /** * New value for breakpoints active state. */ active: boolean; } export const enum SetPauseOnExceptionsRequestState { None = 'none', Caught = 'caught', Uncaught = 'uncaught', All = 'all', } export interface SetPauseOnExceptionsRequest { /** * Pause on exceptions mode. */ state: ('none' | 'caught' | 'uncaught' | 'all'); } export interface SetReturnValueRequest { /** * New return value. */ newValue: Runtime.CallArgument; } export const enum SetScriptSourceResponseStatus { Ok = 'Ok', CompileError = 'CompileError', BlockedByActiveGenerator = 'BlockedByActiveGenerator', BlockedByActiveFunction = 'BlockedByActiveFunction', BlockedByTopLevelEsModuleChange = 'BlockedByTopLevelEsModuleChange', } export interface SetScriptSourceRequest { /** * Id of the script to edit. */ scriptId: Runtime.ScriptId; /** * New content of the script. */ scriptSource: string; /** * If true the change will not actually be applied. Dry run may be used to get result * description without actually modifying the code. */ dryRun?: boolean; /** * If true, then `scriptSource` is allowed to change the function on top of the stack * as long as the top-most stack frame is the only activation of that function. * @experimental */ allowTopFrameEditing?: boolean; } export interface SetScriptSourceResponse { /** * New stack trace in case editing has happened while VM was stopped. * @deprecated */ callFrames?: CallFrame[]; /** * Whether current call stack was modified after applying the changes. * @deprecated */ stackChanged?: boolean; /** * Async stack trace, if any. * @deprecated */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @deprecated */ asyncStackTraceId?: Runtime.StackTraceId; /** * Whether the operation was successful or not. Only `Ok` denotes a * successful live edit while the other enum variants denote why * the live edit failed. * @experimental */ status: ('Ok' | 'CompileError' | 'BlockedByActiveGenerator' | 'BlockedByActiveFunction' | 'BlockedByTopLevelEsModuleChange'); /** * Exception details if any. Only present when `status` is `CompileError`. */ exceptionDetails?: Runtime.ExceptionDetails; } export interface SetSkipAllPausesRequest { /** * New value for skip pauses state. */ skip: boolean; } export interface SetVariableValueRequest { /** * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' * scope types are allowed. Other scopes could be manipulated manually. */ scopeNumber: integer; /** * Variable name. */ variableName: string; /** * New variable value. */ newValue: Runtime.CallArgument; /** * Id of callframe that holds variable. */ callFrameId: CallFrameId; } export interface StepIntoRequest { /** * Debugger will pause on the execution of the first async task which was scheduled * before next pause. * @experimental */ breakOnAsyncCall?: boolean; /** * The skipList specifies location ranges that should be skipped on step into. * @experimental */ skipList?: LocationRange[]; } export interface StepOverRequest { /** * The skipList specifies location ranges that should be skipped on step over. * @experimental */ skipList?: LocationRange[]; } /** * Fired when breakpoint is resolved to an actual script and location. * Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event. * @deprecated */ export interface BreakpointResolvedEvent { /** * Breakpoint unique identifier. */ breakpointId: BreakpointId; /** * Actual breakpoint location. */ location: Location; } export const enum PausedEventReason { Ambiguous = 'ambiguous', Assert = 'assert', CSPViolation = 'CSPViolation', DebugCommand = 'debugCommand', DOM = 'DOM', EventListener = 'EventListener', Exception = 'exception', Instrumentation = 'instrumentation', OOM = 'OOM', Other = 'other', PromiseRejection = 'promiseRejection', XHR = 'XHR', Step = 'step', } /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ export interface PausedEvent { /** * Call stack the virtual machine stopped on. */ callFrames: CallFrame[]; /** * Pause reason. */ reason: ('ambiguous' | 'assert' | 'CSPViolation' | 'debugCommand' | 'DOM' | 'EventListener' | 'exception' | 'instrumentation' | 'OOM' | 'other' | 'promiseRejection' | 'XHR' | 'step'); /** * Object containing break-specific auxiliary properties. */ data?: any; /** * Hit breakpoints IDs */ hitBreakpoints?: string[]; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. * @experimental */ asyncStackTraceId?: Runtime.StackTraceId; /** * Never present, will be removed. * @deprecated * @experimental */ asyncCallStackTraceId?: Runtime.StackTraceId; } /** * Fired when virtual machine fails to parse the script. */ export interface ScriptFailedToParseEvent { /** * Identifier of the script parsed. */ scriptId: Runtime.ScriptId; /** * URL or name of the script parsed (if any). */ url: string; /** * Line offset of the script within the resource with given URL (for script tags). */ startLine: integer; /** * Column offset of the script within the resource with given URL. */ startColumn: integer; /** * Last line of the script. */ endLine: integer; /** * Length of the last line of the script. */ endColumn: integer; /** * Specifies script creation context. */ executionContextId: Runtime.ExecutionContextId; /** * Content hash of the script, SHA-256. */ hash: string; /** * For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment. */ buildId: string; /** * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ executionContextAuxData?: any; /** * URL of source map associated with script (if any). */ sourceMapURL?: string; /** * True, if this script has sourceURL. */ hasSourceURL?: boolean; /** * True, if this script is ES6 module. */ isModule?: boolean; /** * This script length. */ length?: integer; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ stackTrace?: Runtime.StackTrace; /** * If the scriptLanguage is WebAssembly, the code section offset in the module. * @experimental */ codeOffset?: integer; /** * The language of the script. * @experimental */ scriptLanguage?: Debugger.ScriptLanguage; /** * The name the embedder supplied for this script. * @experimental */ embedderName?: string; } /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected * scripts upon enabling debugger. */ export interface ScriptParsedEvent { /** * Identifier of the script parsed. */ scriptId: Runtime.ScriptId; /** * URL or name of the script parsed (if any). */ url: string; /** * Line offset of the script within the resource with given URL (for script tags). */ startLine: integer; /** * Column offset of the script within the resource with given URL. */ startColumn: integer; /** * Last line of the script. */ endLine: integer; /** * Length of the last line of the script. */ endColumn: integer; /** * Specifies script creation context. */ executionContextId: Runtime.ExecutionContextId; /** * Content hash of the script, SHA-256. */ hash: string; /** * For Wasm modules, the content of the `build_id` custom section. For JavaScript the `debugId` magic comment. */ buildId: string; /** * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ executionContextAuxData?: any; /** * True, if this script is generated as a result of the live edit operation. * @experimental */ isLiveEdit?: boolean; /** * URL of source map associated with script (if any). */ sourceMapURL?: string; /** * True, if this script has sourceURL. */ hasSourceURL?: boolean; /** * True, if this script is ES6 module. */ isModule?: boolean; /** * This script length. */ length?: integer; /** * JavaScript top stack frame of where the script parsed event was triggered if available. * @experimental */ stackTrace?: Runtime.StackTrace; /** * If the scriptLanguage is WebAssembly, the code section offset in the module. * @experimental */ codeOffset?: integer; /** * The language of the script. * @experimental */ scriptLanguage?: Debugger.ScriptLanguage; /** * If the scriptLanguage is WebAssembly, the source of debug symbols for the module. * @experimental */ debugSymbols?: Debugger.DebugSymbols[]; /** * The name the embedder supplied for this script. * @experimental */ embedderName?: string; /** * The list of set breakpoints in this script if calls to `setBreakpointByUrl` * matches this script's URL or hash. Clients that use this list can ignore the * `breakpointResolved` event. They are equivalent. * @experimental */ resolvedBreakpoints?: ResolvedBreakpoint[]; } } /** * @experimental */ export namespace HeapProfiler { /** * Heap snapshot object id. */ export type HeapSnapshotObjectId = string; /** * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. */ export interface SamplingHeapProfileNode { /** * Function location. */ callFrame: Runtime.CallFrame; /** * Allocations size in bytes for the node excluding children. */ selfSize: number; /** * Node id. Ids are unique across all profiles collected between startSampling and stopSampling. */ id: integer; /** * Child nodes. */ children: SamplingHeapProfileNode[]; } /** * A single sample from a sampling profile. */ export interface SamplingHeapProfileSample { /** * Allocation size in bytes attributed to the sample. */ size: number; /** * Id of the corresponding profile tree node. */ nodeId: integer; /** * Time-ordered sample ordinal number. It is unique across all profiles retrieved * between startSampling and stopSampling. */ ordinal: number; } /** * Sampling profile. */ export interface SamplingHeapProfile { head: SamplingHeapProfileNode; samples: SamplingHeapProfileSample[]; } export interface AddInspectedHeapObjectRequest { /** * Heap snapshot object id to be accessible by means of $x command line API. */ heapObjectId: HeapSnapshotObjectId; } export interface GetHeapObjectIdRequest { /** * Identifier of the object to get heap object id for. */ objectId: Runtime.RemoteObjectId; } export interface GetHeapObjectIdResponse { /** * Id of the heap snapshot object corresponding to the passed remote object id. */ heapSnapshotObjectId: HeapSnapshotObjectId; } export interface GetObjectByHeapObjectIdRequest { objectId: HeapSnapshotObjectId; /** * Symbolic group name that can be used to release multiple objects. */ objectGroup?: string; } export interface GetObjectByHeapObjectIdResponse { /** * Evaluation result. */ result: Runtime.RemoteObject; } export interface GetSamplingProfileResponse { /** * Return the sampling profile being collected. */ profile: SamplingHeapProfile; } export interface StartSamplingRequest { /** * Average sample interval in bytes. Poisson distribution is used for the intervals. The * default value is 32768 bytes. */ samplingInterval?: number; /** * By default, the sampling heap profiler reports only objects which are * still alive when the profile is returned via getSamplingProfile or * stopSampling, which is useful for determining what functions contribute * the most to steady-state memory usage. This flag instructs the sampling * heap profiler to also include information about objects discarded by * major GC, which will show which functions cause large temporary memory * usage or long GC pauses. */ includeObjectsCollectedByMajorGC?: boolean; /** * By default, the sampling heap profiler reports only objects which are * still alive when the profile is returned via getSamplingProfile or * stopSampling, which is useful for determining what functions contribute * the most to steady-state memory usage. This flag instructs the sampling * heap profiler to also include information about objects discarded by * minor GC, which is useful when tuning a latency-sensitive application * for minimal GC activity. */ includeObjectsCollectedByMinorGC?: boolean; } export interface StartTrackingHeapObjectsRequest { trackAllocations?: boolean; } export interface StopSamplingResponse { /** * Recorded sampling heap profile. */ profile: SamplingHeapProfile; } export interface StopTrackingHeapObjectsRequest { /** * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken * when the tracking is stopped. */ reportProgress?: boolean; /** * Deprecated in favor of `exposeInternals`. * @deprecated */ treatGlobalObjectsAsRoots?: boolean; /** * If true, numerical values are included in the snapshot */ captureNumericValue?: boolean; /** * If true, exposes internals of the snapshot. * @experimental */ exposeInternals?: boolean; } export interface TakeHeapSnapshotRequest { /** * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. */ reportProgress?: boolean; /** * If true, a raw snapshot without artificial roots will be generated. * Deprecated in favor of `exposeInternals`. * @deprecated */ treatGlobalObjectsAsRoots?: boolean; /** * If true, numerical values are included in the snapshot */ captureNumericValue?: boolean; /** * If true, exposes internals of the snapshot. * @experimental */ exposeInternals?: boolean; } export interface AddHeapSnapshotChunkEvent { chunk: string; } /** * If heap objects tracking has been started then backend may send update for one or more fragments */ export interface HeapStatsUpdateEvent { /** * An array of triplets. Each triplet describes a fragment. The first integer is the fragment * index, the second integer is a total count of objects for the fragment, the third integer is * a total size of the objects for the fragment. */ statsUpdate: integer[]; } /** * If heap objects tracking has been started then backend regularly sends a current value for last * seen object id and corresponding timestamp. If the were changes in the heap since last event * then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. */ export interface LastSeenObjectIdEvent { lastSeenObjectId: integer; timestamp: number; } export interface ReportHeapSnapshotProgressEvent { done: integer; total: integer; finished?: boolean; } } export namespace Profiler { /** * Profile node. Holds callsite information, execution statistics and child nodes. */ export interface ProfileNode { /** * Unique id of the node. */ id: integer; /** * Function location. */ callFrame: Runtime.CallFrame; /** * Number of samples where this node was on top of the call stack. */ hitCount?: integer; /** * Child node ids. */ children?: integer[]; /** * The reason of being not optimized. The function may be deoptimized or marked as don't * optimize. */ deoptReason?: string; /** * An array of source position ticks. */ positionTicks?: PositionTickInfo[]; } /** * Profile. */ export interface Profile { /** * The list of profile nodes. First item is the root node. */ nodes: ProfileNode[]; /** * Profiling start timestamp in microseconds. */ startTime: number; /** * Profiling end timestamp in microseconds. */ endTime: number; /** * Ids of samples top nodes. */ samples?: integer[]; /** * Time intervals between adjacent samples in microseconds. The first delta is relative to the * profile startTime. */ timeDeltas?: integer[]; } /** * Specifies a number of samples attributed to a certain source position. */ export interface PositionTickInfo { /** * Source line number (1-based). */ line: integer; /** * Number of samples attributed to the source line. */ ticks: integer; } /** * Coverage data for a source range. */ export interface CoverageRange { /** * JavaScript script source offset for the range start. */ startOffset: integer; /** * JavaScript script source offset for the range end. */ endOffset: integer; /** * Collected execution count of the source range. */ count: integer; } /** * Coverage data for a JavaScript function. */ export interface FunctionCoverage { /** * JavaScript function name. */ functionName: string; /** * Source ranges inside the function with coverage data. */ ranges: CoverageRange[]; /** * Whether coverage data for this function has block granularity. */ isBlockCoverage: boolean; } /** * Coverage data for a JavaScript script. */ export interface ScriptCoverage { /** * JavaScript script id. */ scriptId: Runtime.ScriptId; /** * JavaScript script name or url. */ url: string; /** * Functions contained in the script that has coverage data. */ functions: FunctionCoverage[]; } export interface GetBestEffortCoverageResponse { /** * Coverage data for the current isolate. */ result: ScriptCoverage[]; } export interface SetSamplingIntervalRequest { /** * New sampling interval in microseconds. */ interval: integer; } export interface StartPreciseCoverageRequest { /** * Collect accurate call counts beyond simple 'covered' or 'not covered'. */ callCount?: boolean; /** * Collect block-based coverage. */ detailed?: boolean; /** * Allow the backend to send updates on its own initiative */ allowTriggeredUpdates?: boolean; } export interface StartPreciseCoverageResponse { /** * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. */ timestamp: number; } export interface StopResponse { /** * Recorded profile. */ profile: Profile; } export interface TakePreciseCoverageResponse { /** * Coverage data for the current isolate. */ result: ScriptCoverage[]; /** * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. */ timestamp: number; } export interface ConsoleProfileFinishedEvent { id: string; /** * Location of console.profileEnd(). */ location: Debugger.Location; profile: Profile; /** * Profile title passed as an argument to console.profile(). */ title?: string; } /** * Sent when new profile recording is started using console.profile() call. */ export interface ConsoleProfileStartedEvent { id: string; /** * Location of console.profile(). */ location: Debugger.Location; /** * Profile title passed as an argument to console.profile(). */ title?: string; } /** * Reports coverage delta since the last poll (either from an event like this, or from * `takePreciseCoverage` for the current isolate. May only be sent if precise code * coverage has been started. This event can be trigged by the embedder to, for example, * trigger collection of coverage data immediately at a certain point in time. * @experimental */ export interface PreciseCoverageDeltaUpdateEvent { /** * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. */ timestamp: number; /** * Identifier for distinguishing coverage events. */ occasion: string; /** * Coverage data for the current isolate. */ result: ScriptCoverage[]; } } /** * Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. * Evaluation results are returned as mirror object that expose object type, string representation * and unique identifier that can be used for further object reference. Original objects are * maintained in memory unless they are either explicitly released or are released along with the * other objects in their object group. */ export namespace Runtime { /** * Unique script identifier. */ export type ScriptId = string; export const enum SerializationOptionsSerialization { Deep = 'deep', Json = 'json', IdOnly = 'idOnly', } /** * Represents options for serialization. Overrides `generatePreview` and `returnByValue`. */ export interface SerializationOptions { serialization: ('deep' | 'json' | 'idOnly'); /** * Deep serialization depth. Default is full depth. Respected only in `deep` serialization mode. */ maxDepth?: integer; /** * Embedder-specific parameters. For example if connected to V8 in Chrome these control DOM * serialization via `maxNodeDepth: integer` and `includeShadowTree: "none" | "open" | "all"`. * Values can be only of type string or integer. */ additionalParameters?: any; } export const enum DeepSerializedValueType { Undefined = 'undefined', Null = 'null', String = 'string', Number = 'number', Boolean = 'boolean', Bigint = 'bigint', Regexp = 'regexp', Date = 'date', Symbol = 'symbol', Array = 'array', Object = 'object', Function = 'function', Map = 'map', Set = 'set', Weakmap = 'weakmap', Weakset = 'weakset', Error = 'error', Proxy = 'proxy', Promise = 'promise', Typedarray = 'typedarray', Arraybuffer = 'arraybuffer', Node = 'node', Window = 'window', Generator = 'generator', } /** * Represents deep serialized value. */ export interface DeepSerializedValue { type: ('undefined' | 'null' | 'string' | 'number' | 'boolean' | 'bigint' | 'regexp' | 'date' | 'symbol' | 'array' | 'object' | 'function' | 'map' | 'set' | 'weakmap' | 'weakset' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'node' | 'window' | 'generator'); value?: any; objectId?: string; /** * Set if value reference met more then once during serialization. In such * case, value is provided only to one of the serialized values. Unique * per value in the scope of one CDP call. */ weakLocalObjectReference?: integer; } /** * Unique object identifier. */ export type RemoteObjectId = string; /** * Primitive value which cannot be JSON-stringified. Includes values `-0`, `NaN`, `Infinity`, * `-Infinity`, and bigint literals. */ export type UnserializableValue = string; export const enum RemoteObjectType { Object = 'object', Function = 'function', Undefined = 'undefined', String = 'string', Number = 'number', Boolean = 'boolean', Symbol = 'symbol', Bigint = 'bigint', } export const enum RemoteObjectSubtype { Array = 'array', Null = 'null', Node = 'node', Regexp = 'regexp', Date = 'date', Map = 'map', Set = 'set', Weakmap = 'weakmap', Weakset = 'weakset', Iterator = 'iterator', Generator = 'generator', Error = 'error', Proxy = 'proxy', Promise = 'promise', Typedarray = 'typedarray', Arraybuffer = 'arraybuffer', Dataview = 'dataview', Webassemblymemory = 'webassemblymemory', Wasmvalue = 'wasmvalue', } /** * Mirror object referencing original JavaScript object. */ export interface RemoteObject { /** * Object type. */ type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint'); /** * Object subtype hint. Specified for `object` type values only. * NOTE: If you change anything here, make sure to also update * `subtype` in `ObjectPreview` and `PropertyPreview` below. */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'dataview' | 'webassemblymemory' | 'wasmvalue'); /** * Object class (constructor) name. Specified for `object` type values only. */ className?: string; /** * Remote object value in case of primitive values or JSON values (if it was requested). */ value?: any; /** * Primitive value which can not be JSON-stringified does not have `value`, but gets this * property. */ unserializableValue?: UnserializableValue; /** * String representation of the object. */ description?: string; /** * Deep serialized value. * @experimental */ deepSerializedValue?: DeepSerializedValue; /** * Unique object identifier (for non-primitive values). */ objectId?: RemoteObjectId; /** * Preview containing abbreviated property values. Specified for `object` type values only. * @experimental */ preview?: ObjectPreview; /** * @experimental */ customPreview?: CustomPreview; } /** * @experimental */ export interface CustomPreview { /** * The JSON-stringified result of formatter.header(object, config) call. * It contains json ML array that represents RemoteObject. */ header: string; /** * If formatter returns true as a result of formatter.hasBody call then bodyGetterId will * contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. * The result value is json ML array. */ bodyGetterId?: RemoteObjectId; } export const enum ObjectPreviewType { Object = 'object', Function = 'function', Undefined = 'undefined', String = 'string', Number = 'number', Boolean = 'boolean', Symbol = 'symbol', Bigint = 'bigint', } export const enum ObjectPreviewSubtype { Array = 'array', Null = 'null', Node = 'node', Regexp = 'regexp', Date = 'date', Map = 'map', Set = 'set', Weakmap = 'weakmap', Weakset = 'weakset', Iterator = 'iterator', Generator = 'generator', Error = 'error', Proxy = 'proxy', Promise = 'promise', Typedarray = 'typedarray', Arraybuffer = 'arraybuffer', Dataview = 'dataview', Webassemblymemory = 'webassemblymemory', Wasmvalue = 'wasmvalue', } /** * Object containing abbreviated remote object value. * @experimental */ export interface ObjectPreview { /** * Object type. */ type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint'); /** * Object subtype hint. Specified for `object` type values only. */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'dataview' | 'webassemblymemory' | 'wasmvalue'); /** * String representation of the object. */ description?: string; /** * True iff some of the properties or entries of the original object did not fit. */ overflow: boolean; /** * List of the properties. */ properties: PropertyPreview[]; /** * List of the entries. Specified for `map` and `set` subtype values only. */ entries?: EntryPreview[]; } export const enum PropertyPreviewType { Object = 'object', Function = 'function', Undefined = 'undefined', String = 'string', Number = 'number', Boolean = 'boolean', Symbol = 'symbol', Accessor = 'accessor', Bigint = 'bigint', } export const enum PropertyPreviewSubtype { Array = 'array', Null = 'null', Node = 'node', Regexp = 'regexp', Date = 'date', Map = 'map', Set = 'set', Weakmap = 'weakmap', Weakset = 'weakset', Iterator = 'iterator', Generator = 'generator', Error = 'error', Proxy = 'proxy', Promise = 'promise', Typedarray = 'typedarray', Arraybuffer = 'arraybuffer', Dataview = 'dataview', Webassemblymemory = 'webassemblymemory', Wasmvalue = 'wasmvalue', } /** * @experimental */ export interface PropertyPreview { /** * Property name. */ name: string; /** * Object type. Accessor means that the property itself is an accessor property. */ type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'accessor' | 'bigint'); /** * User-friendly property value string. */ value?: string; /** * Nested value preview. */ valuePreview?: ObjectPreview; /** * Object subtype hint. Specified for `object` type values only. */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'dataview' | 'webassemblymemory' | 'wasmvalue'); } /** * @experimental */ export interface EntryPreview { /** * Preview of the key. Specified for map-like collection entries. */ key?: ObjectPreview; /** * Preview of the value. */ value: ObjectPreview; } /** * Object property descriptor. */ export interface PropertyDescriptor { /** * Property name or symbol description. */ name: string; /** * The value associated with the property. */ value?: RemoteObject; /** * True if the value associated with the property may be changed (data descriptors only). */ writable?: boolean; /** * A function which serves as a getter for the property, or `undefined` if there is no getter * (accessor descriptors only). */ get?: RemoteObject; /** * A function which serves as a setter for the property, or `undefined` if there is no setter * (accessor descriptors only). */ set?: RemoteObject; /** * True if the type of this property descriptor may be changed and if the property may be * deleted from the corresponding object. */ configurable: boolean; /** * True if this property shows up during enumeration of the properties on the corresponding * object. */ enumerable: boolean; /** * True if the result was thrown during the evaluation. */ wasThrown?: boolean; /** * True if the property is owned for the object. */ isOwn?: boolean; /** * Property symbol object, if the property is of the `symbol` type. */ symbol?: RemoteObject; } /** * Object internal property descriptor. This property isn't normally visible in JavaScript code. */ export interface InternalPropertyDescriptor { /** * Conventional property name. */ name: string; /** * The value associated with the property. */ value?: RemoteObject; } /** * Object private field descriptor. * @experimental */ export interface PrivatePropertyDescriptor { /** * Private property name. */ name: string; /** * The value associated with the private property. */ value?: RemoteObject; /** * A function which serves as a getter for the private property, * or `undefined` if there is no getter (accessor descriptors only). */ get?: RemoteObject; /** * A function which serves as a setter for the private property, * or `undefined` if there is no setter (accessor descriptors only). */ set?: RemoteObject; } /** * Represents function call argument. Either remote object id `objectId`, primitive `value`, * unserializable primitive value or neither of (for undefined) them should be specified. */ export interface CallArgument { /** * Primitive value or serializable javascript object. */ value?: any; /** * Primitive value which can not be JSON-stringified. */ unserializableValue?: UnserializableValue; /** * Remote object handle. */ objectId?: RemoteObjectId; } /** * Id of an execution context. */ export type ExecutionContextId = integer; /** * Description of an isolated world. */ export interface ExecutionContextDescription { /** * Unique id of the execution context. It can be used to specify in which execution context * script evaluation should be performed. */ id: ExecutionContextId; /** * Execution context origin. */ origin: string; /** * Human readable name describing given context. */ name: string; /** * A system-unique execution context identifier. Unlike the id, this is unique across * multiple processes, so can be reliably used to identify specific context while backend * performs a cross-process navigation. * @experimental */ uniqueId: string; /** * Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string} */ auxData?: any; } /** * Detailed information about exception (or error) that was thrown during script compilation or * execution. */ export interface ExceptionDetails { /** * Exception id. */ exceptionId: integer; /** * Exception text, which should be used together with exception object when available. */ text: string; /** * Line number of the exception location (0-based). */ lineNumber: integer; /** * Column number of the exception location (0-based). */ columnNumber: integer; /** * Script ID of the exception location. */ scriptId?: ScriptId; /** * URL of the exception location, to be used when the script was not reported. */ url?: string; /** * JavaScript stack trace if available. */ stackTrace?: StackTrace; /** * Exception object if available. */ exception?: RemoteObject; /** * Identifier of the context where exception happened. */ executionContextId?: ExecutionContextId; /** * Dictionary with entries of meta data that the client associated * with this exception, such as information about associated network * requests, etc. * @experimental */ exceptionMetaData?: any; } /** * Number of milliseconds since epoch. */ export type Timestamp = number; /** * Number of milliseconds. */ export type TimeDelta = number; /** * Stack entry for runtime errors and assertions. */ export interface CallFrame { /** * JavaScript function name. */ functionName: string; /** * JavaScript script id. */ scriptId: ScriptId; /** * JavaScript script name or url. */ url: string; /** * JavaScript script line number (0-based). */ lineNumber: integer; /** * JavaScript script column number (0-based). */ columnNumber: integer; } /** * Call frames for assertions or error messages. */ export interface StackTrace { /** * String label of this stack trace. For async traces this may be a name of the function that * initiated the async call. */ description?: string; /** * JavaScript function name. */ callFrames: CallFrame[]; /** * Asynchronous JavaScript stack trace that preceded this stack, if available. */ parent?: StackTrace; /** * Asynchronous JavaScript stack trace that preceded this stack, if available. * @experimental */ parentId?: StackTraceId; } /** * Unique identifier of current debugger. * @experimental */ export type UniqueDebuggerId = string; /** * If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This * allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages. * @experimental */ export interface StackTraceId { id: string; debuggerId?: UniqueDebuggerId; } export interface AwaitPromiseRequest { /** * Identifier of the promise. */ promiseObjectId: RemoteObjectId; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. */ generatePreview?: boolean; } export interface AwaitPromiseResponse { /** * Promise result. Will contain rejected value if promise was rejected. */ result: RemoteObject; /** * Exception details if stack strace is available. */ exceptionDetails?: ExceptionDetails; } export interface CallFunctionOnRequest { /** * Declaration of the function to call. */ functionDeclaration: string; /** * Identifier of the object to call function on. Either objectId or executionContextId should * be specified. */ objectId?: RemoteObjectId; /** * Call arguments. All call arguments must belong to the same JavaScript world as the target * object. */ arguments?: CallArgument[]; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause * execution. Overrides `setPauseOnException` state. */ silent?: boolean; /** * Whether the result is expected to be a JSON object which should be sent by value. * Can be overriden by `serializationOptions`. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether execution should be treated as initiated by user in the UI. */ userGesture?: boolean; /** * Whether execution should `await` for resulting value and return once awaited promise is * resolved. */ awaitPromise?: boolean; /** * Specifies execution context which global object will be used to call function on. Either * executionContextId or objectId should be specified. */ executionContextId?: ExecutionContextId; /** * Symbolic group name that can be used to release multiple objects. If objectGroup is not * specified and objectId is, objectGroup will be inherited from object. */ objectGroup?: string; /** * Whether to throw an exception if side effect cannot be ruled out during evaluation. * @experimental */ throwOnSideEffect?: boolean; /** * An alternative way to specify the execution context to call function on. * Compared to contextId that may be reused across processes, this is guaranteed to be * system-unique, so it can be used to prevent accidental function call * in context different than intended (e.g. as a result of navigation across process * boundaries). * This is mutually exclusive with `executionContextId`. * @experimental */ uniqueContextId?: string; /** * Specifies the result serialization. If provided, overrides * `generatePreview` and `returnByValue`. * @experimental */ serializationOptions?: SerializationOptions; } export interface CallFunctionOnResponse { /** * Call result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface CompileScriptRequest { /** * Expression to compile. */ expression: string; /** * Source url to be set for the script. */ sourceURL: string; /** * Specifies whether the compiled script should be persisted. */ persistScript: boolean; /** * Specifies in which execution context to perform script run. If the parameter is omitted the * evaluation will be performed in the context of the inspected page. */ executionContextId?: ExecutionContextId; } export interface CompileScriptResponse { /** * Id of the script. */ scriptId?: ScriptId; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface EvaluateRequest { /** * Expression to evaluate. */ expression: string; /** * Symbolic group name that can be used to release multiple objects. */ objectGroup?: string; /** * Determines whether Command Line API should be available during the evaluation. */ includeCommandLineAPI?: boolean; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause * execution. Overrides `setPauseOnException` state. */ silent?: boolean; /** * Specifies in which execution context to perform evaluation. If the parameter is omitted the * evaluation will be performed in the context of the inspected page. * This is mutually exclusive with `uniqueContextId`, which offers an * alternative way to identify the execution context that is more reliable * in a multi-process environment. */ contextId?: ExecutionContextId; /** * Whether the result is expected to be a JSON object that should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. * @experimental */ generatePreview?: boolean; /** * Whether execution should be treated as initiated by user in the UI. */ userGesture?: boolean; /** * Whether execution should `await` for resulting value and return once awaited promise is * resolved. */ awaitPromise?: boolean; /** * Whether to throw an exception if side effect cannot be ruled out during evaluation. * This implies `disableBreaks` below. * @experimental */ throwOnSideEffect?: boolean; /** * Terminate execution after timing out (number of milliseconds). * @experimental */ timeout?: TimeDelta; /** * Disable breakpoints during execution. * @experimental */ disableBreaks?: boolean; /** * Setting this flag to true enables `let` re-declaration and top-level `await`. * Note that `let` variables can only be re-declared if they originate from * `replMode` themselves. * @experimental */ replMode?: boolean; /** * The Content Security Policy (CSP) for the target might block 'unsafe-eval' * which includes eval(), Function(), setTimeout() and setInterval() * when called with non-callable arguments. This flag bypasses CSP for this * evaluation and allows unsafe-eval. Defaults to true. * @experimental */ allowUnsafeEvalBlockedByCSP?: boolean; /** * An alternative way to specify the execution context to evaluate in. * Compared to contextId that may be reused across processes, this is guaranteed to be * system-unique, so it can be used to prevent accidental evaluation of the expression * in context different than intended (e.g. as a result of navigation across process * boundaries). * This is mutually exclusive with `contextId`. * @experimental */ uniqueContextId?: string; /** * Specifies the result serialization. If provided, overrides * `generatePreview` and `returnByValue`. * @experimental */ serializationOptions?: SerializationOptions; } export interface EvaluateResponse { /** * Evaluation result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface GetIsolateIdResponse { /** * The isolate id. */ id: string; } export interface GetHeapUsageResponse { /** * Used JavaScript heap size in bytes. */ usedSize: number; /** * Allocated JavaScript heap size in bytes. */ totalSize: number; /** * Used size in bytes in the embedder's garbage-collected heap. */ embedderHeapUsedSize: number; /** * Size in bytes of backing storage for array buffers and external strings. */ backingStorageSize: number; } export interface GetPropertiesRequest { /** * Identifier of the object to return properties for. */ objectId: RemoteObjectId; /** * If true, returns properties belonging only to the element itself, not to its prototype * chain. */ ownProperties?: boolean; /** * If true, returns accessor properties (with getter/setter) only; internal properties are not * returned either. * @experimental */ accessorPropertiesOnly?: boolean; /** * Whether preview should be generated for the results. * @experimental */ generatePreview?: boolean; /** * If true, returns non-indexed properties only. * @experimental */ nonIndexedPropertiesOnly?: boolean; } export interface GetPropertiesResponse { /** * Object properties. */ result: PropertyDescriptor[]; /** * Internal object properties (only of the element itself). */ internalProperties?: InternalPropertyDescriptor[]; /** * Object private properties. * @experimental */ privateProperties?: PrivatePropertyDescriptor[]; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface GlobalLexicalScopeNamesRequest { /** * Specifies in which execution context to lookup global scope variables. */ executionContextId?: ExecutionContextId; } export interface GlobalLexicalScopeNamesResponse { names: string[]; } export interface QueryObjectsRequest { /** * Identifier of the prototype to return objects for. */ prototypeObjectId: RemoteObjectId; /** * Symbolic group name that can be used to release the results. */ objectGroup?: string; } export interface QueryObjectsResponse { /** * Array with objects. */ objects: RemoteObject; } export interface ReleaseObjectRequest { /** * Identifier of the object to release. */ objectId: RemoteObjectId; } export interface ReleaseObjectGroupRequest { /** * Symbolic object group name. */ objectGroup: string; } export interface RunScriptRequest { /** * Id of the script to run. */ scriptId: ScriptId; /** * Specifies in which execution context to perform script run. If the parameter is omitted the * evaluation will be performed in the context of the inspected page. */ executionContextId?: ExecutionContextId; /** * Symbolic group name that can be used to release multiple objects. */ objectGroup?: string; /** * In silent mode exceptions thrown during evaluation are not reported and do not pause * execution. Overrides `setPauseOnException` state. */ silent?: boolean; /** * Determines whether Command Line API should be available during the evaluation. */ includeCommandLineAPI?: boolean; /** * Whether the result is expected to be a JSON object which should be sent by value. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. */ generatePreview?: boolean; /** * Whether execution should `await` for resulting value and return once awaited promise is * resolved. */ awaitPromise?: boolean; } export interface RunScriptResponse { /** * Run result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface SetAsyncCallStackDepthRequest { /** * Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async * call stacks (default). */ maxDepth: integer; } export interface SetCustomObjectFormatterEnabledRequest { enabled: boolean; } export interface SetMaxCallStackSizeToCaptureRequest { size: integer; } export interface AddBindingRequest { name: string; /** * If specified, the binding would only be exposed to the specified * execution context. If omitted and `executionContextName` is not set, * the binding is exposed to all execution contexts of the target. * This parameter is mutually exclusive with `executionContextName`. * Deprecated in favor of `executionContextName` due to an unclear use case * and bugs in implementation (crbug.com/1169639). `executionContextId` will be * removed in the future. * @deprecated * @experimental */ executionContextId?: ExecutionContextId; /** * If specified, the binding is exposed to the executionContext with * matching name, even for contexts created after the binding is added. * See also `ExecutionContext.name` and `worldName` parameter to * `Page.addScriptToEvaluateOnNewDocument`. * This parameter is mutually exclusive with `executionContextId`. */ executionContextName?: string; } export interface RemoveBindingRequest { name: string; } export interface GetExceptionDetailsRequest { /** * The error object for which to resolve the exception details. */ errorObjectId: RemoteObjectId; } export interface GetExceptionDetailsResponse { exceptionDetails?: ExceptionDetails; } /** * Notification is issued every time when binding is called. * @experimental */ export interface BindingCalledEvent { name: string; payload: string; /** * Identifier of the context where the call was made. */ executionContextId: ExecutionContextId; } export const enum ConsoleAPICalledEventType { Log = 'log', Debug = 'debug', Info = 'info', Error = 'error', Warning = 'warning', Dir = 'dir', DirXML = 'dirxml', Table = 'table', Trace = 'trace', Clear = 'clear', StartGroup = 'startGroup', StartGroupCollapsed = 'startGroupCollapsed', EndGroup = 'endGroup', Assert = 'assert', Profile = 'profile', ProfileEnd = 'profileEnd', Count = 'count', TimeEnd = 'timeEnd', } /** * Issued when console API was called. */ export interface ConsoleAPICalledEvent { /** * Type of the call. */ type: ('log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd'); /** * Call arguments. */ args: RemoteObject[]; /** * Identifier of the context where the call was made. */ executionContextId: ExecutionContextId; /** * Call timestamp. */ timestamp: Timestamp; /** * Stack trace captured when the call was made. The async stack chain is automatically reported for * the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call * chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field. */ stackTrace?: StackTrace; /** * Console context descriptor for calls on non-default console context (not console.*): * 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call * on named context. * @experimental */ context?: string; } /** * Issued when unhandled exception was revoked. */ export interface ExceptionRevokedEvent { /** * Reason describing why exception was revoked. */ reason: string; /** * The id of revoked exception, as reported in `exceptionThrown`. */ exceptionId: integer; } /** * Issued when exception was thrown and unhandled. */ export interface ExceptionThrownEvent { /** * Timestamp of the exception. */ timestamp: Timestamp; exceptionDetails: ExceptionDetails; } /** * Issued when new execution context is created. */ export interface ExecutionContextCreatedEvent { /** * A newly created execution context. */ context: ExecutionContextDescription; } /** * Issued when execution context is destroyed. */ export interface ExecutionContextDestroyedEvent { /** * Id of the destroyed context * @deprecated */ executionContextId: ExecutionContextId; /** * Unique Id of the destroyed context * @experimental */ executionContextUniqueId: string; } /** * Issued when object should be inspected (for example, as a result of inspect() command line API * call). */ export interface InspectRequestedEvent { object: RemoteObject; hints: any; /** * Identifier of the context where the call was made. * @experimental */ executionContextId?: ExecutionContextId; } } /** * This domain is deprecated. * @deprecated */ export namespace Schema { /** * Description of the protocol domain. */ export interface Domain { /** * Domain name. */ name: string; /** * Domain version. */ version: string; } export interface GetDomainsResponse { /** * List of supported domains. */ domains: Domain[]; } } /** * @experimental */ 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 interface AXValueSource { /** * What type of source this is. */ type: AXValueSourceType; /** * The value of this property source. */ value?: AXValue; /** * The name of the relevant attribute, if any. */ attribute?: string; /** * The value of the relevant attribute, if any. */ attributeValue?: AXValue; /** * Whether this source is superseded by a higher priority source. */ superseded?: boolean; /** * The native markup source for this value, e.g. a `