UNPKG

devtools-protocol

Version:
1,295 lines (1,015 loc) • 217 kB
// Copyright (c) 2026 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /********************************************************************** * Auto-generated by protocol-dts-generator.ts. Do not edit manually. * **********************************************************************/ import Protocol from './protocol' /** * API generated from Protocol commands and events. */ export namespace ProtocolProxyApi { export interface ProtocolApi { Console: ConsoleApi; Debugger: DebuggerApi; HeapProfiler: HeapProfilerApi; Profiler: ProfilerApi; Runtime: RuntimeApi; Schema: SchemaApi; Accessibility: AccessibilityApi; Ads: AdsApi; Animation: AnimationApi; Audits: AuditsApi; Autofill: AutofillApi; BackgroundService: BackgroundServiceApi; BluetoothEmulation: BluetoothEmulationApi; Browser: BrowserApi; CSS: CSSApi; CacheStorage: CacheStorageApi; Cast: CastApi; CrashReportContext: CrashReportContextApi; DOM: DOMApi; DOMDebugger: DOMDebuggerApi; DOMSnapshot: DOMSnapshotApi; DOMStorage: DOMStorageApi; DeviceAccess: DeviceAccessApi; DeviceOrientation: DeviceOrientationApi; DigitalCredentials: DigitalCredentialsApi; Emulation: EmulationApi; EventBreakpoints: EventBreakpointsApi; Extensions: ExtensionsApi; FedCm: FedCmApi; Fetch: FetchApi; FileSystem: FileSystemApi; HeadlessExperimental: HeadlessExperimentalApi; IO: IOApi; IndexedDB: IndexedDBApi; Input: InputApi; Inspector: InspectorApi; LayerTree: LayerTreeApi; Log: LogApi; Media: MediaApi; Memory: MemoryApi; Network: NetworkApi; Overlay: OverlayApi; PWA: PWAApi; Page: PageApi; Performance: PerformanceApi; PerformanceTimeline: PerformanceTimelineApi; Preload: PreloadApi; Security: SecurityApi; ServiceWorker: ServiceWorkerApi; SmartCardEmulation: SmartCardEmulationApi; Storage: StorageApi; SystemInfo: SystemInfoApi; Target: TargetApi; Tethering: TetheringApi; Tracing: TracingApi; WebAudio: WebAudioApi; WebAuthn: WebAuthnApi; WebMCP: WebMCPApi; } export interface ConsoleApi { /** * Does nothing. */ clearMessages(): Promise<void>; /** * Disables console domain, prevents further console messages from being reported to the client. */ disable(): Promise<void>; /** * Enables console domain, sends the messages collected so far to the client by means of the * `messageAdded` notification. */ enable(): Promise<void>; /** * Issued when new console message is added. */ on(event: 'messageAdded', listener: (params: Protocol.Console.MessageAddedEvent) => void): void; } export interface DebuggerApi { /** * Continues execution until specific location is reached. */ continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise<void>; /** * Disables debugger for given page. */ disable(): Promise<void>; /** * Enables debugger for the given page. Clients should not assume that the debugging has been * enabled until the result for this command is received. */ enable(params: Protocol.Debugger.EnableRequest): Promise<Protocol.Debugger.EnableResponse>; /** * Evaluates expression on a given call frame. */ evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise<Protocol.Debugger.EvaluateOnCallFrameResponse>; /** * Returns possible locations for breakpoint. scriptId in start and end range locations should be * the same. */ getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise<Protocol.Debugger.GetPossibleBreakpointsResponse>; /** * Returns source for the script with given id. */ getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise<Protocol.Debugger.GetScriptSourceResponse>; /** * @experimental */ disassembleWasmModule(params: Protocol.Debugger.DisassembleWasmModuleRequest): Promise<Protocol.Debugger.DisassembleWasmModuleResponse>; /** * Disassemble the next chunk of lines for the module corresponding to the * stream. If disassembly is complete, this API will invalidate the streamId * and return an empty chunk. Any subsequent calls for the now invalid stream * will return errors. * @experimental */ nextWasmDisassemblyChunk(params: Protocol.Debugger.NextWasmDisassemblyChunkRequest): Promise<Protocol.Debugger.NextWasmDisassemblyChunkResponse>; /** * This command is deprecated. Use getScriptSource instead. * @deprecated */ getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise<Protocol.Debugger.GetWasmBytecodeResponse>; /** * Returns stack trace with given `stackTraceId`. * @experimental */ getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise<Protocol.Debugger.GetStackTraceResponse>; /** * Stops on the next JavaScript statement. */ pause(): Promise<void>; /** * @deprecated * @experimental */ pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise<void>; /** * Removes JavaScript breakpoint. */ removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise<void>; /** * Restarts particular call frame from the beginning. The old, deprecated * behavior of `restartFrame` is to stay paused and allow further CDP commands * after a restart was scheduled. This can cause problems with restarting, so * we now continue execution immediatly after it has been scheduled until we * reach the beginning of the restarted frame. * * To stay back-wards compatible, `restartFrame` now expects a `mode` * parameter to be present. If the `mode` parameter is missing, `restartFrame` * errors out. * * The various return values are deprecated and `callFrames` is always empty. * Use the call frames from the `Debugger#paused` events instead, that fires * once V8 pauses at the beginning of the restarted function. */ restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise<Protocol.Debugger.RestartFrameResponse>; /** * Resumes JavaScript execution. */ resume(params: Protocol.Debugger.ResumeRequest): Promise<void>; /** * Searches for given string in script content. */ searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise<Protocol.Debugger.SearchInContentResponse>; /** * Enables or disables async call stacks tracking. */ setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise<void>; /** * Replace previous blackbox execution contexts with passed ones. Forces backend to skip * stepping/pausing in scripts in these execution contexts. VM will try to leave blackboxed script by * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. * @experimental */ setBlackboxExecutionContexts(params: Protocol.Debugger.SetBlackboxExecutionContextsRequest): Promise<void>; /** * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in * scripts with url matching one of the patterns. VM will try to leave blackboxed script by * performing 'step in' several times, finally resorting to 'step out' if unsuccessful. * @experimental */ setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise<void>; /** * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted * scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. * Positions array contains positions where blackbox state is changed. First interval isn't * blackboxed. Array should be sorted. * @experimental */ setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise<void>; /** * Sets JavaScript breakpoint at a given location. */ setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise<Protocol.Debugger.SetBreakpointResponse>; /** * Sets instrumentation breakpoint. */ setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise<Protocol.Debugger.SetInstrumentationBreakpointResponse>; /** * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this * command is issued, all existing parsed scripts will have breakpoints resolved and returned in * `locations` property. Further matching script parsing will result in subsequent * `breakpointResolved` events issued. This logical breakpoint will survive page reloads. */ setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise<Protocol.Debugger.SetBreakpointByUrlResponse>; /** * Sets JavaScript breakpoint before each call to the given function. * If another function was created from the same source as a given one, * calling it will also trigger the breakpoint. * @experimental */ setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise<Protocol.Debugger.SetBreakpointOnFunctionCallResponse>; /** * Activates / deactivates all breakpoints on the page. */ setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise<void>; /** * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, * or caught exceptions, no exceptions. Initial pause on exceptions state is `none`. */ setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise<void>; /** * Changes return value in top frame. Available only at return break position. * @experimental */ setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise<void>; /** * Edits JavaScript source live. * * In general, functions that are currently on the stack can not be edited with * a single exception: If the edited function is the top-most stack frame and * that is the only activation of that function on the stack. In this case * the live edit will be successful and a `Debugger.restartFrame` for the * top-most function is automatically triggered. */ setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise<Protocol.Debugger.SetScriptSourceResponse>; /** * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). */ setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise<void>; /** * Changes value of variable in a callframe. Object-based scopes are not supported and must be * mutated manually. */ setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise<void>; /** * Steps into the function call. */ stepInto(params: Protocol.Debugger.StepIntoRequest): Promise<void>; /** * Steps out of the function call. */ stepOut(): Promise<void>; /** * Steps over the statement. */ stepOver(params: Protocol.Debugger.StepOverRequest): Promise<void>; /** * Fired when breakpoint is resolved to an actual script and location. * Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event. * @deprecated */ on(event: 'breakpointResolved', listener: (params: Protocol.Debugger.BreakpointResolvedEvent) => void): void; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ on(event: 'paused', listener: (params: Protocol.Debugger.PausedEvent) => void): void; /** * Fired when the virtual machine resumed execution. */ on(event: 'resumed', listener: () => void): void; /** * Fired when virtual machine fails to parse the script. */ on(event: 'scriptFailedToParse', listener: (params: Protocol.Debugger.ScriptFailedToParseEvent) => void): void; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected * scripts upon enabling debugger. */ on(event: 'scriptParsed', listener: (params: Protocol.Debugger.ScriptParsedEvent) => void): void; } export interface HeapProfilerApi { /** * Enables console to refer to the node with given id via $x (see Command Line API for more details * $x functions). */ addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise<void>; collectGarbage(): Promise<void>; disable(): Promise<void>; enable(): Promise<void>; getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetHeapObjectIdResponse>; getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise<Protocol.HeapProfiler.GetObjectByHeapObjectIdResponse>; getSamplingProfile(): Promise<Protocol.HeapProfiler.GetSamplingProfileResponse>; startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise<void>; startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise<void>; stopSampling(): Promise<Protocol.HeapProfiler.StopSamplingResponse>; stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise<void>; takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise<void>; on(event: 'addHeapSnapshotChunk', listener: (params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent) => void): void; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ on(event: 'heapStatsUpdate', listener: (params: Protocol.HeapProfiler.HeapStatsUpdateEvent) => void): void; /** * 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. */ on(event: 'lastSeenObjectId', listener: (params: Protocol.HeapProfiler.LastSeenObjectIdEvent) => void): void; on(event: 'reportHeapSnapshotProgress', listener: (params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent) => void): void; on(event: 'resetProfiles', listener: () => void): void; } export interface ProfilerApi { disable(): Promise<void>; enable(): Promise<void>; /** * Collect coverage data for the current isolate. The coverage data may be incomplete due to * garbage collection. */ getBestEffortCoverage(): Promise<Protocol.Profiler.GetBestEffortCoverageResponse>; /** * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. */ setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise<void>; start(): Promise<void>; /** * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code * coverage may be incomplete. Enabling prevents running optimized code and resets execution * counters. */ startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise<Protocol.Profiler.StartPreciseCoverageResponse>; stop(): Promise<Protocol.Profiler.StopResponse>; /** * Disable precise code coverage. Disabling releases unnecessary execution count records and allows * executing optimized code. */ stopPreciseCoverage(): Promise<void>; /** * Collect coverage data for the current isolate, and resets execution counters. Precise code * coverage needs to have started. */ takePreciseCoverage(): Promise<Protocol.Profiler.TakePreciseCoverageResponse>; on(event: 'consoleProfileFinished', listener: (params: Protocol.Profiler.ConsoleProfileFinishedEvent) => void): void; /** * Sent when new profile recording is started using console.profile() call. */ on(event: 'consoleProfileStarted', listener: (params: Protocol.Profiler.ConsoleProfileStartedEvent) => void): void; /** * 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 */ on(event: 'preciseCoverageDeltaUpdate', listener: (params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent) => void): void; } export interface RuntimeApi { /** * Add handler to promise with given promise object id. */ awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise<Protocol.Runtime.AwaitPromiseResponse>; /** * Calls function with given declaration on the given object. Object group of the result is * inherited from the target object. */ callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise<Protocol.Runtime.CallFunctionOnResponse>; /** * Compiles expression. */ compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise<Protocol.Runtime.CompileScriptResponse>; /** * Disables reporting of execution contexts creation. */ disable(): Promise<void>; /** * Discards collected exceptions and console API calls. */ discardConsoleEntries(): Promise<void>; /** * Enables reporting of execution contexts creation by means of `executionContextCreated` event. * When the reporting gets enabled the event will be sent immediately for each existing execution * context. */ enable(): Promise<void>; /** * Evaluates expression on global object. */ evaluate(params: Protocol.Runtime.EvaluateRequest): Promise<Protocol.Runtime.EvaluateResponse>; /** * Returns the isolate id. * @experimental */ getIsolateId(): Promise<Protocol.Runtime.GetIsolateIdResponse>; /** * Returns the JavaScript heap usage. * It is the total usage of the corresponding isolate not scoped to a particular Runtime. * @experimental */ getHeapUsage(): Promise<Protocol.Runtime.GetHeapUsageResponse>; /** * Returns properties of a given object. Object group of the result is inherited from the target * object. */ getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise<Protocol.Runtime.GetPropertiesResponse>; /** * Returns all let, const and class variables from global scope. */ globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise<Protocol.Runtime.GlobalLexicalScopeNamesResponse>; queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise<Protocol.Runtime.QueryObjectsResponse>; /** * Releases remote object with given id. */ releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise<void>; /** * Releases all remote objects that belong to a given group. */ releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise<void>; /** * Tells inspected instance to run if it was waiting for debugger to attach. */ runIfWaitingForDebugger(): Promise<void>; /** * Runs script with given id in a given context. */ runScript(params: Protocol.Runtime.RunScriptRequest): Promise<Protocol.Runtime.RunScriptResponse>; /** * Enables or disables async call stacks tracking. */ setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise<void>; /** * @experimental */ setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise<void>; /** * @experimental */ setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise<void>; /** * Terminate current or next JavaScript execution. * Will cancel the termination when the outer-most script execution ends. * @experimental */ terminateExecution(): Promise<void>; /** * If executionContextId is empty, adds binding with the given name on the * global objects of all inspected contexts, including those created later, * bindings survive reloads. * Binding function takes exactly one argument, this argument should be string, * in case of any other input, function throws an exception. * Each binding function call produces Runtime.bindingCalled notification. */ addBinding(params: Protocol.Runtime.AddBindingRequest): Promise<void>; /** * This method does not remove binding function from global object but * unsubscribes current runtime agent from Runtime.bindingCalled notifications. */ removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<void>; /** * This method tries to lookup and populate exception details for a * JavaScript Error object. * Note that the stackTrace portion of the resulting exceptionDetails will * only be populated if the Runtime domain was enabled at the time when the * Error was thrown. * @experimental */ getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest): Promise<Protocol.Runtime.GetExceptionDetailsResponse>; /** * Notification is issued every time when binding is called. * @experimental */ on(event: 'bindingCalled', listener: (params: Protocol.Runtime.BindingCalledEvent) => void): void; /** * Issued when console API was called. */ on(event: 'consoleAPICalled', listener: (params: Protocol.Runtime.ConsoleAPICalledEvent) => void): void; /** * Issued when unhandled exception was revoked. */ on(event: 'exceptionRevoked', listener: (params: Protocol.Runtime.ExceptionRevokedEvent) => void): void; /** * Issued when exception was thrown and unhandled. */ on(event: 'exceptionThrown', listener: (params: Protocol.Runtime.ExceptionThrownEvent) => void): void; /** * Issued when new execution context is created. */ on(event: 'executionContextCreated', listener: (params: Protocol.Runtime.ExecutionContextCreatedEvent) => void): void; /** * Issued when execution context is destroyed. */ on(event: 'executionContextDestroyed', listener: (params: Protocol.Runtime.ExecutionContextDestroyedEvent) => void): void; /** * Issued when all executionContexts were cleared in browser */ on(event: 'executionContextsCleared', listener: () => void): void; /** * Issued when object should be inspected (for example, as a result of inspect() command line API * call). */ on(event: 'inspectRequested', listener: (params: Protocol.Runtime.InspectRequestedEvent) => void): void; } export interface SchemaApi { /** * Returns supported domains. */ getDomains(): Promise<Protocol.Schema.GetDomainsResponse>; } export interface AccessibilityApi { /** * Disables the accessibility domain. */ disable(): Promise<void>; /** * Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. * This turns on accessibility for the page, which can impact performance until accessibility is disabled. */ enable(): Promise<void>; /** * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. * @experimental */ getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>; /** * Fetches the entire accessibility tree for the root Document * @experimental */ getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise<Protocol.Accessibility.GetFullAXTreeResponse>; /** * Fetches the root node. * Requires `enable()` to have been called previously. * @experimental */ getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise<Protocol.Accessibility.GetRootAXNodeResponse>; /** * Fetches a node and all ancestors up to and including the root. * Requires `enable()` to have been called previously. * @experimental */ getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise<Protocol.Accessibility.GetAXNodeAndAncestorsResponse>; /** * Fetches a particular accessibility node by AXNodeId. * Requires `enable()` to have been called previously. * @experimental */ getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise<Protocol.Accessibility.GetChildAXNodesResponse>; /** * Query a DOM node's accessibility subtree for accessible name and role. * This command computes the name and role for all nodes in the subtree, including those that are * ignored for accessibility, and returns those that match the specified name and role. If no DOM * node is specified, or the DOM node does not exist, the command returns an error. If neither * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. * @experimental */ queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<Protocol.Accessibility.QueryAXTreeResponse>; /** * The loadComplete event mirrors the load complete event sent by the browser to assistive * technology when the web page has finished loading. * @experimental */ on(event: 'loadComplete', listener: (params: Protocol.Accessibility.LoadCompleteEvent) => void): void; /** * The nodesUpdated event is sent every time a previously requested node has changed the in tree. * @experimental */ on(event: 'nodesUpdated', listener: (params: Protocol.Accessibility.NodesUpdatedEvent) => void): void; } export interface AdsApi { /** * Retrieves ad metrics for the current page. */ getAdMetrics(): Promise<Protocol.Ads.GetAdMetricsResponse>; } export interface AnimationApi { /** * Disables animation domain notifications. */ disable(): Promise<void>; /** * Enables animation domain notifications. */ enable(): Promise<void>; /** * Returns the current time of the an animation. */ getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>; /** * Gets the playback rate of the document timeline. */ getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>; /** * Releases a set of animations to no longer be manipulated. */ releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<void>; /** * Gets the remote object of the Animation. */ resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>; /** * Seek a set of animations to a particular time within each animation. */ seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<void>; /** * Sets the paused state of a set of animations. */ setPaused(params: Protocol.Animation.SetPausedRequest): Promise<void>; /** * Sets the playback rate of the document timeline. */ setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<void>; /** * Sets the timing of an animation node. */ setTiming(params: Protocol.Animation.SetTimingRequest): Promise<void>; /** * Event for when an animation has been cancelled. */ on(event: 'animationCanceled', listener: (params: Protocol.Animation.AnimationCanceledEvent) => void): void; /** * Event for each animation that has been created. */ on(event: 'animationCreated', listener: (params: Protocol.Animation.AnimationCreatedEvent) => void): void; /** * Event for animation that has been started. */ on(event: 'animationStarted', listener: (params: Protocol.Animation.AnimationStartedEvent) => void): void; /** * Event for animation that has been updated. */ on(event: 'animationUpdated', listener: (params: Protocol.Animation.AnimationUpdatedEvent) => void): void; } export interface AuditsApi { /** * Returns the response body and size if it were re-encoded with the specified settings. Only * applies to images. */ getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise<Protocol.Audits.GetEncodedResponseResponse>; /** * Disables issues domain, prevents further issues from being reported to the client. */ disable(): Promise<void>; /** * Enables issues domain, sends the issues collected so far to the client by means of the * `issueAdded` event. */ enable(): Promise<void>; /** * Runs the form issues check for the target page. Found issues are reported * using Audits.issueAdded event. */ checkFormsIssues(): Promise<Protocol.Audits.CheckFormsIssuesResponse>; on(event: 'issueAdded', listener: (params: Protocol.Audits.IssueAddedEvent) => void): void; } export interface AutofillApi { /** * Trigger autofill on a form identified by the fieldId. * If the field and related form cannot be autofilled, returns an error. */ trigger(params: Protocol.Autofill.TriggerRequest): Promise<void>; /** * Set addresses so that developers can verify their forms implementation. */ setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise<void>; /** * Disables autofill domain notifications. */ disable(): Promise<void>; /** * Enables autofill domain notifications. */ enable(): Promise<void>; /** * Emitted when an address form is filled. */ on(event: 'addressFormFilled', listener: (params: Protocol.Autofill.AddressFormFilledEvent) => void): void; } export interface BackgroundServiceApi { /** * Enables event updates for the service. */ startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise<void>; /** * Disables event updates for the service. */ stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<void>; /** * Set the recording state for the service. */ setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<void>; /** * Clears all stored data for the service. */ clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<void>; /** * Called when the recording state for the service has been updated. */ on(event: 'recordingStateChanged', listener: (params: Protocol.BackgroundService.RecordingStateChangedEvent) => void): void; /** * Called with all existing backgroundServiceEvents when enabled, and all new * events afterwards if enabled and recording. */ on(event: 'backgroundServiceEventReceived', listener: (params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent) => void): void; } export interface BluetoothEmulationApi { /** * Enable the BluetoothEmulation domain. */ enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise<void>; /** * Set the state of the simulated central. */ setSimulatedCentralState(params: Protocol.BluetoothEmulation.SetSimulatedCentralStateRequest): Promise<void>; /** * Disable the BluetoothEmulation domain. */ disable(): Promise<void>; /** * Simulates a peripheral with |address|, |name| and |knownServiceUuids| * that has already been connected to the system. */ simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise<void>; /** * Simulates an advertisement packet described in |entry| being received by * the central. */ simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise<void>; /** * Simulates the response code from the peripheral with |address| for a * GATT operation of |type|. The |code| value follows the HCI Error Codes from * Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes. */ simulateGATTOperationResponse(params: Protocol.BluetoothEmulation.SimulateGATTOperationResponseRequest): Promise<void>; /** * Simulates the response from the characteristic with |characteristicId| for a * characteristic operation of |type|. The |code| value follows the Error * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. * The |data| is expected to exist when simulating a successful read operation * response. */ simulateCharacteristicOperationResponse(params: Protocol.BluetoothEmulation.SimulateCharacteristicOperationResponseRequest): Promise<void>; /** * Simulates the response from the descriptor with |descriptorId| for a * descriptor operation of |type|. The |code| value follows the Error * Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. * The |data| is expected to exist when simulating a successful read operation * response. */ simulateDescriptorOperationResponse(params: Protocol.BluetoothEmulation.SimulateDescriptorOperationResponseRequest): Promise<void>; /** * Adds a service with |serviceUuid| to the peripheral with |address|. */ addService(params: Protocol.BluetoothEmulation.AddServiceRequest): Promise<Protocol.BluetoothEmulation.AddServiceResponse>; /** * Removes the service respresented by |serviceId| from the simulated central. */ removeService(params: Protocol.BluetoothEmulation.RemoveServiceRequest): Promise<void>; /** * Adds a characteristic with |characteristicUuid| and |properties| to the * service represented by |serviceId|. */ addCharacteristic(params: Protocol.BluetoothEmulation.AddCharacteristicRequest): Promise<Protocol.BluetoothEmulation.AddCharacteristicResponse>; /** * Removes the characteristic respresented by |characteristicId| from the * simulated central. */ removeCharacteristic(params: Protocol.BluetoothEmulation.RemoveCharacteristicRequest): Promise<void>; /** * Adds a descriptor with |descriptorUuid| to the characteristic respresented * by |characteristicId|. */ addDescriptor(params: Protocol.BluetoothEmulation.AddDescriptorRequest): Promise<Protocol.BluetoothEmulation.AddDescriptorResponse>; /** * Removes the descriptor with |descriptorId| from the simulated central. */ removeDescriptor(params: Protocol.BluetoothEmulation.RemoveDescriptorRequest): Promise<void>; /** * Simulates a GATT disconnection from the peripheral with |address|. */ simulateGATTDisconnection(params: Protocol.BluetoothEmulation.SimulateGATTDisconnectionRequest): Promise<void>; /** * Event for when a GATT operation of |type| to the peripheral with |address| * happened. */ on(event: 'gattOperationReceived', listener: (params: Protocol.BluetoothEmulation.GattOperationReceivedEvent) => void): void; /** * Event for when a characteristic operation of |type| to the characteristic * respresented by |characteristicId| happened. |data| and |writeType| is * expected to exist when |type| is write. */ on(event: 'characteristicOperationReceived', listener: (params: Protocol.BluetoothEmulation.CharacteristicOperationReceivedEvent) => void): void; /** * Event for when a descriptor operation of |type| to the descriptor * respresented by |descriptorId| happened. |data| is expected to exist when * |type| is write. */ on(event: 'descriptorOperationReceived', listener: (params: Protocol.BluetoothEmulation.DescriptorOperationReceivedEvent) => void): void; } export interface BrowserApi { /** * Set permission settings for given embedding and embedded origins. * @experimental */ setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<void>; /** * Grant specific permissions to the given origin and reject all others. Deprecated. Use * setPermission instead. * @deprecated * @experimental */ grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<void>; /** * Reset all permission management for all origins. */ resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<void>; /** * Set the behavior when downloading a file. * @experimental */ setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<void>; /** * Cancel a download if in progress * @experimental */ cancelDownload(params: Protocol.Browser.CancelDownloadRequest): Promise<void>; /** * Close browser gracefully. */ close(): Promise<void>; /** * Crashes browser on the main thread. * @experimental */ crash(): Promise<void>; /** * Crashes GPU process. * @experimental */ crashGpuProcess(): Promise<void>; /** * Returns version information. */ getVersion(): Promise<Protocol.Browser.GetVersionResponse>; /** * Returns the command line switches for the browser process if, and only if * --enable-automation is on the commandline. * @experimental */ getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>; /** * Get Chrome histograms. * @experimental */ getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>; /** * Get a Chrome histogram by name. * @experimental */ getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>; /** * Get position and size of the browser window. * @experimental */ getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>; /** * Get the browser window that contains the devtools target. * @experimental */ getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>; /** * Set position and/or size of the browser window. * @experimental */ setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<void>; /** * Set size of the browser contents resizing browser window as necessary. * @experimental */ setContentsSize(params: Protocol.Browser.SetContentsSizeRequest): Promise<void>; /** * Set dock tile details, platform-specific. * @experimental */ setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<void>; /** * Invoke custom browser commands used by telemetry. * @experimental */ executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest): Promise<void>; /** * Allows a site to use privacy sandbox features that require enrollment * without the site actually being enrolled. Only supported on page targets. */ addPrivacySandboxEnrollmentOverride(params: Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest): Promise<void>; /** * Fired when page is about to start a download. * @experimental */ on(event: 'downloadWillBegin', listener: (params: Protocol.Browser.DownloadWillBeginEvent) => void): void; /** * Fired when download makes progress. Last call has |done| == true. * @experimental */ on(event: 'downloadProgress', listener: (params: Protocol.Browser.DownloadProgressEvent) => void): void; } export interface CSSApi { /** * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the * position specified by `location`. */ addRule(params: Protocol.CSS.AddRuleRequest): Promise<Protocol.CSS.AddRuleResponse>; /** * Returns all class names from specified stylesheet. */ collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>; /** * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. */ createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>; /** * Disables the CSS agent for the given page. */ disable(): Promise<void>; /** * Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been * enabled until the result of this command is received. */ enable(): Promise<void>; /** * Ensures that the given node will have specified pseudo-classes whenever its style is computed by * the browser. */ forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise<void>; /** * Ensures that the given node is in its starting-style state. */ forceStartingStyle(params: Protocol.CSS.ForceStartingStyleRequest): Promise<void>; getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>; /** * Returns the computed style for a DOM node identified by `nodeId`. */ getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>; /** * Resolve the specified values in the context of the provided element. * For example, a value of '1em' is evaluated according to the computed * 'font-size' of the element and a value 'calc(1px + 2px)' will be * resolved to '3px'. * If the `propertyName` was specified the `values` are resolved as if * they were property's declaration. If a value cannot be parsed according * to the provided property syntax, the value is parsed using combined * syntax as if null `propertyName` was provided. If the value cannot be * resolved even then, return the provided value without any changes. * Note: this function currently does not resolve CSS random() function, * it returns unmodified random() function parts.` * @experimental */ resolveValues(params: Protocol.CSS.ResolveValuesRequest): Promise<Protocol.CSS.ResolveValuesResponse>; /** * @experimental */ getLonghandProperties(params: Protocol.CSS.GetLonghandPropertiesRequest): Promise<Protocol.CSS.GetLonghandPropertiesResponse>; /** * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM * attributes) for a DOM node identified by `nodeId`. */ getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>; /** * Returns the styles coming from animations & transitions * including the animation & transition styles coming from inheritance chain. * @experimental */ getAnimatedStylesForNode(params: Protocol.CSS.GetAnimatedStylesForNodeRequest): Promise<Protocol.CSS.GetAnimatedStylesForNodeResponse>; /** * Returns requested styles for a DOM node identified by `nodeId`. */ getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>; /** * Returns the values of the default UA-defined environment variables used in env() * @experimental */ getEnvironmentVariables(): Promise<Protocol.CSS.GetEnvironmentVariablesResponse>; /** * Returns all media queries parsed by the rendering engine. */ getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>; /** * Requests information about platform fonts which we used to render child TextNodes in the given * node. */ getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>; /** * Returns the current textual content for a stylesheet. */ getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>; /** * Returns all layers parsed by the rendering engine for the tree scope of a node. * Given a DOM element identified by nodeId, getLayersForNode returns the root * layer for the nearest ancestor document or shadow root. The layer root contains * the full layer tree for the tree scope and their ordering. * @experimental */ getLayersForNode(params: Protocol.CSS.GetLayersForNodeRequest): Promise<Protocol.CSS.GetLayersForNodeResponse>; /** * Given a CSS selector text and a style sheet ID, getLocationForSelector * returns an array of locations of the CSS selector in the st