/********************************************************************** * 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. */ 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. (ConsoleMessageSource enum) */ source: ('xml' | 'javascript' | 'network' | 'console-api' | 'storage' | 'appcache' | 'rendering' | 'security' | 'other' | 'deprecation' | 'worker'); /** * Message severity. (ConsoleMessageLevel enum) */ 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. */ export interface ScriptPosition { lineNumber: integer; columnNumber: integer; } /** * Location range within one script. */ 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. */ 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; } 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. (ScopeType enum) */ 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; /** * (BreakLocationType enum) */ type?: ('debuggerStatement' | 'call' | 'return'); } /** * Enum of possible script languages. */ export type ScriptLanguage = ('JavaScript' | 'WebAssembly'); export const enum DebugSymbolsType { None = 'None', SourceMap = 'SourceMap', EmbeddedDWARF = 'EmbeddedDWARF', ExternalDWARF = 'ExternalDWARF', } /** * Debug symbols available for a wasm script. */ export interface DebugSymbols { /** * Type of the debug symbols. (DebugSymbolsType enum) */ type: ('None' | 'SourceMap' | 'EmbeddedDWARF' | 'ExternalDWARF'); /** * URL of the external symbol source. */ externalURL?: string; } export const enum ContinueToLocationRequestTargetCallFrames { Any = 'any', Current = 'current', } export interface ContinueToLocationRequest { /** * Location to continue to. */ location: Location; /** * (ContinueToLocationRequestTargetCallFrames enum) */ 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 paramter is omitted. */ maxScriptsCacheSize?: number; } export interface EnableResponse { /** * Unique identifier of the debugger. */ 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. */ 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). */ timeout?: Runtime.TimeDelta; } export interface EvaluateOnCallFrameResponse { /** * Object wrapper for the evaluation result. */ result: Runtime.RemoteObject; /** * Exception details. */ exceptionDetails?: Runtime.ExceptionDetails; } export interface ExecuteWasmEvaluatorRequest { /** * WebAssembly call frame identifier to evaluate on. */ callFrameId: CallFrameId; /** * Code of the evaluator module. */ evaluator: string; /** * Terminate execution after timing out (number of milliseconds). */ timeout?: Runtime.TimeDelta; } export interface ExecuteWasmEvaluatorResponse { /** * 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. */ bytecode?: string; } export interface GetWasmBytecodeRequest { /** * Id of the Wasm script to get source for. */ scriptId: Runtime.ScriptId; } export interface GetWasmBytecodeResponse { /** * Script source. */ 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 interface RestartFrameRequest { /** * Call frame identifier to evaluate on. */ callFrameId: CallFrameId; } export interface RestartFrameResponse { /** * New stack trace. */ callFrames: CallFrame[]; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. */ 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 SetBlackboxPatternsRequest { /** * Array of regexps that will be used to check script url for blackbox state. */ patterns: string[]; } 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. (SetInstrumentationBreakpointRequestInstrumentation enum) */ 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', Uncaught = 'uncaught', All = 'all', } export interface SetPauseOnExceptionsRequest { /** * Pause on exceptions mode. (SetPauseOnExceptionsRequestState enum) */ state: ('none' | 'uncaught' | 'all'); } export interface SetReturnValueRequest { /** * New return value. */ newValue: Runtime.CallArgument; } 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; } export interface SetScriptSourceResponse { /** * New stack trace in case editing has happened while VM was stopped. */ callFrames?: CallFrame[]; /** * Whether current call stack was modified after applying the changes. */ stackChanged?: boolean; /** * Async stack trace, if any. */ asyncStackTrace?: Runtime.StackTrace; /** * Async stack trace, if any. */ asyncStackTraceId?: Runtime.StackTraceId; /** * Exception details if any. */ 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. */ breakOnAsyncCall?: boolean; /** * The skipList specifies location ranges that should be skipped on step into. */ skipList?: LocationRange[]; } export interface StepOverRequest { /** * The skipList specifies location ranges that should be skipped on step over. */ skipList?: LocationRange[]; } /** * Fired when breakpoint is resolved to an actual script and location. */ export interface BreakpointResolvedEvent { /** * Breakpoint unique identifier. */ breakpointId: BreakpointId; /** * Actual breakpoint location. */ location: Location; } export const enum PausedEventReason { Ambiguous = 'ambiguous', Assert = 'assert', DebugCommand = 'debugCommand', DOM = 'DOM', EventListener = 'EventListener', Exception = 'exception', Instrumentation = 'instrumentation', OOM = 'OOM', Other = 'other', PromiseRejection = 'promiseRejection', XHR = 'XHR', } /** * 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. (PausedEventReason enum) */ reason: ('ambiguous' | 'assert' | 'debugCommand' | 'DOM' | 'EventListener' | 'exception' | 'instrumentation' | 'OOM' | 'other' | 'promiseRejection' | 'XHR'); /** * 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. */ asyncStackTraceId?: Runtime.StackTraceId; /** * Never present, will be removed. */ 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. */ hash: string; /** * Embedder-specific auxiliary data. */ 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. */ stackTrace?: Runtime.StackTrace; /** * If the scriptLanguage is WebAssembly, the code section offset in the module. */ codeOffset?: integer; /** * The language of the script. */ scriptLanguage?: Debugger.ScriptLanguage; /** * The name the embedder supplied for this script. */ 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. */ hash: string; /** * Embedder-specific auxiliary data. */ executionContextAuxData?: any; /** * True, if this script is generated as a result of the live edit operation. */ 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. */ stackTrace?: Runtime.StackTrace; /** * If the scriptLanguage is WebAssembly, the code section offset in the module. */ codeOffset?: integer; /** * The language of the script. */ scriptLanguage?: Debugger.ScriptLanguage; /** * If the scriptLanguage is WebASsembly, the source of debug symbols for the module. */ debugSymbols?: Debugger.DebugSymbols; /** * The name the embedder supplied for this script. */ embedderName?: string; } } 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; } 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; treatGlobalObjectsAsRoots?: boolean; } export interface TakeHeapSnapshotRequest { /** * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. */ reportProgress?: boolean; /** * If true, a raw snapshot without artifical roots will be generated */ treatGlobalObjectsAsRoots?: 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[]; } /** * Describes a type collected during runtime. */ export interface TypeObject { /** * Name of a type collected with type profiling. */ name: string; } /** * Source offset and types for a parameter or return value. */ export interface TypeProfileEntry { /** * Source offset of the parameter or end of function for return values. */ offset: integer; /** * The types for this parameter or return value. */ types: TypeObject[]; } /** * Type profile data collected during runtime for a JavaScript script. */ export interface ScriptTypeProfile { /** * JavaScript script id. */ scriptId: Runtime.ScriptId; /** * JavaScript script name or url. */ url: string; /** * Type profile entries for parameters and return values of the functions in the script. */ entries: TypeProfileEntry[]; } /** * Collected counter information. */ export interface CounterInfo { /** * Counter name. */ name: string; /** * Counter value. */ value: integer; } /** * Runtime call counter information. */ export interface RuntimeCallCounterInfo { /** * Counter name. */ name: string; /** * Counter value. */ value: number; /** * Counter time in seconds. */ time: number; } 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 TakeTypeProfileResponse { /** * Type profile for all scripts since startTypeProfile() was turned on. */ result: ScriptTypeProfile[]; } export interface GetCountersResponse { /** * Collected counters information. */ result: CounterInfo[]; } export interface GetRuntimeCallStatsResponse { /** * Collected runtime call counter information. */ result: RuntimeCallCounterInfo[]; } 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 immediatelly at a certain point in time. */ export interface PreciseCoverageDeltaUpdateEvent { /** * Monotonically increasing time (in seconds) when the coverage update was taken in the backend. */ timestamp: number; /** * Identifier for distinguishing coverage events. */ occassion: 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; /** * 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', Wasm = 'wasm', } 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', I32 = 'i32', I64 = 'i64', F32 = 'f32', F64 = 'f64', V128 = 'v128', Externref = 'externref', } /** * Mirror object referencing original JavaScript object. */ export interface RemoteObject { /** * Object type. (RemoteObjectType enum) */ type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint' | 'wasm'); /** * Object subtype hint. Specified for `object` or `wasm` type values only. (RemoteObjectSubtype enum) */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error' | 'proxy' | 'promise' | 'typedarray' | 'arraybuffer' | 'dataview' | 'i32' | 'i64' | 'f32' | 'f64' | 'v128' | 'externref'); /** * 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; /** * Unique object identifier (for non-primitive values). */ objectId?: RemoteObjectId; /** * Preview containing abbreviated property values. Specified for `object` type values only. */ preview?: ObjectPreview; customPreview?: CustomPreview; } 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', } /** * Object containing abbreviated remote object value. */ export interface ObjectPreview { /** * Object type. (ObjectPreviewType enum) */ type: ('object' | 'function' | 'undefined' | 'string' | 'number' | 'boolean' | 'symbol' | 'bigint'); /** * Object subtype hint. Specified for `object` type values only. (ObjectPreviewSubtype enum) */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error'); /** * 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', } export interface PropertyPreview { /** * Property name. */ name: string; /** * Object type. Accessor means that the property itself is an accessor property. (PropertyPreviewType enum) */ 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. (PropertyPreviewSubtype enum) */ subtype?: ('array' | 'null' | 'node' | 'regexp' | 'date' | 'map' | 'set' | 'weakmap' | 'weakset' | 'iterator' | 'generator' | 'error'); } 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. */ 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; /** * Embedder-specific auxiliary data. */ 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; } /** * 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. */ parentId?: StackTraceId; } /** * Unique identifier of current debugger. */ 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. */ 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. */ returnByValue?: boolean; /** * Whether preview should be generated for the result. */ 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; } 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. */ 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. */ 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. */ throwOnSideEffect?: boolean; /** * Terminate execution after timing out (number of milliseconds). */ timeout?: TimeDelta; /** * Disable breakpoints during execution. */ 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. */ 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. */ allowUnsafeEvalBlockedByCSP?: boolean; } export interface EvaluateResponse { /** * Evaluation result. */ result: RemoteObject; /** * Exception details. */ exceptionDetails?: ExceptionDetails; } export interface GetIsolateIdResponse { /** * The isolate id. */ id: string; } export interface GetHeapUsageResponse { /** * Used heap size in bytes. */ usedSize: number; /** * Allocated heap size in bytes. */ totalSize: 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. */ accessorPropertiesOnly?: boolean; /** * Whether preview should be generated for the results. */ generatePreview?: boolean; } export interface GetPropertiesResponse { /** * Object properties. */ result: PropertyDescriptor[]; /** * Internal object properties (only of the element itself). */ internalProperties?: InternalPropertyDescriptor[]; /** * Object private properties. */ 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; executionContextId?: ExecutionContextId; } export interface RemoveBindingRequest { name: string; } /** * Notification is issued every time when binding is called. */ 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. (ConsoleAPICalledEventType enum) */ 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. */ 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 */ executionContextId: ExecutionContextId; } /** * Issued when object should be inspected (for example, as a result of inspect() command line API * call). */ export interface InspectRequestedEvent { object: RemoteObject; hints: any; } } /** * This domain is 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[]; } } 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 = ('figcaption' | 'label' | 'labelfor' | 'labelwrapped' | 'legend' | '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