// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * This file is auto-generated, do not edit manually. * * Re-generate with: npm run generate-protocol-resources. */ import type * as Protocol from './protocol.js' /** * API generated from Protocol commands and events. */ declare namespace ProtocolProxyApi { export type ProtocolDomainName = keyof ProtocolApi; export interface ProtocolApi { Accessibility: AccessibilityApi; Animation: AnimationApi; Audits: AuditsApi; Autofill: AutofillApi; BackgroundService: BackgroundServiceApi; BluetoothEmulation: BluetoothEmulationApi; Browser: BrowserApi; CSS: CSSApi; CacheStorage: CacheStorageApi; Cast: CastApi; DOM: DOMApi; DOMDebugger: DOMDebuggerApi; DOMSnapshot: DOMSnapshotApi; DOMStorage: DOMStorageApi; DeviceAccess: DeviceAccessApi; DeviceOrientation: DeviceOrientationApi; 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; Debugger: DebuggerApi; HeapProfiler: HeapProfilerApi; Profiler: ProfilerApi; Runtime: RuntimeApi; Schema: SchemaApi; } export interface ProtocolDispatchers { Accessibility: AccessibilityDispatcher; Animation: AnimationDispatcher; Audits: AuditsDispatcher; Autofill: AutofillDispatcher; BackgroundService: BackgroundServiceDispatcher; BluetoothEmulation: BluetoothEmulationDispatcher; Browser: BrowserDispatcher; CSS: CSSDispatcher; CacheStorage: CacheStorageDispatcher; Cast: CastDispatcher; DOM: DOMDispatcher; DOMDebugger: DOMDebuggerDispatcher; DOMSnapshot: DOMSnapshotDispatcher; DOMStorage: DOMStorageDispatcher; DeviceAccess: DeviceAccessDispatcher; DeviceOrientation: DeviceOrientationDispatcher; Emulation: EmulationDispatcher; EventBreakpoints: EventBreakpointsDispatcher; Extensions: ExtensionsDispatcher; FedCm: FedCmDispatcher; Fetch: FetchDispatcher; FileSystem: FileSystemDispatcher; HeadlessExperimental: HeadlessExperimentalDispatcher; IO: IODispatcher; IndexedDB: IndexedDBDispatcher; Input: InputDispatcher; Inspector: InspectorDispatcher; LayerTree: LayerTreeDispatcher; Log: LogDispatcher; Media: MediaDispatcher; Memory: MemoryDispatcher; Network: NetworkDispatcher; Overlay: OverlayDispatcher; PWA: PWADispatcher; Page: PageDispatcher; Performance: PerformanceDispatcher; PerformanceTimeline: PerformanceTimelineDispatcher; Preload: PreloadDispatcher; Security: SecurityDispatcher; ServiceWorker: ServiceWorkerDispatcher; SmartCardEmulation: SmartCardEmulationDispatcher; Storage: StorageDispatcher; SystemInfo: SystemInfoDispatcher; Target: TargetDispatcher; Tethering: TetheringDispatcher; Tracing: TracingDispatcher; WebAudio: WebAudioDispatcher; WebAuthn: WebAuthnDispatcher; Debugger: DebuggerDispatcher; HeapProfiler: HeapProfilerDispatcher; Profiler: ProfilerDispatcher; Runtime: RuntimeDispatcher; Schema: SchemaDispatcher; } export interface AccessibilityApi { /** * Disables the accessibility domain. */ invoke_disable(): Promise; /** * 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. */ invoke_enable(): Promise; /** * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. */ invoke_getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise; /** * Fetches the entire accessibility tree for the root Document */ invoke_getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise; /** * Fetches the root node. * Requires `enable()` to have been called previously. */ invoke_getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise; /** * Fetches a node and all ancestors up to and including the root. * Requires `enable()` to have been called previously. */ invoke_getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise; /** * Fetches a particular accessibility node by AXNodeId. * Requires `enable()` to have been called previously. */ invoke_getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise; /** * 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. */ invoke_queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise; } export interface AccessibilityDispatcher { /** * The loadComplete event mirrors the load complete event sent by the browser to assistive * technology when the web page has finished loading. */ loadComplete(params: Protocol.Accessibility.LoadCompleteEvent): void; /** * The nodesUpdated event is sent every time a previously requested node has changed the in tree. */ nodesUpdated(params: Protocol.Accessibility.NodesUpdatedEvent): void; } export interface AnimationApi { /** * Disables animation domain notifications. */ invoke_disable(): Promise; /** * Enables animation domain notifications. */ invoke_enable(): Promise; /** * Returns the current time of the an animation. */ invoke_getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise; /** * Gets the playback rate of the document timeline. */ invoke_getPlaybackRate(): Promise; /** * Releases a set of animations to no longer be manipulated. */ invoke_releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise; /** * Gets the remote object of the Animation. */ invoke_resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise; /** * Seek a set of animations to a particular time within each animation. */ invoke_seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise; /** * Sets the paused state of a set of animations. */ invoke_setPaused(params: Protocol.Animation.SetPausedRequest): Promise; /** * Sets the playback rate of the document timeline. */ invoke_setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise; /** * Sets the timing of an animation node. */ invoke_setTiming(params: Protocol.Animation.SetTimingRequest): Promise; } export interface AnimationDispatcher { /** * Event for when an animation has been cancelled. */ animationCanceled(params: Protocol.Animation.AnimationCanceledEvent): void; /** * Event for each animation that has been created. */ animationCreated(params: Protocol.Animation.AnimationCreatedEvent): void; /** * Event for animation that has been started. */ animationStarted(params: Protocol.Animation.AnimationStartedEvent): void; /** * Event for animation that has been updated. */ animationUpdated(params: Protocol.Animation.AnimationUpdatedEvent): void; } export interface AuditsApi { /** * Returns the response body and size if it were re-encoded with the specified settings. Only * applies to images. */ invoke_getEncodedResponse(params: Protocol.Audits.GetEncodedResponseRequest): Promise; /** * Disables issues domain, prevents further issues from being reported to the client. */ invoke_disable(): Promise; /** * Enables issues domain, sends the issues collected so far to the client by means of the * `issueAdded` event. */ invoke_enable(): Promise; /** * Runs the contrast check for the target page. Found issues are reported * using Audits.issueAdded event. */ invoke_checkContrast(params: Protocol.Audits.CheckContrastRequest): Promise; /** * Runs the form issues check for the target page. Found issues are reported * using Audits.issueAdded event. */ invoke_checkFormsIssues(): Promise; } export interface AuditsDispatcher { issueAdded(params: Protocol.Audits.IssueAddedEvent): 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. */ invoke_trigger(params: Protocol.Autofill.TriggerRequest): Promise; /** * Set addresses so that developers can verify their forms implementation. */ invoke_setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise; /** * Disables autofill domain notifications. */ invoke_disable(): Promise; /** * Enables autofill domain notifications. */ invoke_enable(): Promise; } export interface AutofillDispatcher { /** * Emitted when an address form is filled. */ addressFormFilled(params: Protocol.Autofill.AddressFormFilledEvent): void; } export interface BackgroundServiceApi { /** * Enables event updates for the service. */ invoke_startObserving(params: Protocol.BackgroundService.StartObservingRequest): Promise; /** * Disables event updates for the service. */ invoke_stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise; /** * Set the recording state for the service. */ invoke_setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise; /** * Clears all stored data for the service. */ invoke_clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise; } export interface BackgroundServiceDispatcher { /** * Called when the recording state for the service has been updated. */ recordingStateChanged(params: Protocol.BackgroundService.RecordingStateChangedEvent): void; /** * Called with all existing backgroundServiceEvents when enabled, and all new * events afterwards if enabled and recording. */ backgroundServiceEventReceived(params: Protocol.BackgroundService.BackgroundServiceEventReceivedEvent): void; } export interface BluetoothEmulationApi { /** * Enable the BluetoothEmulation domain. */ invoke_enable(params: Protocol.BluetoothEmulation.EnableRequest): Promise; /** * Set the state of the simulated central. */ invoke_setSimulatedCentralState(params: Protocol.BluetoothEmulation.SetSimulatedCentralStateRequest): Promise; /** * Disable the BluetoothEmulation domain. */ invoke_disable(): Promise; /** * Simulates a peripheral with |address|, |name| and |knownServiceUuids| * that has already been connected to the system. */ invoke_simulatePreconnectedPeripheral(params: Protocol.BluetoothEmulation.SimulatePreconnectedPeripheralRequest): Promise; /** * Simulates an advertisement packet described in |entry| being received by * the central. */ invoke_simulateAdvertisement(params: Protocol.BluetoothEmulation.SimulateAdvertisementRequest): Promise; /** * 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. */ invoke_simulateGATTOperationResponse(params: Protocol.BluetoothEmulation.SimulateGATTOperationResponseRequest): Promise; /** * 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. */ invoke_simulateCharacteristicOperationResponse(params: Protocol.BluetoothEmulation.SimulateCharacteristicOperationResponseRequest): Promise; /** * 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. */ invoke_simulateDescriptorOperationResponse(params: Protocol.BluetoothEmulation.SimulateDescriptorOperationResponseRequest): Promise; /** * Adds a service with |serviceUuid| to the peripheral with |address|. */ invoke_addService(params: Protocol.BluetoothEmulation.AddServiceRequest): Promise; /** * Removes the service respresented by |serviceId| from the simulated central. */ invoke_removeService(params: Protocol.BluetoothEmulation.RemoveServiceRequest): Promise; /** * Adds a characteristic with |characteristicUuid| and |properties| to the * service represented by |serviceId|. */ invoke_addCharacteristic(params: Protocol.BluetoothEmulation.AddCharacteristicRequest): Promise; /** * Removes the characteristic respresented by |characteristicId| from the * simulated central. */ invoke_removeCharacteristic(params: Protocol.BluetoothEmulation.RemoveCharacteristicRequest): Promise; /** * Adds a descriptor with |descriptorUuid| to the characteristic respresented * by |characteristicId|. */ invoke_addDescriptor(params: Protocol.BluetoothEmulation.AddDescriptorRequest): Promise; /** * Removes the descriptor with |descriptorId| from the simulated central. */ invoke_removeDescriptor(params: Protocol.BluetoothEmulation.RemoveDescriptorRequest): Promise; /** * Simulates a GATT disconnection from the peripheral with |address|. */ invoke_simulateGATTDisconnection(params: Protocol.BluetoothEmulation.SimulateGATTDisconnectionRequest): Promise; } export interface BluetoothEmulationDispatcher { /** * Event for when a GATT operation of |type| to the peripheral with |address| * happened. */ gattOperationReceived(params: Protocol.BluetoothEmulation.GattOperationReceivedEvent): 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. */ characteristicOperationReceived(params: Protocol.BluetoothEmulation.CharacteristicOperationReceivedEvent): 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. */ descriptorOperationReceived(params: Protocol.BluetoothEmulation.DescriptorOperationReceivedEvent): void; } export interface BrowserApi { /** * Set permission settings for given embedding and embedded origins. */ invoke_setPermission(params: Protocol.Browser.SetPermissionRequest): Promise; /** * Grant specific permissions to the given origin and reject all others. Deprecated. Use * setPermission instead. * @deprecated */ invoke_grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise; /** * Reset all permission management for all origins. */ invoke_resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise; /** * Set the behavior when downloading a file. */ invoke_setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise; /** * Cancel a download if in progress */ invoke_cancelDownload(params: Protocol.Browser.CancelDownloadRequest): Promise; /** * Close browser gracefully. */ invoke_close(): Promise; /** * Crashes browser on the main thread. */ invoke_crash(): Promise; /** * Crashes GPU process. */ invoke_crashGpuProcess(): Promise; /** * Returns version information. */ invoke_getVersion(): Promise; /** * Returns the command line switches for the browser process if, and only if * --enable-automation is on the commandline. */ invoke_getBrowserCommandLine(): Promise; /** * Get Chrome histograms. */ invoke_getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise; /** * Get a Chrome histogram by name. */ invoke_getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise; /** * Get position and size of the browser window. */ invoke_getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise; /** * Get the browser window that contains the devtools target. */ invoke_getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise; /** * Set position and/or size of the browser window. */ invoke_setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise; /** * Set size of the browser contents resizing browser window as necessary. */ invoke_setContentsSize(params: Protocol.Browser.SetContentsSizeRequest): Promise; /** * Set dock tile details, platform-specific. */ invoke_setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise; /** * Invoke custom browser commands used by telemetry. */ invoke_executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest): Promise; /** * Allows a site to use privacy sandbox features that require enrollment * without the site actually being enrolled. Only supported on page targets. */ invoke_addPrivacySandboxEnrollmentOverride(params: Protocol.Browser.AddPrivacySandboxEnrollmentOverrideRequest): Promise; /** * Configures encryption keys used with a given privacy sandbox API to talk * to a trusted coordinator. Since this is intended for test automation only, * coordinatorOrigin must be a .test domain. No existing coordinator * configuration for the origin may exist. */ invoke_addPrivacySandboxCoordinatorKeyConfig(params: Protocol.Browser.AddPrivacySandboxCoordinatorKeyConfigRequest): Promise; } export interface BrowserDispatcher { /** * Fired when page is about to start a download. */ downloadWillBegin(params: Protocol.Browser.DownloadWillBeginEvent): void; /** * Fired when download makes progress. Last call has |done| == true. */ downloadProgress(params: Protocol.Browser.DownloadProgressEvent): void; } export interface CSSApi { /** * Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the * position specified by `location`. */ invoke_addRule(params: Protocol.CSS.AddRuleRequest): Promise; /** * Returns all class names from specified stylesheet. */ invoke_collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise; /** * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. */ invoke_createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise; /** * Disables the CSS agent for the given page. */ invoke_disable(): Promise; /** * 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. */ invoke_enable(): Promise; /** * Ensures that the given node will have specified pseudo-classes whenever its style is computed by * the browser. */ invoke_forcePseudoState(params: Protocol.CSS.ForcePseudoStateRequest): Promise; /** * Ensures that the given node is in its starting-style state. */ invoke_forceStartingStyle(params: Protocol.CSS.ForceStartingStyleRequest): Promise; invoke_getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise; /** * Returns the computed style for a DOM node identified by `nodeId`. */ invoke_getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise; /** * 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.` */ invoke_resolveValues(params: Protocol.CSS.ResolveValuesRequest): Promise; invoke_getLonghandProperties(params: Protocol.CSS.GetLonghandPropertiesRequest): Promise; /** * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM * attributes) for a DOM node identified by `nodeId`. */ invoke_getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise; /** * Returns the styles coming from animations & transitions * including the animation & transition styles coming from inheritance chain. */ invoke_getAnimatedStylesForNode(params: Protocol.CSS.GetAnimatedStylesForNodeRequest): Promise; /** * Returns requested styles for a DOM node identified by `nodeId`. */ invoke_getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise; /** * Returns the values of the default UA-defined environment variables used in env() */ invoke_getEnvironmentVariables(): Promise; /** * Returns all media queries parsed by the rendering engine. */ invoke_getMediaQueries(): Promise; /** * Requests information about platform fonts which we used to render child TextNodes in the given * node. */ invoke_getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise; /** * Returns the current textual content for a stylesheet. */ invoke_getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise; /** * 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. */ invoke_getLayersForNode(params: Protocol.CSS.GetLayersForNodeRequest): Promise; /** * Given a CSS selector text and a style sheet ID, getLocationForSelector * returns an array of locations of the CSS selector in the style sheet. */ invoke_getLocationForSelector(params: Protocol.CSS.GetLocationForSelectorRequest): Promise; /** * Starts tracking the given node for the computed style updates * and whenever the computed style is updated for node, it queues * a `computedStyleUpdated` event with throttling. * There can only be 1 node tracked for computed style updates * so passing a new node id removes tracking from the previous node. * Pass `undefined` to disable tracking. */ invoke_trackComputedStyleUpdatesForNode(params: Protocol.CSS.TrackComputedStyleUpdatesForNodeRequest): Promise; /** * Starts tracking the given computed styles for updates. The specified array of properties * replaces the one previously specified. Pass empty array to disable tracking. * Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. * The changes to computed style properties are only tracked for nodes pushed to the front-end * by the DOM agent. If no changes to the tracked properties occur after the node has been pushed * to the front-end, no updates will be issued for the node. */ invoke_trackComputedStyleUpdates(params: Protocol.CSS.TrackComputedStyleUpdatesRequest): Promise; /** * Polls the next batch of computed style updates. */ invoke_takeComputedStyleUpdates(): Promise; /** * Find a rule with the given active property for the given node and set the new value for this * property */ invoke_setEffectivePropertyValueForNode(params: Protocol.CSS.SetEffectivePropertyValueForNodeRequest): Promise; /** * Modifies the property rule property name. */ invoke_setPropertyRulePropertyName(params: Protocol.CSS.SetPropertyRulePropertyNameRequest): Promise; /** * Modifies the keyframe rule key text. */ invoke_setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise; /** * Modifies the rule selector. */ invoke_setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise; /** * Modifies the expression of a container query. */ invoke_setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest): Promise; /** * Modifies the expression of a supports at-rule. */ invoke_setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise; /** * Modifies the expression of a scope at-rule. */ invoke_setScopeText(params: Protocol.CSS.SetScopeTextRequest): Promise; /** * Modifies the rule selector. */ invoke_setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise; /** * Sets the new stylesheet text. */ invoke_setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise; /** * Applies specified style edits one after another in the given order. */ invoke_setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise; /** * Enables the selector recording. */ invoke_startRuleUsageTracking(): Promise; /** * Stop tracking rule usage and return the list of rules that were used since last call to * `takeCoverageDelta` (or since start of coverage instrumentation). */ invoke_stopRuleUsageTracking(): Promise; /** * Obtain list of rules that became used since last call to this method (or since start of coverage * instrumentation). */ invoke_takeCoverageDelta(): Promise; /** * Enables/disables rendering of local CSS fonts (enabled by default). */ invoke_setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise; } export interface CSSDispatcher { /** * Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded * web font. */ fontsUpdated(params: Protocol.CSS.FontsUpdatedEvent): void; /** * Fires whenever a MediaQuery result changes (for example, after a browser window has been * resized.) The current implementation considers only viewport-dependent media features. */ mediaQueryResultChanged(): void; /** * Fired whenever an active document stylesheet is added. */ styleSheetAdded(params: Protocol.CSS.StyleSheetAddedEvent): void; /** * Fired whenever a stylesheet is changed as a result of the client operation. */ styleSheetChanged(params: Protocol.CSS.StyleSheetChangedEvent): void; /** * Fired whenever an active document stylesheet is removed. */ styleSheetRemoved(params: Protocol.CSS.StyleSheetRemovedEvent): void; computedStyleUpdated(params: Protocol.CSS.ComputedStyleUpdatedEvent): void; } export interface CacheStorageApi { /** * Deletes a cache. */ invoke_deleteCache(params: Protocol.CacheStorage.DeleteCacheRequest): Promise; /** * Deletes a cache entry. */ invoke_deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise; /** * Requests cache names. */ invoke_requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise; /** * Fetches cache entry. */ invoke_requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise; /** * Requests data from cache. */ invoke_requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise; } export interface CacheStorageDispatcher { } export interface CastApi { /** * Starts observing for sinks that can be used for tab mirroring, and if set, * sinks compatible with |presentationUrl| as well. When sinks are found, a * |sinksUpdated| event is fired. * Also starts observing for issue messages. When an issue is added or removed, * an |issueUpdated| event is fired. */ invoke_enable(params: Protocol.Cast.EnableRequest): Promise; /** * Stops observing for sinks and issues. */ invoke_disable(): Promise; /** * Sets a sink to be used when the web page requests the browser to choose a * sink via Presentation API, Remote Playback API, or Cast SDK. */ invoke_setSinkToUse(params: Protocol.Cast.SetSinkToUseRequest): Promise; /** * Starts mirroring the desktop to the sink. */ invoke_startDesktopMirroring(params: Protocol.Cast.StartDesktopMirroringRequest): Promise; /** * Starts mirroring the tab to the sink. */ invoke_startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise; /** * Stops the active Cast session on the sink. */ invoke_stopCasting(params: Protocol.Cast.StopCastingRequest): Promise; } export interface CastDispatcher { /** * This is fired whenever the list of available sinks changes. A sink is a * device or a software surface that you can cast to. */ sinksUpdated(params: Protocol.Cast.SinksUpdatedEvent): void; /** * This is fired whenever the outstanding issue/error message changes. * |issueMessage| is empty if there is no issue. */ issueUpdated(params: Protocol.Cast.IssueUpdatedEvent): void; } export interface DOMApi { /** * Collects class names for the node with given id and all of it's child nodes. */ invoke_collectClassNamesFromSubtree(params: Protocol.DOM.CollectClassNamesFromSubtreeRequest): Promise; /** * Creates a deep copy of the specified node and places it into the target container before the * given anchor. */ invoke_copyTo(params: Protocol.DOM.CopyToRequest): Promise; /** * Describes node given its id, does not require domain to be enabled. Does not start tracking any * objects, can be used for automation. */ invoke_describeNode(params: Protocol.DOM.DescribeNodeRequest): Promise; /** * Scrolls the specified rect of the given node into view if not already visible. * Note: exactly one between nodeId, backendNodeId and objectId should be passed * to identify the node. */ invoke_scrollIntoViewIfNeeded(params: Protocol.DOM.ScrollIntoViewIfNeededRequest): Promise; /** * Disables DOM agent for the given page. */ invoke_disable(): Promise; /** * Discards search results from the session with the given id. `getSearchResults` should no longer * be called for that search. */ invoke_discardSearchResults(params: Protocol.DOM.DiscardSearchResultsRequest): Promise; /** * Enables DOM agent for the given page. */ invoke_enable(params: Protocol.DOM.EnableRequest): Promise; /** * Focuses the given element. */ invoke_focus(params: Protocol.DOM.FocusRequest): Promise; /** * Returns attributes for the specified node. */ invoke_getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise; /** * Returns boxes for the given node. */ invoke_getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise; /** * Returns quads that describe node position on the page. This method * might return multiple quads for inline nodes. */ invoke_getContentQuads(params: Protocol.DOM.GetContentQuadsRequest): Promise; /** * Returns the root DOM node (and optionally the subtree) to the caller. * Implicitly enables the DOM domain events for the current target. */ invoke_getDocument(params: Protocol.DOM.GetDocumentRequest): Promise; /** * Returns the root DOM node (and optionally the subtree) to the caller. * Deprecated, as it is not designed to work well with the rest of the DOM agent. * Use DOMSnapshot.captureSnapshot instead. * @deprecated */ invoke_getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise; /** * Finds nodes with a given computed style in a subtree. */ invoke_getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise; /** * Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is * either returned or not. */ invoke_getNodeForLocation(params: Protocol.DOM.GetNodeForLocationRequest): Promise; /** * Returns node's HTML markup. */ invoke_getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise; /** * Returns the id of the nearest ancestor that is a relayout boundary. */ invoke_getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise; /** * Returns search results from given `fromIndex` to given `toIndex` from the search with the given * identifier. */ invoke_getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise; /** * Hides any highlight. */ invoke_hideHighlight(): Promise; /** * Highlights DOM node. */ invoke_highlightNode(): Promise; /** * Highlights given rectangle. */ invoke_highlightRect(): Promise; /** * Marks last undoable state. */ invoke_markUndoableState(): Promise; /** * Moves node into the new container, places it before the given anchor. */ invoke_moveTo(params: Protocol.DOM.MoveToRequest): Promise; /** * Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or * `cancelSearch` to end this search session. */ invoke_performSearch(params: Protocol.DOM.PerformSearchRequest): Promise; /** * Requests that the node is sent to the caller given its path. // FIXME, use XPath */ invoke_pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise; /** * Requests that a batch of nodes is sent to the caller given their backend node ids. */ invoke_pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise; /** * Executes `querySelector` on a given node. */ invoke_querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise; /** * Executes `querySelectorAll` on a given node. */ invoke_querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise; /** * Returns NodeIds of current top layer elements. * Top layer is rendered closest to the user within a viewport, therefore its elements always * appear on top of all other content. */ invoke_getTopLayerElements(): Promise; /** * Returns the NodeId of the matched element according to certain relations. */ invoke_getElementByRelation(params: Protocol.DOM.GetElementByRelationRequest): Promise; /** * Re-does the last undone action. */ invoke_redo(): Promise; /** * Removes attribute with given name from an element with given id. */ invoke_removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise; /** * Removes node with given id. */ invoke_removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise; /** * Requests that children of the node with given id are returned to the caller in form of * `setChildNodes` events where not only immediate children are retrieved, but all children down to * the specified depth. */ invoke_requestChildNodes(params: Protocol.DOM.RequestChildNodesRequest): Promise; /** * Requests that the node is sent to the caller given the JavaScript node object reference. All * nodes that form the path from the node to the root are also sent to the client as a series of * `setChildNodes` notifications. */ invoke_requestNode(params: Protocol.DOM.RequestNodeRequest): Promise; /** * Resolves the JavaScript node object for a given NodeId or BackendNodeId. */ invoke_resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise; /** * Sets attribute for an element with given id. */ invoke_setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise; /** * Sets attributes on element with given id. This method is useful when user edits some existing * attribute value and types in several attribute name/value pairs. */ invoke_setAttributesAsText(params: Protocol.DOM.SetAttributesAsTextRequest): Promise; /** * Sets files for the given file input element. */ invoke_setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise; /** * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. */ invoke_setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise; /** * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. */ invoke_getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest): Promise; /** * Returns file information for the given * File wrapper. */ invoke_getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise; /** * Returns list of detached nodes */ invoke_getDetachedDomNodes(): Promise; /** * Enables console to refer to the node with given id via $x (see Command Line API for more details * $x functions). */ invoke_setInspectedNode(params: Protocol.DOM.SetInspectedNodeRequest): Promise; /** * Sets node name for a node with given id. */ invoke_setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise; /** * Sets node value for a node with given id. */ invoke_setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise; /** * Sets node HTML markup, returns new node id. */ invoke_setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise; /** * Undoes the last performed action. */ invoke_undo(): Promise; /** * Returns iframe node that owns iframe with the given domain. */ invoke_getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise; /** * Returns the query container of the given node based on container query * conditions: containerName, physical and logical axes, and whether it queries * scroll-state or anchored elements. If no axes are provided and * queriesScrollState is false, the style container is returned, which is the * direct parent or the closest element with a matching container-name. */ invoke_getContainerForNode(params: Protocol.DOM.GetContainerForNodeRequest): Promise; /** * Returns the descendants of a container query container that have * container queries against this container. */ invoke_getQueryingDescendantsForContainer(params: Protocol.DOM.GetQueryingDescendantsForContainerRequest): Promise; /** * Returns the target anchor element of the given anchor query according to * https://www.w3.org/TR/css-anchor-position-1/#target. */ invoke_getAnchorElement(params: Protocol.DOM.GetAnchorElementRequest): Promise; /** * When enabling, this API force-opens the popover identified by nodeId * and keeps it open until disabled. */ invoke_forceShowPopover(params: Protocol.DOM.ForceShowPopoverRequest): Promise; } export interface DOMDispatcher { /** * Fired when `Element`'s attribute is modified. */ attributeModified(params: Protocol.DOM.AttributeModifiedEvent): void; /** * Fired when `Element`'s adoptedStyleSheets are modified. */ adoptedStyleSheetsModified(params: Protocol.DOM.AdoptedStyleSheetsModifiedEvent): void; /** * Fired when `Element`'s attribute is removed. */ attributeRemoved(params: Protocol.DOM.AttributeRemovedEvent): void; /** * Mirrors `DOMCharacterDataModified` event. */ characterDataModified(params: Protocol.DOM.CharacterDataModifiedEvent): void; /** * Fired when `Container`'s child node count has changed. */ childNodeCountUpdated(params: Protocol.DOM.ChildNodeCountUpdatedEvent): void; /** * Mirrors `DOMNodeInserted` event. */ childNodeInserted(params: Protocol.DOM.ChildNodeInsertedEvent): void; /** * Mirrors `DOMNodeRemoved` event. */ childNodeRemoved(params: Protocol.DOM.ChildNodeRemovedEvent): void; /** * Called when distribution is changed. */ distributedNodesUpdated(params: Protocol.DOM.DistributedNodesUpdatedEvent): void; /** * Fired when `Document` has been totally updated. Node ids are no longer valid. */ documentUpdated(): void; /** * Fired when `Element`'s inline style is modified via a CSS property modification. */ inlineStyleInvalidated(params: Protocol.DOM.InlineStyleInvalidatedEvent): void; /** * Called when a pseudo element is added to an element. */ pseudoElementAdded(params: Protocol.DOM.PseudoElementAddedEvent): void; /** * Called when top layer elements are changed. */ topLayerElementsUpdated(): void; /** * Fired when a node's scrollability state changes. */ scrollableFlagUpdated(params: Protocol.DOM.ScrollableFlagUpdatedEvent): void; /** * Fired when a node's ad related state changes. */ adRelatedStateUpdated(params: Protocol.DOM.AdRelatedStateUpdatedEvent): void; /** * Fired when a node's starting styles changes. */ affectedByStartingStylesFlagUpdated(params: Protocol.DOM.AffectedByStartingStylesFlagUpdatedEvent): void; /** * Called when a pseudo element is removed from an element. */ pseudoElementRemoved(params: Protocol.DOM.PseudoElementRemovedEvent): void; /** * Fired when backend wants to provide client with the missing DOM structure. This happens upon * most of the calls requesting node ids. */ setChildNodes(params: Protocol.DOM.SetChildNodesEvent): void; /** * Called when shadow root is popped from the element. */ shadowRootPopped(params: Protocol.DOM.ShadowRootPoppedEvent): void; /** * Called when shadow root is pushed into the element. */ shadowRootPushed(params: Protocol.DOM.ShadowRootPushedEvent): void; } export interface DOMDebuggerApi { /** * Returns event listeners of the given object. */ invoke_getEventListeners(params: Protocol.DOMDebugger.GetEventListenersRequest): Promise; /** * Removes DOM breakpoint that was set using `setDOMBreakpoint`. */ invoke_removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest): Promise; /** * Removes breakpoint on particular DOM event. */ invoke_removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest): Promise; /** * Removes breakpoint on particular native event. * @deprecated */ invoke_removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest): Promise; /** * Removes breakpoint from XMLHttpRequest. */ invoke_removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest): Promise; /** * Sets breakpoint on particular CSP violations. */ invoke_setBreakOnCSPViolation(params: Protocol.DOMDebugger.SetBreakOnCSPViolationRequest): Promise; /** * Sets breakpoint on particular operation with DOM. */ invoke_setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest): Promise; /** * Sets breakpoint on particular DOM event. */ invoke_setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest): Promise; /** * Sets breakpoint on particular native event. * @deprecated */ invoke_setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest): Promise; /** * Sets breakpoint on XMLHttpRequest. */ invoke_setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest): Promise; } export interface DOMDebuggerDispatcher { } export interface DOMSnapshotApi { /** * Disables DOM snapshot agent for the given page. */ invoke_disable(): Promise; /** * Enables DOM snapshot agent for the given page. */ invoke_enable(): Promise; /** * Returns a document snapshot, including the full DOM tree of the root node (including iframes, * template contents, and imported documents) in a flattened array, as well as layout and * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is * flattened. * @deprecated */ invoke_getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest): Promise; /** * Returns a document snapshot, including the full DOM tree of the root node (including iframes, * template contents, and imported documents) in a flattened array, as well as layout and * white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is * flattened. */ invoke_captureSnapshot(params: Protocol.DOMSnapshot.CaptureSnapshotRequest): Promise; } export interface DOMSnapshotDispatcher { } export interface DOMStorageApi { invoke_clear(params: Protocol.DOMStorage.ClearRequest): Promise; /** * Disables storage tracking, prevents storage events from being sent to the client. */ invoke_disable(): Promise; /** * Enables storage tracking, storage events will now be delivered to the client. */ invoke_enable(): Promise; invoke_getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest): Promise; invoke_removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest): Promise; invoke_setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest): Promise; } export interface DOMStorageDispatcher { domStorageItemAdded(params: Protocol.DOMStorage.DomStorageItemAddedEvent): void; domStorageItemRemoved(params: Protocol.DOMStorage.DomStorageItemRemovedEvent): void; domStorageItemUpdated(params: Protocol.DOMStorage.DomStorageItemUpdatedEvent): void; domStorageItemsCleared(params: Protocol.DOMStorage.DomStorageItemsClearedEvent): void; } export interface DeviceAccessApi { /** * Enable events in this domain. */ invoke_enable(): Promise; /** * Disable events in this domain. */ invoke_disable(): Promise; /** * Select a device in response to a DeviceAccess.deviceRequestPrompted event. */ invoke_selectPrompt(params: Protocol.DeviceAccess.SelectPromptRequest): Promise; /** * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event. */ invoke_cancelPrompt(params: Protocol.DeviceAccess.CancelPromptRequest): Promise; } export interface DeviceAccessDispatcher { /** * A device request opened a user prompt to select a device. Respond with the * selectPrompt or cancelPrompt command. */ deviceRequestPrompted(params: Protocol.DeviceAccess.DeviceRequestPromptedEvent): void; } export interface DeviceOrientationApi { /** * Clears the overridden Device Orientation. */ invoke_clearDeviceOrientationOverride(): Promise; /** * Overrides the Device Orientation. */ invoke_setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest): Promise; } export interface DeviceOrientationDispatcher { } export interface EmulationApi { /** * Tells whether emulation is supported. * @deprecated */ invoke_canEmulate(): Promise; /** * Clears the overridden device metrics. */ invoke_clearDeviceMetricsOverride(): Promise; /** * Clears the overridden Geolocation Position and Error. */ invoke_clearGeolocationOverride(): Promise; /** * Requests that page scale factor is reset to initial values. */ invoke_resetPageScaleFactor(): Promise; /** * Enables or disables simulating a focused and active page. */ invoke_setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest): Promise; /** * Automatically render all web contents using a dark theme. */ invoke_setAutoDarkModeOverride(params: Protocol.Emulation.SetAutoDarkModeOverrideRequest): Promise; /** * Enables CPU throttling to emulate slow CPUs. */ invoke_setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest): Promise; /** * Sets or clears an override of the default background color of the frame. This override is used * if the content does not specify one. */ invoke_setDefaultBackgroundColorOverride(params: Protocol.Emulation.SetDefaultBackgroundColorOverrideRequest): Promise; /** * Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the * respective variables to be undefined, even if previously overridden. */ invoke_setSafeAreaInsetsOverride(params: Protocol.Emulation.SetSafeAreaInsetsOverrideRequest): Promise; /** * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media * query results). */ invoke_setDeviceMetricsOverride(params: Protocol.Emulation.SetDeviceMetricsOverrideRequest): Promise; /** * Start reporting the given posture value to the Device Posture API. * This override can also be set in setDeviceMetricsOverride(). */ invoke_setDevicePostureOverride(params: Protocol.Emulation.SetDevicePostureOverrideRequest): Promise; /** * Clears a device posture override set with either setDeviceMetricsOverride() * or setDevicePostureOverride() and starts using posture information from the * platform again. * Does nothing if no override is set. */ invoke_clearDevicePostureOverride(): Promise; /** * Start using the given display features to pupulate the Viewport Segments API. * This override can also be set in setDeviceMetricsOverride(). */ invoke_setDisplayFeaturesOverride(params: Protocol.Emulation.SetDisplayFeaturesOverrideRequest): Promise; /** * Clears the display features override set with either setDeviceMetricsOverride() * or setDisplayFeaturesOverride() and starts using display features from the * platform again. * Does nothing if no override is set. */ invoke_clearDisplayFeaturesOverride(): Promise; invoke_setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest): Promise; invoke_setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest): Promise; invoke_setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest): Promise; /** * Emulates the given media type or media feature for CSS media queries. */ invoke_setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest): Promise; /** * Emulates the given vision deficiency. */ invoke_setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest): Promise; /** * Emulates the given OS text scale. */ invoke_setEmulatedOSTextScale(params: Protocol.Emulation.SetEmulatedOSTextScaleRequest): Promise; /** * Overrides the Geolocation Position or Error. Omitting latitude, longitude or * accuracy emulates position unavailable. */ invoke_setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest): Promise; invoke_getOverriddenSensorInformation(params: Protocol.Emulation.GetOverriddenSensorInformationRequest): Promise; /** * Overrides a platform sensor of a given type. If |enabled| is true, calls to * Sensor.start() will use a virtual sensor as backend rather than fetching * data from a real hardware sensor. Otherwise, existing virtual * sensor-backend Sensor objects will fire an error event and new calls to * Sensor.start() will attempt to use a real sensor instead. */ invoke_setSensorOverrideEnabled(params: Protocol.Emulation.SetSensorOverrideEnabledRequest): Promise; /** * Updates the sensor readings reported by a sensor type previously overridden * by setSensorOverrideEnabled. */ invoke_setSensorOverrideReadings(params: Protocol.Emulation.SetSensorOverrideReadingsRequest): Promise; /** * Overrides a pressure source of a given type, as used by the Compute * Pressure API, so that updates to PressureObserver.observe() are provided * via setPressureStateOverride instead of being retrieved from * platform-provided telemetry data. */ invoke_setPressureSourceOverrideEnabled(params: Protocol.Emulation.SetPressureSourceOverrideEnabledRequest): Promise; /** * TODO: OBSOLETE: To remove when setPressureDataOverride is merged. * Provides a given pressure state that will be processed and eventually be * delivered to PressureObserver users. |source| must have been previously * overridden by setPressureSourceOverrideEnabled. */ invoke_setPressureStateOverride(params: Protocol.Emulation.SetPressureStateOverrideRequest): Promise; /** * Provides a given pressure data set that will be processed and eventually be * delivered to PressureObserver users. |source| must have been previously * overridden by setPressureSourceOverrideEnabled. */ invoke_setPressureDataOverride(params: Protocol.Emulation.SetPressureDataOverrideRequest): Promise; /** * Overrides the Idle state. */ invoke_setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest): Promise; /** * Clears Idle state overrides. */ invoke_clearIdleOverride(): Promise; /** * Overrides value returned by the javascript navigator object. * @deprecated */ invoke_setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest): Promise; /** * Sets a specified page scale factor. */ invoke_setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest): Promise; /** * Switches script execution in the page. */ invoke_setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest): Promise; /** * Enables touch on platforms which do not support them. */ invoke_setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest): Promise; /** * Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets * the current virtual time policy. Note this supersedes any previous time budget. */ invoke_setVirtualTimePolicy(params: Protocol.Emulation.SetVirtualTimePolicyRequest): Promise; /** * Overrides default host system locale with the specified one. */ invoke_setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest): Promise; /** * Overrides default host system timezone with the specified one. */ invoke_setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest): Promise; /** * Resizes the frame/viewport of the page. Note that this does not affect the frame's container * (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported * on Android. * @deprecated */ invoke_setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest): Promise; invoke_setDisabledImageTypes(params: Protocol.Emulation.SetDisabledImageTypesRequest): Promise; /** * Override the value of navigator.connection.saveData */ invoke_setDataSaverOverride(params: Protocol.Emulation.SetDataSaverOverrideRequest): Promise; invoke_setHardwareConcurrencyOverride(params: Protocol.Emulation.SetHardwareConcurrencyOverrideRequest): Promise; /** * Allows overriding user agent with the given string. * `userAgentMetadata` must be set for Client Hint headers to be sent. */ invoke_setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest): Promise; /** * Allows overriding the automation flag. */ invoke_setAutomationOverride(params: Protocol.Emulation.SetAutomationOverrideRequest): Promise; /** * Allows overriding the difference between the small and large viewport sizes, which determine the * value of the `svh` and `lvh` unit, respectively. Only supported for top-level frames. */ invoke_setSmallViewportHeightDifferenceOverride(params: Protocol.Emulation.SetSmallViewportHeightDifferenceOverrideRequest): Promise; /** * Returns device's screen configuration. In headful mode, the physical screens configuration is returned, * whereas in headless mode, a virtual headless screen configuration is provided instead. */ invoke_getScreenInfos(): Promise; /** * Add a new screen to the device. Only supported in headless mode. */ invoke_addScreen(params: Protocol.Emulation.AddScreenRequest): Promise; /** * Updates specified screen parameters. Only supported in headless mode. */ invoke_updateScreen(params: Protocol.Emulation.UpdateScreenRequest): Promise; /** * Remove screen from the device. Only supported in headless mode. */ invoke_removeScreen(params: Protocol.Emulation.RemoveScreenRequest): Promise; /** * Set primary screen. Only supported in headless mode. * Note that this changes the coordinate system origin to the top-left * of the new primary screen, updating the bounds and work areas * of all existing screens accordingly. */ invoke_setPrimaryScreen(params: Protocol.Emulation.SetPrimaryScreenRequest): Promise; } export interface EmulationDispatcher { /** * Notification sent after the virtual time budget for the current VirtualTimePolicy has run out. */ virtualTimeBudgetExpired(): void; /** * Fired when a page calls screen.orientation.lock() or screen.orientation.unlock() * while device emulation is enabled. This allows the DevTools frontend to update the * emulated device orientation accordingly. */ screenOrientationLockChanged(params: Protocol.Emulation.ScreenOrientationLockChangedEvent): void; } export interface EventBreakpointsApi { /** * Sets breakpoint on particular native event. */ invoke_setInstrumentationBreakpoint(params: Protocol.EventBreakpoints.SetInstrumentationBreakpointRequest): Promise; /** * Removes breakpoint on particular native event. */ invoke_removeInstrumentationBreakpoint(params: Protocol.EventBreakpoints.RemoveInstrumentationBreakpointRequest): Promise; /** * Removes all breakpoints */ invoke_disable(): Promise; } export interface EventBreakpointsDispatcher { } export interface ExtensionsApi { /** * Runs an extension default action. * Available if the client is connected using the --remote-debugging-pipe * flag and the --enable-unsafe-extension-debugging flag is set. */ invoke_triggerAction(params: Protocol.Extensions.TriggerActionRequest): Promise; /** * Installs an unpacked extension from the filesystem similar to * --load-extension CLI flags. Returns extension ID once the extension * has been installed. Available if the client is connected using the * --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging * flag is set. */ invoke_loadUnpacked(params: Protocol.Extensions.LoadUnpackedRequest): Promise; /** * Gets a list of all unpacked extensions. * Available if the client is connected using the --remote-debugging-pipe flag * and the --enable-unsafe-extension-debugging flag is set. */ invoke_getExtensions(): Promise; /** * Uninstalls an unpacked extension (others not supported) from the profile. * Available if the client is connected using the --remote-debugging-pipe flag * and the --enable-unsafe-extension-debugging. */ invoke_uninstall(params: Protocol.Extensions.UninstallRequest): Promise; /** * Gets data from extension storage in the given `storageArea`. If `keys` is * specified, these are used to filter the result. */ invoke_getStorageItems(params: Protocol.Extensions.GetStorageItemsRequest): Promise; /** * Removes `keys` from extension storage in the given `storageArea`. */ invoke_removeStorageItems(params: Protocol.Extensions.RemoveStorageItemsRequest): Promise; /** * Clears extension storage in the given `storageArea`. */ invoke_clearStorageItems(params: Protocol.Extensions.ClearStorageItemsRequest): Promise; /** * Sets `values` in extension storage in the given `storageArea`. The provided `values` * will be merged with existing values in the storage area. */ invoke_setStorageItems(params: Protocol.Extensions.SetStorageItemsRequest): Promise; } export interface ExtensionsDispatcher { } export interface FedCmApi { invoke_enable(params: Protocol.FedCm.EnableRequest): Promise; invoke_disable(): Promise; invoke_selectAccount(params: Protocol.FedCm.SelectAccountRequest): Promise; invoke_clickDialogButton(params: Protocol.FedCm.ClickDialogButtonRequest): Promise; invoke_openUrl(params: Protocol.FedCm.OpenUrlRequest): Promise; invoke_dismissDialog(params: Protocol.FedCm.DismissDialogRequest): Promise; /** * Resets the cooldown time, if any, to allow the next FedCM call to show * a dialog even if one was recently dismissed by the user. */ invoke_resetCooldown(): Promise; } export interface FedCmDispatcher { dialogShown(params: Protocol.FedCm.DialogShownEvent): void; /** * Triggered when a dialog is closed, either by user action, JS abort, * or a command below. */ dialogClosed(params: Protocol.FedCm.DialogClosedEvent): void; } export interface FetchApi { /** * Disables the fetch domain. */ invoke_disable(): Promise; /** * Enables issuing of requestPaused events. A request will be paused until client * calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth. */ invoke_enable(params: Protocol.Fetch.EnableRequest): Promise; /** * Causes the request to fail with specified reason. */ invoke_failRequest(params: Protocol.Fetch.FailRequestRequest): Promise; /** * Provides response to the request. */ invoke_fulfillRequest(params: Protocol.Fetch.FulfillRequestRequest): Promise; /** * Continues the request, optionally modifying some of its parameters. */ invoke_continueRequest(params: Protocol.Fetch.ContinueRequestRequest): Promise; /** * Continues a request supplying authChallengeResponse following authRequired event. */ invoke_continueWithAuth(params: Protocol.Fetch.ContinueWithAuthRequest): Promise; /** * Continues loading of the paused response, optionally modifying the * response headers. If either responseCode or headers are modified, all of them * must be present. */ invoke_continueResponse(params: Protocol.Fetch.ContinueResponseRequest): Promise; /** * Causes the body of the response to be received from the server and * returned as a single string. May only be issued for a request that * is paused in the Response stage and is mutually exclusive with * takeResponseBodyForInterceptionAsStream. Calling other methods that * affect the request or disabling fetch domain before body is received * results in an undefined behavior. * Note that the response body is not available for redirects. Requests * paused in the _redirect received_ state may be differentiated by * `responseCode` and presence of `location` response header, see * comments to `requestPaused` for details. */ invoke_getResponseBody(params: Protocol.Fetch.GetResponseBodyRequest): Promise; /** * Returns a handle to the stream representing the response body. * The request must be paused in the HeadersReceived stage. * Note that after this command the request can't be continued * as is -- client either needs to cancel it or to provide the * response body. * The stream only supports sequential read, IO.read will fail if the position * is specified. * This method is mutually exclusive with getResponseBody. * Calling other methods that affect the request or disabling fetch * domain before body is received results in an undefined behavior. */ invoke_takeResponseBodyAsStream(params: Protocol.Fetch.TakeResponseBodyAsStreamRequest): Promise; } export interface FetchDispatcher { /** * Issued when the domain is enabled and the request URL matches the * specified filter. The request is paused until the client responds * with one of continueRequest, failRequest or fulfillRequest. * The stage of the request can be determined by presence of responseErrorReason * and responseStatusCode -- the request is at the response stage if either * of these fields is present and in the request stage otherwise. * Redirect responses and subsequent requests are reported similarly to regular * responses and requests. Redirect responses may be distinguished by the value * of `responseStatusCode` (which is one of 301, 302, 303, 307, 308) along with * presence of the `location` header. Requests resulting from a redirect will * have `redirectedRequestId` field set. */ requestPaused(params: Protocol.Fetch.RequestPausedEvent): void; /** * Issued when the domain is enabled with handleAuthRequests set to true. * The request is paused until client responds with continueWithAuth. */ authRequired(params: Protocol.Fetch.AuthRequiredEvent): void; } export interface FileSystemApi { invoke_getDirectory(params: Protocol.FileSystem.GetDirectoryRequest): Promise; } export interface FileSystemDispatcher { } export interface HeadlessExperimentalApi { /** * Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a * screenshot from the resulting frame. Requires that the target was created with enabled * BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also * https://goo.gle/chrome-headless-rendering for more background. */ invoke_beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest): Promise; /** * Disables headless events for the target. * @deprecated */ invoke_disable(): Promise; /** * Enables headless events for the target. * @deprecated */ invoke_enable(): Promise; } export interface HeadlessExperimentalDispatcher { } // eslint thinks this is us prefixing our interfaces but it's not! // eslint-disable-next-line @typescript-eslint/interface-name-prefix export interface IOApi { /** * Close the stream, discard any temporary backing storage. */ invoke_close(params: Protocol.IO.CloseRequest): Promise; /** * Read a chunk of the stream */ invoke_read(params: Protocol.IO.ReadRequest): Promise; /** * Return UUID of Blob object specified by a remote object id. */ invoke_resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise; } export interface IODispatcher { } // eslint thinks this is us prefixing our interfaces but it's not! // eslint-disable-next-line @typescript-eslint/interface-name-prefix export interface IndexedDBApi { /** * Clears all entries from an object store. */ invoke_clearObjectStore(params: Protocol.IndexedDB.ClearObjectStoreRequest): Promise; /** * Deletes a database. */ invoke_deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest): Promise; /** * Delete a range of entries from an object store */ invoke_deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest): Promise; /** * Disables events from backend. */ invoke_disable(): Promise; /** * Enables events from backend. */ invoke_enable(): Promise; /** * Requests data from object store or index. */ invoke_requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise; /** * Gets metadata of an object store. */ invoke_getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise; /** * Requests database with given name in given frame. */ invoke_requestDatabase(params: Protocol.IndexedDB.RequestDatabaseRequest): Promise; /** * Requests database names for given security origin. */ invoke_requestDatabaseNames(params: Protocol.IndexedDB.RequestDatabaseNamesRequest): Promise; } export interface IndexedDBDispatcher { } // eslint thinks this is us prefixing our interfaces but it's not! // eslint-disable-next-line @typescript-eslint/interface-name-prefix export interface InputApi { /** * Dispatches a drag event into the page. */ invoke_dispatchDragEvent(params: Protocol.Input.DispatchDragEventRequest): Promise; /** * Dispatches a key event to the page. */ invoke_dispatchKeyEvent(params: Protocol.Input.DispatchKeyEventRequest): Promise; /** * This method emulates inserting text that doesn't come from a key press, * for example an emoji keyboard or an IME. */ invoke_insertText(params: Protocol.Input.InsertTextRequest): Promise; /** * This method sets the current candidate text for IME. * Use imeCommitComposition to commit the final text. * Use imeSetComposition with empty string as text to cancel composition. */ invoke_imeSetComposition(params: Protocol.Input.ImeSetCompositionRequest): Promise; /** * Dispatches a mouse event to the page. */ invoke_dispatchMouseEvent(params: Protocol.Input.DispatchMouseEventRequest): Promise; /** * Dispatches a touch event to the page. */ invoke_dispatchTouchEvent(params: Protocol.Input.DispatchTouchEventRequest): Promise; /** * Cancels any active dragging in the page. */ invoke_cancelDragging(): Promise; /** * Emulates touch event from the mouse event parameters. */ invoke_emulateTouchFromMouseEvent(params: Protocol.Input.EmulateTouchFromMouseEventRequest): Promise; /** * Ignores input events (useful while auditing page). */ invoke_setIgnoreInputEvents(params: Protocol.Input.SetIgnoreInputEventsRequest): Promise; /** * Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. * Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`. */ invoke_setInterceptDrags(params: Protocol.Input.SetInterceptDragsRequest): Promise; /** * Synthesizes a pinch gesture over a time period by issuing appropriate touch events. */ invoke_synthesizePinchGesture(params: Protocol.Input.SynthesizePinchGestureRequest): Promise; /** * Synthesizes a scroll gesture over a time period by issuing appropriate touch events. */ invoke_synthesizeScrollGesture(params: Protocol.Input.SynthesizeScrollGestureRequest): Promise; /** * Synthesizes a tap gesture over a time period by issuing appropriate touch events. */ invoke_synthesizeTapGesture(params: Protocol.Input.SynthesizeTapGestureRequest): Promise; } export interface InputDispatcher { /** * Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to * restore normal drag and drop behavior. */ dragIntercepted(params: Protocol.Input.DragInterceptedEvent): void; } // eslint thinks this is us prefixing our interfaces but it's not! // eslint-disable-next-line @typescript-eslint/interface-name-prefix export interface InspectorApi { /** * Disables inspector domain notifications. */ invoke_disable(): Promise; /** * Enables inspector domain notifications. */ invoke_enable(): Promise; } export interface InspectorDispatcher { /** * Fired when remote debugging connection is about to be terminated. Contains detach reason. */ detached(params: Protocol.Inspector.DetachedEvent): void; /** * Fired when debugging target has crashed */ targetCrashed(): void; /** * Fired when debugging target has reloaded after crash */ targetReloadedAfterCrash(): void; /** * Fired on worker targets when main worker script and any imported scripts have been evaluated. */ workerScriptLoaded(): void; } export interface LayerTreeApi { /** * Provides the reasons why the given layer was composited. */ invoke_compositingReasons(params: Protocol.LayerTree.CompositingReasonsRequest): Promise; /** * Disables compositing tree inspection. */ invoke_disable(): Promise; /** * Enables compositing tree inspection. */ invoke_enable(): Promise; /** * Returns the snapshot identifier. */ invoke_loadSnapshot(params: Protocol.LayerTree.LoadSnapshotRequest): Promise; /** * Returns the layer snapshot identifier. */ invoke_makeSnapshot(params: Protocol.LayerTree.MakeSnapshotRequest): Promise; invoke_profileSnapshot(params: Protocol.LayerTree.ProfileSnapshotRequest): Promise; /** * Releases layer snapshot captured by the back-end. */ invoke_releaseSnapshot(params: Protocol.LayerTree.ReleaseSnapshotRequest): Promise; /** * Replays the layer snapshot and returns the resulting bitmap. */ invoke_replaySnapshot(params: Protocol.LayerTree.ReplaySnapshotRequest): Promise; /** * Replays the layer snapshot and returns canvas log. */ invoke_snapshotCommandLog(params: Protocol.LayerTree.SnapshotCommandLogRequest): Promise; } export interface LayerTreeDispatcher { layerPainted(params: Protocol.LayerTree.LayerPaintedEvent): void; layerTreeDidChange(params: Protocol.LayerTree.LayerTreeDidChangeEvent): void; } export interface LogApi { /** * Clears the log. */ invoke_clear(): Promise; /** * Disables log domain, prevents further log entries from being reported to the client. */ invoke_disable(): Promise; /** * Enables log domain, sends the entries collected so far to the client by means of the * `entryAdded` notification. */ invoke_enable(): Promise; /** * start violation reporting. */ invoke_startViolationsReport(params: Protocol.Log.StartViolationsReportRequest): Promise; /** * Stop violation reporting. */ invoke_stopViolationsReport(): Promise; } export interface LogDispatcher { /** * Issued when new message was logged. */ entryAdded(params: Protocol.Log.EntryAddedEvent): void; } export interface MediaApi { /** * Enables the Media domain */ invoke_enable(): Promise; /** * Disables the Media domain. */ invoke_disable(): Promise; } export interface MediaDispatcher { /** * This can be called multiple times, and can be used to set / override / * remove player properties. A null propValue indicates removal. */ playerPropertiesChanged(params: Protocol.Media.PlayerPropertiesChangedEvent): void; /** * Send events as a list, allowing them to be batched on the browser for less * congestion. If batched, events must ALWAYS be in chronological order. */ playerEventsAdded(params: Protocol.Media.PlayerEventsAddedEvent): void; /** * Send a list of any messages that need to be delivered. */ playerMessagesLogged(params: Protocol.Media.PlayerMessagesLoggedEvent): void; /** * Send a list of any errors that need to be delivered. */ playerErrorsRaised(params: Protocol.Media.PlayerErrorsRaisedEvent): void; /** * Called whenever a player is created, or when a new agent joins and receives * a list of active players. If an agent is restored, it will receive one * event for each active player. */ playerCreated(params: Protocol.Media.PlayerCreatedEvent): void; } export interface MemoryApi { /** * Retruns current DOM object counters. */ invoke_getDOMCounters(): Promise; /** * Retruns DOM object counters after preparing renderer for leak detection. */ invoke_getDOMCountersForLeakDetection(): Promise; /** * Prepares for leak detection by terminating workers, stopping spellcheckers, * dropping non-essential internal caches, running garbage collections, etc. */ invoke_prepareForLeakDetection(): Promise; /** * Simulate OomIntervention by purging V8 memory. */ invoke_forciblyPurgeJavaScriptMemory(): Promise; /** * Enable/disable suppressing memory pressure notifications in all processes. */ invoke_setPressureNotificationsSuppressed(params: Protocol.Memory.SetPressureNotificationsSuppressedRequest): Promise; /** * Simulate a memory pressure notification in all processes. */ invoke_simulatePressureNotification(params: Protocol.Memory.SimulatePressureNotificationRequest): Promise; /** * Start collecting native memory profile. */ invoke_startSampling(params: Protocol.Memory.StartSamplingRequest): Promise; /** * Stop collecting native memory profile. */ invoke_stopSampling(): Promise; /** * Retrieve native memory allocations profile * collected since renderer process startup. */ invoke_getAllTimeSamplingProfile(): Promise; /** * Retrieve native memory allocations profile * collected since browser process startup. */ invoke_getBrowserSamplingProfile(): Promise; /** * Retrieve native memory allocations profile collected since last * `startSampling` call. */ invoke_getSamplingProfile(): Promise; } export interface MemoryDispatcher { } export interface NetworkApi { /** * Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted. */ invoke_setAcceptedEncodings(params: Protocol.Network.SetAcceptedEncodingsRequest): Promise; /** * Clears accepted encodings set by setAcceptedEncodings */ invoke_clearAcceptedEncodingsOverride(): Promise; /** * Tells whether clearing browser cache is supported. * @deprecated */ invoke_canClearBrowserCache(): Promise; /** * Tells whether clearing browser cookies is supported. * @deprecated */ invoke_canClearBrowserCookies(): Promise; /** * Tells whether emulation of network conditions is supported. * @deprecated */ invoke_canEmulateNetworkConditions(): Promise; /** * Clears browser cache. */ invoke_clearBrowserCache(): Promise; /** * Clears browser cookies. */ invoke_clearBrowserCookies(): Promise; /** * Response to Network.requestIntercepted which either modifies the request to continue with any * modifications, or blocks it, or completes it with the provided response bytes. If a network * fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted * event will be sent with the same InterceptionId. * Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead. * @deprecated */ invoke_continueInterceptedRequest(params: Protocol.Network.ContinueInterceptedRequestRequest): Promise; /** * Deletes browser cookies with matching name and url or domain/path/partitionKey pair. */ invoke_deleteCookies(params: Protocol.Network.DeleteCookiesRequest): Promise; /** * Disables network tracking, prevents network events from being sent to the client. */ invoke_disable(): Promise; /** * Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule * and overrideNetworkState commands, which can be used together to the same effect. * @deprecated */ invoke_emulateNetworkConditions(params: Protocol.Network.EmulateNetworkConditionsRequest): Promise; /** * Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated * Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to * explicitly modify `navigator` behavior. */ invoke_emulateNetworkConditionsByRule(params: Protocol.Network.EmulateNetworkConditionsByRuleRequest): Promise; /** * Override the state of navigator.onLine and navigator.connection. */ invoke_overrideNetworkState(params: Protocol.Network.OverrideNetworkStateRequest): Promise; /** * Enables network tracking, network events will now be delivered to the client. */ invoke_enable(params: Protocol.Network.EnableRequest): Promise; /** * Configures storing response bodies outside of renderer, so that these survive * a cross-process navigation. * If maxTotalBufferSize is not set, durable messages are disabled. */ invoke_configureDurableMessages(params: Protocol.Network.ConfigureDurableMessagesRequest): Promise; /** * Returns all browser cookies. Depending on the backend support, will return detailed cookie * information in the `cookies` field. * Deprecated. Use Storage.getCookies instead. * @deprecated */ invoke_getAllCookies(): Promise; /** * Returns the DER-encoded certificate. */ invoke_getCertificate(params: Protocol.Network.GetCertificateRequest): Promise; /** * Returns all browser cookies for the current URL. Depending on the backend support, will return * detailed cookie information in the `cookies` field. */ invoke_getCookies(params: Protocol.Network.GetCookiesRequest): Promise; /** * Returns content served for the given request. */ invoke_getResponseBody(params: Protocol.Network.GetResponseBodyRequest): Promise; /** * Returns post data sent with the request. Returns an error when no data was sent with the request. */ invoke_getRequestPostData(params: Protocol.Network.GetRequestPostDataRequest): Promise; /** * Returns content served for the given currently intercepted request. */ invoke_getResponseBodyForInterception(params: Protocol.Network.GetResponseBodyForInterceptionRequest): Promise; /** * Returns a handle to the stream representing the response body. Note that after this command, * the intercepted request can't be continued as is -- you either need to cancel it or to provide * the response body. The stream only supports sequential read, IO.read will fail if the position * is specified. */ invoke_takeResponseBodyForInterceptionAsStream(params: Protocol.Network.TakeResponseBodyForInterceptionAsStreamRequest): Promise; /** * This method sends a new XMLHttpRequest which is identical to the original one. The following * parameters should be identical: method, url, async, request body, extra headers, withCredentials * attribute, user, password. */ invoke_replayXHR(params: Protocol.Network.ReplayXHRRequest): Promise; /** * Searches for given string in response content. */ invoke_searchInResponseBody(params: Protocol.Network.SearchInResponseBodyRequest): Promise; /** * Blocks URLs from loading. */ invoke_setBlockedURLs(params: Protocol.Network.SetBlockedURLsRequest): Promise; /** * Toggles ignoring of service worker for each request. */ invoke_setBypassServiceWorker(params: Protocol.Network.SetBypassServiceWorkerRequest): Promise; /** * Toggles ignoring cache for each request. If `true`, cache will not be used. */ invoke_setCacheDisabled(params: Protocol.Network.SetCacheDisabledRequest): Promise; /** * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. */ invoke_setCookie(params: Protocol.Network.SetCookieRequest): Promise; /** * Sets given cookies. */ invoke_setCookies(params: Protocol.Network.SetCookiesRequest): Promise; /** * Specifies whether to always send extra HTTP headers with the requests from this page. */ invoke_setExtraHTTPHeaders(params: Protocol.Network.SetExtraHTTPHeadersRequest): Promise; /** * Specifies whether to attach a page script stack id in requests */ invoke_setAttachDebugStack(params: Protocol.Network.SetAttachDebugStackRequest): Promise; /** * Sets the requests to intercept that match the provided patterns and optionally resource types. * Deprecated, please use Fetch.enable instead. * @deprecated */ invoke_setRequestInterception(params: Protocol.Network.SetRequestInterceptionRequest): Promise; /** * Allows overriding user agent with the given string. */ invoke_setUserAgentOverride(params: Protocol.Network.SetUserAgentOverrideRequest): Promise; /** * Enables streaming of the response for the given requestId. * If enabled, the dataReceived event contains the data that was received during streaming. */ invoke_streamResourceContent(params: Protocol.Network.StreamResourceContentRequest): Promise; /** * Returns information about the COEP/COOP isolation status. */ invoke_getSecurityIsolationStatus(params: Protocol.Network.GetSecurityIsolationStatusRequest): Promise; /** * Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. * Enabling triggers 'reportingApiReportAdded' for all existing reports. */ invoke_enableReportingApi(params: Protocol.Network.EnableReportingApiRequest): Promise; /** * Sets up tracking device bound sessions and fetching of initial set of sessions. */ invoke_enableDeviceBoundSessions(params: Protocol.Network.EnableDeviceBoundSessionsRequest): Promise; /** * Fetches the schemeful site for a specific origin. */ invoke_fetchSchemefulSite(params: Protocol.Network.FetchSchemefulSiteRequest): Promise; /** * Fetches the resource and returns the content. */ invoke_loadNetworkResource(params: Protocol.Network.LoadNetworkResourceRequest): Promise; /** * Sets Controls for third-party cookie access * Page reload is required before the new cookie behavior will be observed */ invoke_setCookieControls(params: Protocol.Network.SetCookieControlsRequest): Promise; } export interface NetworkDispatcher { /** * Fired when data chunk was received over the network. */ dataReceived(params: Protocol.Network.DataReceivedEvent): void; /** * Fired when EventSource message is received. */ eventSourceMessageReceived(params: Protocol.Network.EventSourceMessageReceivedEvent): void; /** * Fired when HTTP request has failed to load. */ loadingFailed(params: Protocol.Network.LoadingFailedEvent): void; /** * Fired when HTTP request has finished loading. */ loadingFinished(params: Protocol.Network.LoadingFinishedEvent): void; /** * Details of an intercepted HTTP request, which must be either allowed, blocked, modified or * mocked. * Deprecated, use Fetch.requestPaused instead. * @deprecated */ requestIntercepted(params: Protocol.Network.RequestInterceptedEvent): void; /** * Fired if request ended up loading from cache. */ requestServedFromCache(params: Protocol.Network.RequestServedFromCacheEvent): void; /** * Fired when page is about to send HTTP request. */ requestWillBeSent(params: Protocol.Network.RequestWillBeSentEvent): void; /** * Fired when resource loading priority is changed */ resourceChangedPriority(params: Protocol.Network.ResourceChangedPriorityEvent): void; /** * Fired when a signed exchange was received over the network */ signedExchangeReceived(params: Protocol.Network.SignedExchangeReceivedEvent): void; /** * Fired when HTTP response is available. */ responseReceived(params: Protocol.Network.ResponseReceivedEvent): void; /** * Fired when WebSocket is closed. */ webSocketClosed(params: Protocol.Network.WebSocketClosedEvent): void; /** * Fired upon WebSocket creation. */ webSocketCreated(params: Protocol.Network.WebSocketCreatedEvent): void; /** * Fired when WebSocket message error occurs. */ webSocketFrameError(params: Protocol.Network.WebSocketFrameErrorEvent): void; /** * Fired when WebSocket message is received. */ webSocketFrameReceived(params: Protocol.Network.WebSocketFrameReceivedEvent): void; /** * Fired when WebSocket message is sent. */ webSocketFrameSent(params: Protocol.Network.WebSocketFrameSentEvent): void; /** * Fired when WebSocket handshake response becomes available. */ webSocketHandshakeResponseReceived(params: Protocol.Network.WebSocketHandshakeResponseReceivedEvent): void; /** * Fired when WebSocket is about to initiate handshake. */ webSocketWillSendHandshakeRequest(params: Protocol.Network.WebSocketWillSendHandshakeRequestEvent): void; /** * Fired upon WebTransport creation. */ webTransportCreated(params: Protocol.Network.WebTransportCreatedEvent): void; /** * Fired when WebTransport handshake is finished. */ webTransportConnectionEstablished(params: Protocol.Network.WebTransportConnectionEstablishedEvent): void; /** * Fired when WebTransport is disposed. */ webTransportClosed(params: Protocol.Network.WebTransportClosedEvent): void; /** * Fired upon direct_socket.TCPSocket creation. */ directTCPSocketCreated(params: Protocol.Network.DirectTCPSocketCreatedEvent): void; /** * Fired when direct_socket.TCPSocket connection is opened. */ directTCPSocketOpened(params: Protocol.Network.DirectTCPSocketOpenedEvent): void; /** * Fired when direct_socket.TCPSocket is aborted. */ directTCPSocketAborted(params: Protocol.Network.DirectTCPSocketAbortedEvent): void; /** * Fired when direct_socket.TCPSocket is closed. */ directTCPSocketClosed(params: Protocol.Network.DirectTCPSocketClosedEvent): void; /** * Fired when data is sent to tcp direct socket stream. */ directTCPSocketChunkSent(params: Protocol.Network.DirectTCPSocketChunkSentEvent): void; /** * Fired when data is received from tcp direct socket stream. */ directTCPSocketChunkReceived(params: Protocol.Network.DirectTCPSocketChunkReceivedEvent): void; directUDPSocketJoinedMulticastGroup(params: Protocol.Network.DirectUDPSocketJoinedMulticastGroupEvent): void; directUDPSocketLeftMulticastGroup(params: Protocol.Network.DirectUDPSocketLeftMulticastGroupEvent): void; /** * Fired upon direct_socket.UDPSocket creation. */ directUDPSocketCreated(params: Protocol.Network.DirectUDPSocketCreatedEvent): void; /** * Fired when direct_socket.UDPSocket connection is opened. */ directUDPSocketOpened(params: Protocol.Network.DirectUDPSocketOpenedEvent): void; /** * Fired when direct_socket.UDPSocket is aborted. */ directUDPSocketAborted(params: Protocol.Network.DirectUDPSocketAbortedEvent): void; /** * Fired when direct_socket.UDPSocket is closed. */ directUDPSocketClosed(params: Protocol.Network.DirectUDPSocketClosedEvent): void; /** * Fired when message is sent to udp direct socket stream. */ directUDPSocketChunkSent(params: Protocol.Network.DirectUDPSocketChunkSentEvent): void; /** * Fired when message is received from udp direct socket stream. */ directUDPSocketChunkReceived(params: Protocol.Network.DirectUDPSocketChunkReceivedEvent): void; /** * Fired when additional information about a requestWillBeSent event is available from the * network stack. Not every requestWillBeSent event will have an additional * requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent * or requestWillBeSentExtraInfo will be fired first for the same request. */ requestWillBeSentExtraInfo(params: Protocol.Network.RequestWillBeSentExtraInfoEvent): void; /** * Fired when additional information about a responseReceived event is available from the network * stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for * it, and responseReceivedExtraInfo may be fired before or after responseReceived. */ responseReceivedExtraInfo(params: Protocol.Network.ResponseReceivedExtraInfoEvent): void; /** * Fired when 103 Early Hints headers is received in addition to the common response. * Not every responseReceived event will have an responseReceivedEarlyHints fired. * Only one responseReceivedEarlyHints may be fired for eached responseReceived event. */ responseReceivedEarlyHints(params: Protocol.Network.ResponseReceivedEarlyHintsEvent): void; /** * Fired exactly once for each Trust Token operation. Depending on * the type of the operation and whether the operation succeeded or * failed, the event is fired before the corresponding request was sent * or after the response was received. */ trustTokenOperationDone(params: Protocol.Network.TrustTokenOperationDoneEvent): void; /** * Fired once security policy has been updated. */ policyUpdated(): void; /** * Is sent whenever a new report is added. * And after 'enableReportingApi' for all existing reports. */ reportingApiReportAdded(params: Protocol.Network.ReportingApiReportAddedEvent): void; reportingApiReportUpdated(params: Protocol.Network.ReportingApiReportUpdatedEvent): void; reportingApiEndpointsChangedForOrigin(params: Protocol.Network.ReportingApiEndpointsChangedForOriginEvent): void; /** * Triggered when the initial set of device bound sessions is added. */ deviceBoundSessionsAdded(params: Protocol.Network.DeviceBoundSessionsAddedEvent): void; /** * Triggered when a device bound session event occurs. */ deviceBoundSessionEventOccurred(params: Protocol.Network.DeviceBoundSessionEventOccurredEvent): void; } export interface OverlayApi { /** * Disables domain notifications. */ invoke_disable(): Promise; /** * Enables domain notifications. */ invoke_enable(): Promise; /** * For testing. */ invoke_getHighlightObjectForTest(params: Protocol.Overlay.GetHighlightObjectForTestRequest): Promise; /** * For Persistent Grid testing. */ invoke_getGridHighlightObjectsForTest(params: Protocol.Overlay.GetGridHighlightObjectsForTestRequest): Promise; /** * For Source Order Viewer testing. */ invoke_getSourceOrderHighlightObjectForTest(params: Protocol.Overlay.GetSourceOrderHighlightObjectForTestRequest): Promise; /** * Hides any highlight. */ invoke_hideHighlight(): Promise; /** * Highlights owner element of the frame with given id. * Deprecated: Doesn't work reliably and cannot be fixed due to process * separation (the owner node might be in a different process). Determine * the owner node in the client and use highlightNode. * @deprecated */ invoke_highlightFrame(params: Protocol.Overlay.HighlightFrameRequest): Promise; /** * Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or * objectId must be specified. */ invoke_highlightNode(params: Protocol.Overlay.HighlightNodeRequest): Promise; /** * Highlights given quad. Coordinates are absolute with respect to the main frame viewport. */ invoke_highlightQuad(params: Protocol.Overlay.HighlightQuadRequest): Promise; /** * Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. * Issue: the method does not handle device pixel ratio (DPR) correctly. * The coordinates currently have to be adjusted by the client * if DPR is not 1 (see crbug.com/437807128). */ invoke_highlightRect(params: Protocol.Overlay.HighlightRectRequest): Promise; /** * Highlights the source order of the children of the DOM node with given id or with the given * JavaScript object wrapper. Either nodeId or objectId must be specified. */ invoke_highlightSourceOrder(params: Protocol.Overlay.HighlightSourceOrderRequest): Promise; /** * Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. * Backend then generates 'inspectNodeRequested' event upon element selection. */ invoke_setInspectMode(params: Protocol.Overlay.SetInspectModeRequest): Promise; /** * Highlights owner element of all frames detected to be ads. */ invoke_setShowAdHighlights(params: Protocol.Overlay.SetShowAdHighlightsRequest): Promise; invoke_setPausedInDebuggerMessage(params: Protocol.Overlay.SetPausedInDebuggerMessageRequest): Promise; /** * Requests that backend shows debug borders on layers */ invoke_setShowDebugBorders(params: Protocol.Overlay.SetShowDebugBordersRequest): Promise; /** * Requests that backend shows the FPS counter */ invoke_setShowFPSCounter(params: Protocol.Overlay.SetShowFPSCounterRequest): Promise; /** * Highlight multiple elements with the CSS Grid overlay. */ invoke_setShowGridOverlays(params: Protocol.Overlay.SetShowGridOverlaysRequest): Promise; invoke_setShowFlexOverlays(params: Protocol.Overlay.SetShowFlexOverlaysRequest): Promise; invoke_setShowScrollSnapOverlays(params: Protocol.Overlay.SetShowScrollSnapOverlaysRequest): Promise; invoke_setShowContainerQueryOverlays(params: Protocol.Overlay.SetShowContainerQueryOverlaysRequest): Promise; invoke_setShowInspectedElementAnchor(params: Protocol.Overlay.SetShowInspectedElementAnchorRequest): Promise; /** * Requests that backend shows paint rectangles */ invoke_setShowPaintRects(params: Protocol.Overlay.SetShowPaintRectsRequest): Promise; /** * Requests that backend shows layout shift regions */ invoke_setShowLayoutShiftRegions(params: Protocol.Overlay.SetShowLayoutShiftRegionsRequest): Promise; /** * Requests that backend shows scroll bottleneck rects */ invoke_setShowScrollBottleneckRects(params: Protocol.Overlay.SetShowScrollBottleneckRectsRequest): Promise; /** * Deprecated, no longer has any effect. * @deprecated */ invoke_setShowHitTestBorders(params: Protocol.Overlay.SetShowHitTestBordersRequest): Promise; /** * Deprecated, no longer has any effect. * @deprecated */ invoke_setShowWebVitals(params: Protocol.Overlay.SetShowWebVitalsRequest): Promise; /** * Paints viewport size upon main frame resize. */ invoke_setShowViewportSizeOnResize(params: Protocol.Overlay.SetShowViewportSizeOnResizeRequest): Promise; /** * Add a dual screen device hinge */ invoke_setShowHinge(params: Protocol.Overlay.SetShowHingeRequest): Promise; /** * Show elements in isolation mode with overlays. */ invoke_setShowIsolatedElements(params: Protocol.Overlay.SetShowIsolatedElementsRequest): Promise; /** * Show Window Controls Overlay for PWA */ invoke_setShowWindowControlsOverlay(params: Protocol.Overlay.SetShowWindowControlsOverlayRequest): Promise; } export interface OverlayDispatcher { /** * Fired when the node should be inspected. This happens after call to `setInspectMode` or when * user manually inspects an element. */ inspectNodeRequested(params: Protocol.Overlay.InspectNodeRequestedEvent): void; /** * Fired when the node should be highlighted. This happens after call to `setInspectMode`. */ nodeHighlightRequested(params: Protocol.Overlay.NodeHighlightRequestedEvent): void; /** * Fired when user asks to capture screenshot of some area on the page. */ screenshotRequested(params: Protocol.Overlay.ScreenshotRequestedEvent): void; /** * Fired when user asks to show the Inspect panel. */ inspectPanelShowRequested(params: Protocol.Overlay.InspectPanelShowRequestedEvent): void; /** * Fired when user asks to restore the Inspected Element floating window. */ inspectedElementWindowRestored(params: Protocol.Overlay.InspectedElementWindowRestoredEvent): void; /** * Fired when user cancels the inspect mode. */ inspectModeCanceled(): void; } export interface PWAApi { /** * Returns the following OS state for the given manifest id. */ invoke_getOsAppState(params: Protocol.PWA.GetOsAppStateRequest): Promise; /** * Installs the given manifest identity, optionally using the given installUrlOrBundleUrl * * IWA-specific install description: * manifestId corresponds to isolated-app:// + web_package::SignedWebBundleId * * File installation mode: * The installUrlOrBundleUrl can be either file:// or http(s):// pointing * to a signed web bundle (.swbn). In this case SignedWebBundleId must correspond to * The .swbn file's signing key. * * Dev proxy installation mode: * installUrlOrBundleUrl must be http(s):// that serves dev mode IWA. * web_package::SignedWebBundleId must be of type dev proxy. * * The advantage of dev proxy mode is that all changes to IWA * automatically will be reflected in the running app without * reinstallation. * * To generate bundle id for proxy mode: * 1. Generate 32 random bytes. * 2. Add a specific suffix at the end following the documentation * https://github.com/WICG/isolated-web-apps/blob/main/Scheme.md#suffix * 3. Encode the entire sequence using Base32 without padding. * * If Chrome is not in IWA dev * mode, the installation will fail, regardless of the state of the allowlist. */ invoke_install(params: Protocol.PWA.InstallRequest): Promise; /** * Uninstalls the given manifest_id and closes any opened app windows. */ invoke_uninstall(params: Protocol.PWA.UninstallRequest): Promise; /** * Launches the installed web app, or an url in the same web app instead of the * default start url if it is provided. Returns a page Target.TargetID which * can be used to attach to via Target.attachToTarget or similar APIs. */ invoke_launch(params: Protocol.PWA.LaunchRequest): Promise; /** * Opens one or more local files from an installed web app identified by its * manifestId. The web app needs to have file handlers registered to process * the files. The API returns one or more page Target.TargetIDs which can be * used to attach to via Target.attachToTarget or similar APIs. * If some files in the parameters cannot be handled by the web app, they will * be ignored. If none of the files can be handled, this API returns an error. * If no files are provided as the parameter, this API also returns an error. * * According to the definition of the file handlers in the manifest file, one * Target.TargetID may represent a page handling one or more files. The order * of the returned Target.TargetIDs is not guaranteed. * * TODO(crbug.com/339454034): Check the existences of the input files. */ invoke_launchFilesInApp(params: Protocol.PWA.LaunchFilesInAppRequest): Promise; /** * Opens the current page in its web app identified by the manifest id, needs * to be called on a page target. This function returns immediately without * waiting for the app to finish loading. */ invoke_openCurrentPageInApp(params: Protocol.PWA.OpenCurrentPageInAppRequest): Promise; /** * Changes user settings of the web app identified by its manifestId. If the * app was not installed, this command returns an error. Unset parameters will * be ignored; unrecognized values will cause an error. * * Unlike the ones defined in the manifest files of the web apps, these * settings are provided by the browser and controlled by the users, they * impact the way the browser handling the web apps. * * See the comment of each parameter. */ invoke_changeAppUserSettings(params: Protocol.PWA.ChangeAppUserSettingsRequest): Promise; } export interface PWADispatcher { } export interface PageApi { /** * Deprecated, please use addScriptToEvaluateOnNewDocument instead. * @deprecated */ invoke_addScriptToEvaluateOnLoad(params: Protocol.Page.AddScriptToEvaluateOnLoadRequest): Promise; /** * Evaluates given script in every frame upon creation (before loading frame's scripts). */ invoke_addScriptToEvaluateOnNewDocument(params: Protocol.Page.AddScriptToEvaluateOnNewDocumentRequest): Promise; /** * Brings page to front (activates tab). */ invoke_bringToFront(): Promise; /** * Capture page screenshot. */ invoke_captureScreenshot(params: Protocol.Page.CaptureScreenshotRequest): Promise; /** * Returns a snapshot of the page as a string. For MHTML format, the serialization includes * iframes, shadow DOM, external resources, and element-inline styles. */ invoke_captureSnapshot(params: Protocol.Page.CaptureSnapshotRequest): Promise; /** * Clears the overridden device metrics. * @deprecated */ invoke_clearDeviceMetricsOverride(): Promise; /** * Clears the overridden Device Orientation. * @deprecated */ invoke_clearDeviceOrientationOverride(): Promise; /** * Clears the overridden Geolocation Position and Error. * @deprecated */ invoke_clearGeolocationOverride(): Promise; /** * Creates an isolated world for the given frame. */ invoke_createIsolatedWorld(params: Protocol.Page.CreateIsolatedWorldRequest): Promise; /** * Deletes browser cookie with given name, domain and path. * @deprecated */ invoke_deleteCookie(params: Protocol.Page.DeleteCookieRequest): Promise; /** * Disables page domain notifications. */ invoke_disable(): Promise; /** * Enables page domain notifications. */ invoke_enable(params: Protocol.Page.EnableRequest): Promise; /** * Gets the processed manifest for this current document. * This API always waits for the manifest to be loaded. * If manifestId is provided, and it does not match the manifest of the * current document, this API errors out. * If there is not a loaded page, this API errors out immediately. */ invoke_getAppManifest(params: Protocol.Page.GetAppManifestRequest): Promise; invoke_getInstallabilityErrors(): Promise; /** * Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation. * @deprecated */ invoke_getManifestIcons(): Promise; /** * Returns the unique (PWA) app id. * Only returns values if the feature flag 'WebAppEnableManifestId' is enabled */ invoke_getAppId(): Promise; invoke_getAdScriptAncestry(params: Protocol.Page.GetAdScriptAncestryRequest): Promise; /** * Returns present frame tree structure. */ invoke_getFrameTree(): Promise; /** * Returns metrics relating to the layouting of the page, such as viewport bounds/scale. */ invoke_getLayoutMetrics(): Promise; /** * Returns navigation history for the current page. */ invoke_getNavigationHistory(): Promise; /** * Resets navigation history for the current page. */ invoke_resetNavigationHistory(): Promise; /** * Returns content of the given resource. */ invoke_getResourceContent(params: Protocol.Page.GetResourceContentRequest): Promise; /** * Returns present frame / resource tree structure. */ invoke_getResourceTree(): Promise; /** * Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). */ invoke_handleJavaScriptDialog(params: Protocol.Page.HandleJavaScriptDialogRequest): Promise; /** * Navigates current page to the given URL. */ invoke_navigate(params: Protocol.Page.NavigateRequest): Promise; /** * Navigates current page to the given history entry. */ invoke_navigateToHistoryEntry(params: Protocol.Page.NavigateToHistoryEntryRequest): Promise; /** * Print page as PDF. */ invoke_printToPDF(params: Protocol.Page.PrintToPDFRequest): Promise; /** * Reloads given page optionally ignoring the cache. */ invoke_reload(params: Protocol.Page.ReloadRequest): Promise; /** * Deprecated, please use removeScriptToEvaluateOnNewDocument instead. * @deprecated */ invoke_removeScriptToEvaluateOnLoad(params: Protocol.Page.RemoveScriptToEvaluateOnLoadRequest): Promise; /** * Removes given script from the list. */ invoke_removeScriptToEvaluateOnNewDocument(params: Protocol.Page.RemoveScriptToEvaluateOnNewDocumentRequest): Promise; /** * Acknowledges that a screencast frame has been received by the frontend. */ invoke_screencastFrameAck(params: Protocol.Page.ScreencastFrameAckRequest): Promise; /** * Searches for given string in resource content. */ invoke_searchInResource(params: Protocol.Page.SearchInResourceRequest): Promise; /** * Enable Chrome's experimental ad filter on all sites. */ invoke_setAdBlockingEnabled(params: Protocol.Page.SetAdBlockingEnabledRequest): Promise; /** * Enable page Content Security Policy by-passing. */ invoke_setBypassCSP(params: Protocol.Page.SetBypassCSPRequest): Promise; /** * Get Permissions Policy state on given frame. */ invoke_getPermissionsPolicyState(params: Protocol.Page.GetPermissionsPolicyStateRequest): Promise; /** * Get Origin Trials on given frame. */ invoke_getOriginTrials(params: Protocol.Page.GetOriginTrialsRequest): Promise; /** * Overrides the values of device screen dimensions (window.screen.width, window.screen.height, * window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media * query results). * @deprecated */ invoke_setDeviceMetricsOverride(params: Protocol.Page.SetDeviceMetricsOverrideRequest): Promise; /** * Overrides the Device Orientation. * @deprecated */ invoke_setDeviceOrientationOverride(params: Protocol.Page.SetDeviceOrientationOverrideRequest): Promise; /** * Set generic font families. */ invoke_setFontFamilies(params: Protocol.Page.SetFontFamiliesRequest): Promise; /** * Set default font sizes. */ invoke_setFontSizes(params: Protocol.Page.SetFontSizesRequest): Promise; /** * Sets given markup as the document's HTML. */ invoke_setDocumentContent(params: Protocol.Page.SetDocumentContentRequest): Promise; /** * Set the behavior when downloading a file. * @deprecated */ invoke_setDownloadBehavior(params: Protocol.Page.SetDownloadBehaviorRequest): Promise; /** * Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position * unavailable. * @deprecated */ invoke_setGeolocationOverride(params: Protocol.Page.SetGeolocationOverrideRequest): Promise; /** * Controls whether page will emit lifecycle events. */ invoke_setLifecycleEventsEnabled(params: Protocol.Page.SetLifecycleEventsEnabledRequest): Promise; /** * Toggles mouse event-based touch event emulation. * @deprecated */ invoke_setTouchEmulationEnabled(params: Protocol.Page.SetTouchEmulationEnabledRequest): Promise; /** * Starts sending each frame using the `screencastFrame` event. */ invoke_startScreencast(params: Protocol.Page.StartScreencastRequest): Promise; /** * Force the page stop all navigations and pending resource fetches. */ invoke_stopLoading(): Promise; /** * Crashes renderer on the IO thread, generates minidumps. */ invoke_crash(): Promise; /** * Tries to close page, running its beforeunload hooks, if any. */ invoke_close(): Promise; /** * Tries to update the web lifecycle state of the page. * It will transition the page to the given state according to: * https://github.com/WICG/web-lifecycle/ */ invoke_setWebLifecycleState(params: Protocol.Page.SetWebLifecycleStateRequest): Promise; /** * Stops sending each frame in the `screencastFrame`. */ invoke_stopScreencast(): Promise; /** * Requests backend to produce compilation cache for the specified scripts. * `scripts` are appended to the list of scripts for which the cache * would be produced. The list may be reset during page navigation. * When script with a matching URL is encountered, the cache is optionally * produced upon backend discretion, based on internal heuristics. * See also: `Page.compilationCacheProduced`. */ invoke_produceCompilationCache(params: Protocol.Page.ProduceCompilationCacheRequest): Promise; /** * Seeds compilation cache for given url. Compilation cache does not survive * cross-process navigation. */ invoke_addCompilationCache(params: Protocol.Page.AddCompilationCacheRequest): Promise; /** * Clears seeded compilation cache. */ invoke_clearCompilationCache(): Promise; /** * Sets the Secure Payment Confirmation transaction mode. * https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode */ invoke_setSPCTransactionMode(params: Protocol.Page.SetSPCTransactionModeRequest): Promise; /** * Extensions for Custom Handlers API: * https://html.spec.whatwg.org/multipage/system-state.html#rph-automation */ invoke_setRPHRegistrationMode(params: Protocol.Page.SetRPHRegistrationModeRequest): Promise; /** * Generates a report for testing. */ invoke_generateTestReport(params: Protocol.Page.GenerateTestReportRequest): Promise; /** * Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger. */ invoke_waitForDebugger(): Promise; /** * Intercept file chooser requests and transfer control to protocol clients. * When file chooser interception is enabled, native file chooser dialog is not shown. * Instead, a protocol event `Page.fileChooserOpened` is emitted. */ invoke_setInterceptFileChooserDialog(params: Protocol.Page.SetInterceptFileChooserDialogRequest): Promise; /** * Enable/disable prerendering manually. * * This command is a short-term solution for https://crbug.com/1440085. * See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA * for more details. * * TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets. */ invoke_setPrerenderingAllowed(params: Protocol.Page.SetPrerenderingAllowedRequest): Promise; /** * Get the annotated page content for the main frame. * This is an experimental command that is subject to change. */ invoke_getAnnotatedPageContent(params: Protocol.Page.GetAnnotatedPageContentRequest): Promise; } export interface PageDispatcher { domContentEventFired(params: Protocol.Page.DomContentEventFiredEvent): void; /** * Emitted only when `page.interceptFileChooser` is enabled. */ fileChooserOpened(params: Protocol.Page.FileChooserOpenedEvent): void; /** * Fired when frame has been attached to its parent. */ frameAttached(params: Protocol.Page.FrameAttachedEvent): void; /** * Fired when frame no longer has a scheduled navigation. * @deprecated */ frameClearedScheduledNavigation(params: Protocol.Page.FrameClearedScheduledNavigationEvent): void; /** * Fired when frame has been detached from its parent. */ frameDetached(params: Protocol.Page.FrameDetachedEvent): void; /** * Fired before frame subtree is detached. Emitted before any frame of the * subtree is actually detached. */ frameSubtreeWillBeDetached(params: Protocol.Page.FrameSubtreeWillBeDetachedEvent): void; /** * Fired once navigation of the frame has completed. Frame is now associated with the new loader. */ frameNavigated(params: Protocol.Page.FrameNavigatedEvent): void; /** * Fired when opening document to write to. */ documentOpened(params: Protocol.Page.DocumentOpenedEvent): void; frameResized(): void; /** * Fired when a navigation starts. This event is fired for both * renderer-initiated and browser-initiated navigations. For renderer-initiated * navigations, the event is fired after `frameRequestedNavigation`. * Navigation may still be cancelled after the event is issued. Multiple events * can be fired for a single navigation, for example, when a same-document * navigation becomes a cross-document navigation (such as in the case of a * frameset). */ frameStartedNavigating(params: Protocol.Page.FrameStartedNavigatingEvent): void; /** * Fired when a renderer-initiated navigation is requested. * Navigation may still be cancelled after the event is issued. */ frameRequestedNavigation(params: Protocol.Page.FrameRequestedNavigationEvent): void; /** * Fired when frame schedules a potential navigation. * @deprecated */ frameScheduledNavigation(params: Protocol.Page.FrameScheduledNavigationEvent): void; /** * Fired when frame has started loading. */ frameStartedLoading(params: Protocol.Page.FrameStartedLoadingEvent): void; /** * Fired when frame has stopped loading. */ frameStoppedLoading(params: Protocol.Page.FrameStoppedLoadingEvent): void; /** * Fired when page is about to start a download. * Deprecated. Use Browser.downloadWillBegin instead. * @deprecated */ downloadWillBegin(params: Protocol.Page.DownloadWillBeginEvent): void; /** * Fired when download makes progress. Last call has |done| == true. * Deprecated. Use Browser.downloadProgress instead. * @deprecated */ downloadProgress(params: Protocol.Page.DownloadProgressEvent): void; /** * Fired when interstitial page was hidden */ interstitialHidden(): void; /** * Fired when interstitial page was shown */ interstitialShown(): void; /** * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been * closed. */ javascriptDialogClosed(params: Protocol.Page.JavascriptDialogClosedEvent): void; /** * Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to * open. */ javascriptDialogOpening(params: Protocol.Page.JavascriptDialogOpeningEvent): void; /** * Fired for lifecycle events (navigation, load, paint, etc) in the current * target (including local frames). */ lifecycleEvent(params: Protocol.Page.LifecycleEventEvent): void; /** * Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do * not assume any ordering with the Page.frameNavigated event. This event is fired only for * main-frame history navigation where the document changes (non-same-document navigations), * when bfcache navigation fails. */ backForwardCacheNotUsed(params: Protocol.Page.BackForwardCacheNotUsedEvent): void; loadEventFired(params: Protocol.Page.LoadEventFiredEvent): void; /** * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation. */ navigatedWithinDocument(params: Protocol.Page.NavigatedWithinDocumentEvent): void; /** * Compressed image data requested by the `startScreencast`. */ screencastFrame(params: Protocol.Page.ScreencastFrameEvent): void; /** * Fired when the page with currently enabled screencast was shown or hidden `. */ screencastVisibilityChanged(params: Protocol.Page.ScreencastVisibilityChangedEvent): void; /** * Fired when a new window is going to be opened, via window.open(), link click, form submission, * etc. */ windowOpen(params: Protocol.Page.WindowOpenEvent): void; /** * Issued for every compilation cache generated. */ compilationCacheProduced(params: Protocol.Page.CompilationCacheProducedEvent): void; } export interface PerformanceApi { /** * Disable collecting and reporting metrics. */ invoke_disable(): Promise; /** * Enable collecting and reporting metrics. */ invoke_enable(params: Protocol.Performance.EnableRequest): Promise; /** * Sets time domain to use for collecting and reporting duration metrics. * Note that this must be called before enabling metrics collection. Calling * this method while metrics collection is enabled returns an error. * @deprecated */ invoke_setTimeDomain(params: Protocol.Performance.SetTimeDomainRequest): Promise; /** * Retrieve current values of run-time metrics. */ invoke_getMetrics(): Promise; } export interface PerformanceDispatcher { /** * Current values of the metrics. */ metrics(params: Protocol.Performance.MetricsEvent): void; } export interface PerformanceTimelineApi { /** * Previously buffered events would be reported before method returns. * See also: timelineEventAdded */ invoke_enable(params: Protocol.PerformanceTimeline.EnableRequest): Promise; } export interface PerformanceTimelineDispatcher { /** * Sent when a performance timeline event is added. See reportPerformanceTimeline method. */ timelineEventAdded(params: Protocol.PerformanceTimeline.TimelineEventAddedEvent): void; } export interface PreloadApi { invoke_enable(): Promise; invoke_disable(): Promise; } export interface PreloadDispatcher { /** * Upsert. Currently, it is only emitted when a rule set added. */ ruleSetUpdated(params: Protocol.Preload.RuleSetUpdatedEvent): void; ruleSetRemoved(params: Protocol.Preload.RuleSetRemovedEvent): void; /** * Fired when a preload enabled state is updated. */ preloadEnabledStateUpdated(params: Protocol.Preload.PreloadEnabledStateUpdatedEvent): void; /** * Fired when a prefetch attempt is updated. */ prefetchStatusUpdated(params: Protocol.Preload.PrefetchStatusUpdatedEvent): void; /** * Fired when a prerender attempt is updated. */ prerenderStatusUpdated(params: Protocol.Preload.PrerenderStatusUpdatedEvent): void; /** * Send a list of sources for all preloading attempts in a document. */ preloadingAttemptSourcesUpdated(params: Protocol.Preload.PreloadingAttemptSourcesUpdatedEvent): void; } export interface SecurityApi { /** * Disables tracking security state changes. */ invoke_disable(): Promise; /** * Enables tracking security state changes. */ invoke_enable(): Promise; /** * Enable/disable whether all certificate errors should be ignored. */ invoke_setIgnoreCertificateErrors(params: Protocol.Security.SetIgnoreCertificateErrorsRequest): Promise; /** * Handles a certificate error that fired a certificateError event. * @deprecated */ invoke_handleCertificateError(params: Protocol.Security.HandleCertificateErrorRequest): Promise; /** * Enable/disable overriding certificate errors. If enabled, all certificate error events need to * be handled by the DevTools client and should be answered with `handleCertificateError` commands. * @deprecated */ invoke_setOverrideCertificateErrors(params: Protocol.Security.SetOverrideCertificateErrorsRequest): Promise; } export interface SecurityDispatcher { /** * There is a certificate error. If overriding certificate errors is enabled, then it should be * handled with the `handleCertificateError` command. Note: this event does not fire if the * certificate error has been allowed internally. Only one client per target should override * certificate errors at the same time. * @deprecated */ certificateError(params: Protocol.Security.CertificateErrorEvent): void; /** * The security state of the page changed. */ visibleSecurityStateChanged(params: Protocol.Security.VisibleSecurityStateChangedEvent): void; /** * The security state of the page changed. No longer being sent. * @deprecated */ securityStateChanged(params: Protocol.Security.SecurityStateChangedEvent): void; } export interface ServiceWorkerApi { invoke_deliverPushMessage(params: Protocol.ServiceWorker.DeliverPushMessageRequest): Promise; invoke_disable(): Promise; invoke_dispatchSyncEvent(params: Protocol.ServiceWorker.DispatchSyncEventRequest): Promise; invoke_dispatchPeriodicSyncEvent(params: Protocol.ServiceWorker.DispatchPeriodicSyncEventRequest): Promise; invoke_enable(): Promise; invoke_setForceUpdateOnPageLoad(params: Protocol.ServiceWorker.SetForceUpdateOnPageLoadRequest): Promise; invoke_skipWaiting(params: Protocol.ServiceWorker.SkipWaitingRequest): Promise; invoke_startWorker(params: Protocol.ServiceWorker.StartWorkerRequest): Promise; invoke_stopAllWorkers(): Promise; invoke_stopWorker(params: Protocol.ServiceWorker.StopWorkerRequest): Promise; invoke_unregister(params: Protocol.ServiceWorker.UnregisterRequest): Promise; invoke_updateRegistration(params: Protocol.ServiceWorker.UpdateRegistrationRequest): Promise; } export interface ServiceWorkerDispatcher { workerErrorReported(params: Protocol.ServiceWorker.WorkerErrorReportedEvent): void; workerRegistrationUpdated(params: Protocol.ServiceWorker.WorkerRegistrationUpdatedEvent): void; workerVersionUpdated(params: Protocol.ServiceWorker.WorkerVersionUpdatedEvent): void; } export interface SmartCardEmulationApi { /** * Enables the |SmartCardEmulation| domain. */ invoke_enable(): Promise; /** * Disables the |SmartCardEmulation| domain. */ invoke_disable(): Promise; /** * Reports the successful result of a |SCardEstablishContext| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext */ invoke_reportEstablishContextResult(params: Protocol.SmartCardEmulation.ReportEstablishContextResultRequest): Promise; /** * Reports the successful result of a |SCardReleaseContext| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext */ invoke_reportReleaseContextResult(params: Protocol.SmartCardEmulation.ReportReleaseContextResultRequest): Promise; /** * Reports the successful result of a |SCardListReaders| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa */ invoke_reportListReadersResult(params: Protocol.SmartCardEmulation.ReportListReadersResultRequest): Promise; /** * Reports the successful result of a |SCardGetStatusChange| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea */ invoke_reportGetStatusChangeResult(params: Protocol.SmartCardEmulation.ReportGetStatusChangeResultRequest): Promise; /** * Reports the result of a |SCardBeginTransaction| call. * On success, this creates a new transaction object. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction */ invoke_reportBeginTransactionResult(params: Protocol.SmartCardEmulation.ReportBeginTransactionResultRequest): Promise; /** * Reports the successful result of a call that returns only a result code. * Used for: |SCardCancel|, |SCardDisconnect|, |SCardSetAttrib|, |SCardEndTransaction|. * * This maps to: * 1. SCardCancel * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel * * 2. SCardDisconnect * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect * * 3. SCardSetAttrib * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib * * 4. SCardEndTransaction * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction */ invoke_reportPlainResult(params: Protocol.SmartCardEmulation.ReportPlainResultRequest): Promise; /** * Reports the successful result of a |SCardConnect| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta */ invoke_reportConnectResult(params: Protocol.SmartCardEmulation.ReportConnectResultRequest): Promise; /** * Reports the successful result of a call that sends back data on success. * Used for |SCardTransmit|, |SCardControl|, and |SCardGetAttrib|. * * This maps to: * 1. SCardTransmit * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit * * 2. SCardControl * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol * * 3. SCardGetAttrib * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib */ invoke_reportDataResult(params: Protocol.SmartCardEmulation.ReportDataResultRequest): Promise; /** * Reports the successful result of a |SCardStatus| call. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa */ invoke_reportStatusResult(params: Protocol.SmartCardEmulation.ReportStatusResultRequest): Promise; /** * Reports an error result for the given request. */ invoke_reportError(params: Protocol.SmartCardEmulation.ReportErrorRequest): Promise; } export interface SmartCardEmulationDispatcher { /** * Fired when |SCardEstablishContext| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaa1b8970169fd4883a6dc4a8f43f19b67 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardestablishcontext */ establishContextRequested(params: Protocol.SmartCardEmulation.EstablishContextRequestedEvent): void; /** * Fired when |SCardReleaseContext| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga6aabcba7744c5c9419fdd6404f73a934 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardreleasecontext */ releaseContextRequested(params: Protocol.SmartCardEmulation.ReleaseContextRequestedEvent): void; /** * Fired when |SCardListReaders| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga93b07815789b3cf2629d439ecf20f0d9 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardlistreadersa */ listReadersRequested(params: Protocol.SmartCardEmulation.ListReadersRequestedEvent): void; /** * Fired when |SCardGetStatusChange| is called. Timeout is specified in milliseconds. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga33247d5d1257d59e55647c3bb717db24 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetstatuschangea */ getStatusChangeRequested(params: Protocol.SmartCardEmulation.GetStatusChangeRequestedEvent): void; /** * Fired when |SCardCancel| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacbbc0c6d6c0cbbeb4f4debf6fbeeee6 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcancel */ cancelRequested(params: Protocol.SmartCardEmulation.CancelRequestedEvent): void; /** * Fired when |SCardConnect| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4e515829752e0a8dbc4d630696a8d6a5 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardconnecta */ connectRequested(params: Protocol.SmartCardEmulation.ConnectRequestedEvent): void; /** * Fired when |SCardDisconnect| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga4be198045c73ec0deb79e66c0ca1738a * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scarddisconnect */ disconnectRequested(params: Protocol.SmartCardEmulation.DisconnectRequestedEvent): void; /** * Fired when |SCardTransmit| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga9a2d77242a271310269065e64633ab99 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardtransmit */ transmitRequested(params: Protocol.SmartCardEmulation.TransmitRequestedEvent): void; /** * Fired when |SCardControl| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gac3454d4657110fd7f753b2d3d8f4e32f * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardcontrol */ controlRequested(params: Protocol.SmartCardEmulation.ControlRequestedEvent): void; /** * Fired when |SCardGetAttrib| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaacfec51917255b7a25b94c5104961602 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardgetattrib */ getAttribRequested(params: Protocol.SmartCardEmulation.GetAttribRequestedEvent): void; /** * Fired when |SCardSetAttrib| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#ga060f0038a4ddfd5dd2b8fadf3c3a2e4f * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardsetattrib */ setAttribRequested(params: Protocol.SmartCardEmulation.SetAttribRequestedEvent): void; /** * Fired when |SCardStatus| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae49c3c894ad7ac12a5b896bde70d0382 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardstatusa */ statusRequested(params: Protocol.SmartCardEmulation.StatusRequestedEvent): void; /** * Fired when |SCardBeginTransaction| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gaddb835dce01a0da1d6ca02d33ee7d861 * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardbegintransaction */ beginTransactionRequested(params: Protocol.SmartCardEmulation.BeginTransactionRequestedEvent): void; /** * Fired when |SCardEndTransaction| is called. * * This maps to: * PC/SC Lite: https://pcsclite.apdu.fr/api/group__API.html#gae8742473b404363e5c587f570d7e2f3b * Microsoft: https://learn.microsoft.com/en-us/windows/win32/api/winscard/nf-winscard-scardendtransaction */ endTransactionRequested(params: Protocol.SmartCardEmulation.EndTransactionRequestedEvent): void; } export interface StorageApi { /** * Returns a storage key given a frame id. * Deprecated. Please use Storage.getStorageKey instead. * @deprecated */ invoke_getStorageKeyForFrame(params: Protocol.Storage.GetStorageKeyForFrameRequest): Promise; /** * Returns storage key for the given frame. If no frame ID is provided, * the storage key of the target executing this command is returned. */ invoke_getStorageKey(params: Protocol.Storage.GetStorageKeyRequest): Promise; /** * Clears storage for origin. */ invoke_clearDataForOrigin(params: Protocol.Storage.ClearDataForOriginRequest): Promise; /** * Clears storage for storage key. */ invoke_clearDataForStorageKey(params: Protocol.Storage.ClearDataForStorageKeyRequest): Promise; /** * Returns all browser cookies. */ invoke_getCookies(params: Protocol.Storage.GetCookiesRequest): Promise; /** * Sets given cookies. */ invoke_setCookies(params: Protocol.Storage.SetCookiesRequest): Promise; /** * Clears cookies. */ invoke_clearCookies(params: Protocol.Storage.ClearCookiesRequest): Promise; /** * Returns usage and quota in bytes. */ invoke_getUsageAndQuota(params: Protocol.Storage.GetUsageAndQuotaRequest): Promise; /** * Override quota for the specified origin */ invoke_overrideQuotaForOrigin(params: Protocol.Storage.OverrideQuotaForOriginRequest): Promise; /** * Registers origin to be notified when an update occurs to its cache storage list. */ invoke_trackCacheStorageForOrigin(params: Protocol.Storage.TrackCacheStorageForOriginRequest): Promise; /** * Registers storage key to be notified when an update occurs to its cache storage list. */ invoke_trackCacheStorageForStorageKey(params: Protocol.Storage.TrackCacheStorageForStorageKeyRequest): Promise; /** * Registers origin to be notified when an update occurs to its IndexedDB. */ invoke_trackIndexedDBForOrigin(params: Protocol.Storage.TrackIndexedDBForOriginRequest): Promise; /** * Registers storage key to be notified when an update occurs to its IndexedDB. */ invoke_trackIndexedDBForStorageKey(params: Protocol.Storage.TrackIndexedDBForStorageKeyRequest): Promise; /** * Unregisters origin from receiving notifications for cache storage. */ invoke_untrackCacheStorageForOrigin(params: Protocol.Storage.UntrackCacheStorageForOriginRequest): Promise; /** * Unregisters storage key from receiving notifications for cache storage. */ invoke_untrackCacheStorageForStorageKey(params: Protocol.Storage.UntrackCacheStorageForStorageKeyRequest): Promise; /** * Unregisters origin from receiving notifications for IndexedDB. */ invoke_untrackIndexedDBForOrigin(params: Protocol.Storage.UntrackIndexedDBForOriginRequest): Promise; /** * Unregisters storage key from receiving notifications for IndexedDB. */ invoke_untrackIndexedDBForStorageKey(params: Protocol.Storage.UntrackIndexedDBForStorageKeyRequest): Promise; /** * Returns the number of stored Trust Tokens per issuer for the * current browsing context. */ invoke_getTrustTokens(): Promise; /** * Removes all Trust Tokens issued by the provided issuerOrigin. * Leaves other stored data, including the issuer's Redemption Records, intact. */ invoke_clearTrustTokens(params: Protocol.Storage.ClearTrustTokensRequest): Promise; /** * Gets details for a named interest group. */ invoke_getInterestGroupDetails(params: Protocol.Storage.GetInterestGroupDetailsRequest): Promise; /** * Enables/Disables issuing of interestGroupAccessed events. */ invoke_setInterestGroupTracking(params: Protocol.Storage.SetInterestGroupTrackingRequest): Promise; /** * Enables/Disables issuing of interestGroupAuctionEventOccurred and * interestGroupAuctionNetworkRequestCreated. */ invoke_setInterestGroupAuctionTracking(params: Protocol.Storage.SetInterestGroupAuctionTrackingRequest): Promise; /** * Gets metadata for an origin's shared storage. */ invoke_getSharedStorageMetadata(params: Protocol.Storage.GetSharedStorageMetadataRequest): Promise; /** * Gets the entries in an given origin's shared storage. */ invoke_getSharedStorageEntries(params: Protocol.Storage.GetSharedStorageEntriesRequest): Promise; /** * Sets entry with `key` and `value` for a given origin's shared storage. */ invoke_setSharedStorageEntry(params: Protocol.Storage.SetSharedStorageEntryRequest): Promise; /** * Deletes entry for `key` (if it exists) for a given origin's shared storage. */ invoke_deleteSharedStorageEntry(params: Protocol.Storage.DeleteSharedStorageEntryRequest): Promise; /** * Clears all entries for a given origin's shared storage. */ invoke_clearSharedStorageEntries(params: Protocol.Storage.ClearSharedStorageEntriesRequest): Promise; /** * Resets the budget for `ownerOrigin` by clearing all budget withdrawals. */ invoke_resetSharedStorageBudget(params: Protocol.Storage.ResetSharedStorageBudgetRequest): Promise; /** * Enables/disables issuing of sharedStorageAccessed events. */ invoke_setSharedStorageTracking(params: Protocol.Storage.SetSharedStorageTrackingRequest): Promise; /** * Set tracking for a storage key's buckets. */ invoke_setStorageBucketTracking(params: Protocol.Storage.SetStorageBucketTrackingRequest): Promise; /** * Deletes the Storage Bucket with the given storage key and bucket name. */ invoke_deleteStorageBucket(params: Protocol.Storage.DeleteStorageBucketRequest): Promise; /** * Deletes state for sites identified as potential bounce trackers, immediately. */ invoke_runBounceTrackingMitigations(): Promise; /** * https://wicg.github.io/attribution-reporting-api/ */ invoke_setAttributionReportingLocalTestingMode(params: Protocol.Storage.SetAttributionReportingLocalTestingModeRequest): Promise; /** * Enables/disables issuing of Attribution Reporting events. */ invoke_setAttributionReportingTracking(params: Protocol.Storage.SetAttributionReportingTrackingRequest): Promise; /** * Sends all pending Attribution Reports immediately, regardless of their * scheduled report time. */ invoke_sendPendingAttributionReports(): Promise; /** * Returns the effective Related Website Sets in use by this profile for the browser * session. The effective Related Website Sets will not change during a browser session. */ invoke_getRelatedWebsiteSets(): Promise; /** * Returns the list of URLs from a page and its embedded resources that match * existing grace period URL pattern rules. * https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period */ invoke_getAffectedUrlsForThirdPartyCookieMetadata(params: Protocol.Storage.GetAffectedUrlsForThirdPartyCookieMetadataRequest): Promise; invoke_setProtectedAudienceKAnonymity(params: Protocol.Storage.SetProtectedAudienceKAnonymityRequest): Promise; } export interface StorageDispatcher { /** * A cache's contents have been modified. */ cacheStorageContentUpdated(params: Protocol.Storage.CacheStorageContentUpdatedEvent): void; /** * A cache has been added/deleted. */ cacheStorageListUpdated(params: Protocol.Storage.CacheStorageListUpdatedEvent): void; /** * The origin's IndexedDB object store has been modified. */ indexedDBContentUpdated(params: Protocol.Storage.IndexedDBContentUpdatedEvent): void; /** * The origin's IndexedDB database list has been modified. */ indexedDBListUpdated(params: Protocol.Storage.IndexedDBListUpdatedEvent): void; /** * One of the interest groups was accessed. Note that these events are global * to all targets sharing an interest group store. */ interestGroupAccessed(params: Protocol.Storage.InterestGroupAccessedEvent): void; /** * An auction involving interest groups is taking place. These events are * target-specific. */ interestGroupAuctionEventOccurred(params: Protocol.Storage.InterestGroupAuctionEventOccurredEvent): void; /** * Specifies which auctions a particular network fetch may be related to, and * in what role. Note that it is not ordered with respect to * Network.requestWillBeSent (but will happen before loadingFinished * loadingFailed). */ interestGroupAuctionNetworkRequestCreated(params: Protocol.Storage.InterestGroupAuctionNetworkRequestCreatedEvent): void; /** * Shared storage was accessed by the associated page. * The following parameters are included in all events. */ sharedStorageAccessed(params: Protocol.Storage.SharedStorageAccessedEvent): void; /** * A shared storage run or selectURL operation finished its execution. * The following parameters are included in all events. */ sharedStorageWorkletOperationExecutionFinished(params: Protocol.Storage.SharedStorageWorkletOperationExecutionFinishedEvent): void; storageBucketCreatedOrUpdated(params: Protocol.Storage.StorageBucketCreatedOrUpdatedEvent): void; storageBucketDeleted(params: Protocol.Storage.StorageBucketDeletedEvent): void; attributionReportingSourceRegistered(params: Protocol.Storage.AttributionReportingSourceRegisteredEvent): void; attributionReportingTriggerRegistered(params: Protocol.Storage.AttributionReportingTriggerRegisteredEvent): void; attributionReportingReportSent(params: Protocol.Storage.AttributionReportingReportSentEvent): void; attributionReportingVerboseDebugReportSent(params: Protocol.Storage.AttributionReportingVerboseDebugReportSentEvent): void; } export interface SystemInfoApi { /** * Returns information about the system. */ invoke_getInfo(): Promise; /** * Returns information about the feature state. */ invoke_getFeatureState(params: Protocol.SystemInfo.GetFeatureStateRequest): Promise; /** * Returns information about all running processes. */ invoke_getProcessInfo(): Promise; } export interface SystemInfoDispatcher { } export interface TargetApi { /** * Activates (focuses) the target. */ invoke_activateTarget(params: Protocol.Target.ActivateTargetRequest): Promise; /** * Attaches to the target with given id. */ invoke_attachToTarget(params: Protocol.Target.AttachToTargetRequest): Promise; /** * Attaches to the browser target, only uses flat sessionId mode. */ invoke_attachToBrowserTarget(): Promise; /** * Closes the target. If the target is a page that gets closed too. */ invoke_closeTarget(params: Protocol.Target.CloseTargetRequest): Promise; /** * Inject object to the target's main frame that provides a communication * channel with browser target. * * Injected object will be available as `window[bindingName]`. * * The object has the following API: * - `binding.send(json)` - a method to send messages over the remote debugging protocol * - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. */ invoke_exposeDevToolsProtocol(params: Protocol.Target.ExposeDevToolsProtocolRequest): Promise; /** * Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than * one. */ invoke_createBrowserContext(params: Protocol.Target.CreateBrowserContextRequest): Promise; /** * Returns all browser contexts created with `Target.createBrowserContext` method. */ invoke_getBrowserContexts(): Promise; /** * Creates a new page. */ invoke_createTarget(params: Protocol.Target.CreateTargetRequest): Promise; /** * Detaches session with given id. */ invoke_detachFromTarget(params: Protocol.Target.DetachFromTargetRequest): Promise; /** * Deletes a BrowserContext. All the belonging pages will be closed without calling their * beforeunload hooks. */ invoke_disposeBrowserContext(params: Protocol.Target.DisposeBrowserContextRequest): Promise; /** * Returns information about a target. */ invoke_getTargetInfo(params: Protocol.Target.GetTargetInfoRequest): Promise; /** * Retrieves a list of available targets. */ invoke_getTargets(params: Protocol.Target.GetTargetsRequest): Promise; /** * Sends protocol message over session with given id. * Consider using flat mode instead; see commands attachToTarget, setAutoAttach, * and crbug.com/991325. * @deprecated */ invoke_sendMessageToTarget(params: Protocol.Target.SendMessageToTargetRequest): Promise; /** * Controls whether to automatically attach to new targets which are considered * to be directly related to this one (for example, iframes or workers). * When turned on, attaches to all existing related targets as well. When turned off, * automatically detaches from all currently attached targets. * This also clears all targets added by `autoAttachRelated` from the list of targets to watch * for creation of related targets. * You might want to call this recursively for auto-attached targets to attach * to all available targets. */ invoke_setAutoAttach(params: Protocol.Target.SetAutoAttachRequest): Promise; /** * Adds the specified target to the list of targets that will be monitored for any related target * creation (such as child frames, child workers and new versions of service worker) and reported * through `attachedToTarget`. The specified target is also auto-attached. * This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent * `setAutoAttach`. Only available at the Browser target. */ invoke_autoAttachRelated(params: Protocol.Target.AutoAttachRelatedRequest): Promise; /** * Controls whether to discover available targets and notify via * `targetCreated/targetInfoChanged/targetDestroyed` events. */ invoke_setDiscoverTargets(params: Protocol.Target.SetDiscoverTargetsRequest): Promise; /** * Enables target discovery for the specified locations, when `setDiscoverTargets` was set to * `true`. */ invoke_setRemoteLocations(params: Protocol.Target.SetRemoteLocationsRequest): Promise; /** * Gets the targetId of the DevTools page target opened for the given target * (if any). */ invoke_getDevToolsTarget(params: Protocol.Target.GetDevToolsTargetRequest): Promise; /** * Opens a DevTools window for the target. */ invoke_openDevTools(params: Protocol.Target.OpenDevToolsRequest): Promise; } export interface TargetDispatcher { /** * Issued when attached to target because of auto-attach or `attachToTarget` command. */ attachedToTarget(params: Protocol.Target.AttachedToTargetEvent): void; /** * Issued when detached from target for any reason (including `detachFromTarget` command). Can be * issued multiple times per target if multiple sessions have been attached to it. */ detachedFromTarget(params: Protocol.Target.DetachedFromTargetEvent): void; /** * Notifies about a new protocol message received from the session (as reported in * `attachedToTarget` event). */ receivedMessageFromTarget(params: Protocol.Target.ReceivedMessageFromTargetEvent): void; /** * Issued when a possible inspection target is created. */ targetCreated(params: Protocol.Target.TargetCreatedEvent): void; /** * Issued when a target is destroyed. */ targetDestroyed(params: Protocol.Target.TargetDestroyedEvent): void; /** * Issued when a target has crashed. */ targetCrashed(params: Protocol.Target.TargetCrashedEvent): void; /** * Issued when some information about a target has changed. This only happens between * `targetCreated` and `targetDestroyed`. */ targetInfoChanged(params: Protocol.Target.TargetInfoChangedEvent): void; } export interface TetheringApi { /** * Request browser port binding. */ invoke_bind(params: Protocol.Tethering.BindRequest): Promise; /** * Request browser port unbinding. */ invoke_unbind(params: Protocol.Tethering.UnbindRequest): Promise; } export interface TetheringDispatcher { /** * Informs that port was successfully bound and got a specified connection id. */ accepted(params: Protocol.Tethering.AcceptedEvent): void; } export interface TracingApi { /** * Stop trace events collection. */ invoke_end(): Promise; /** * Gets supported tracing categories. */ invoke_getCategories(): Promise; /** * Return a descriptor for all available tracing categories. */ invoke_getTrackEventDescriptor(): Promise; /** * Record a clock sync marker in the trace. */ invoke_recordClockSyncMarker(params: Protocol.Tracing.RecordClockSyncMarkerRequest): Promise; /** * Request a global memory dump. */ invoke_requestMemoryDump(params: Protocol.Tracing.RequestMemoryDumpRequest): Promise; /** * Start trace events collection. */ invoke_start(params: Protocol.Tracing.StartRequest): Promise; } export interface TracingDispatcher { bufferUsage(params: Protocol.Tracing.BufferUsageEvent): void; /** * Contains a bucket of collected trace events. When tracing is stopped collected events will be * sent as a sequence of dataCollected events followed by tracingComplete event. */ dataCollected(params: Protocol.Tracing.DataCollectedEvent): void; /** * Signals that tracing is stopped and there is no trace buffers pending flush, all data were * delivered via dataCollected events. */ tracingComplete(params: Protocol.Tracing.TracingCompleteEvent): void; } export interface WebAudioApi { /** * Enables the WebAudio domain and starts sending context lifetime events. */ invoke_enable(): Promise; /** * Disables the WebAudio domain. */ invoke_disable(): Promise; /** * Fetch the realtime data from the registered contexts. */ invoke_getRealtimeData(params: Protocol.WebAudio.GetRealtimeDataRequest): Promise; } export interface WebAudioDispatcher { /** * Notifies that a new BaseAudioContext has been created. */ contextCreated(params: Protocol.WebAudio.ContextCreatedEvent): void; /** * Notifies that an existing BaseAudioContext will be destroyed. */ contextWillBeDestroyed(params: Protocol.WebAudio.ContextWillBeDestroyedEvent): void; /** * Notifies that existing BaseAudioContext has changed some properties (id stays the same).. */ contextChanged(params: Protocol.WebAudio.ContextChangedEvent): void; /** * Notifies that the construction of an AudioListener has finished. */ audioListenerCreated(params: Protocol.WebAudio.AudioListenerCreatedEvent): void; /** * Notifies that a new AudioListener has been created. */ audioListenerWillBeDestroyed(params: Protocol.WebAudio.AudioListenerWillBeDestroyedEvent): void; /** * Notifies that a new AudioNode has been created. */ audioNodeCreated(params: Protocol.WebAudio.AudioNodeCreatedEvent): void; /** * Notifies that an existing AudioNode has been destroyed. */ audioNodeWillBeDestroyed(params: Protocol.WebAudio.AudioNodeWillBeDestroyedEvent): void; /** * Notifies that a new AudioParam has been created. */ audioParamCreated(params: Protocol.WebAudio.AudioParamCreatedEvent): void; /** * Notifies that an existing AudioParam has been destroyed. */ audioParamWillBeDestroyed(params: Protocol.WebAudio.AudioParamWillBeDestroyedEvent): void; /** * Notifies that two AudioNodes are connected. */ nodesConnected(params: Protocol.WebAudio.NodesConnectedEvent): void; /** * Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected. */ nodesDisconnected(params: Protocol.WebAudio.NodesDisconnectedEvent): void; /** * Notifies that an AudioNode is connected to an AudioParam. */ nodeParamConnected(params: Protocol.WebAudio.NodeParamConnectedEvent): void; /** * Notifies that an AudioNode is disconnected to an AudioParam. */ nodeParamDisconnected(params: Protocol.WebAudio.NodeParamDisconnectedEvent): void; } export interface WebAuthnApi { /** * Enable the WebAuthn domain and start intercepting credential storage and * retrieval with a virtual authenticator. */ invoke_enable(params: Protocol.WebAuthn.EnableRequest): Promise; /** * Disable the WebAuthn domain. */ invoke_disable(): Promise; /** * Creates and adds a virtual authenticator. */ invoke_addVirtualAuthenticator(params: Protocol.WebAuthn.AddVirtualAuthenticatorRequest): Promise; /** * Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present. */ invoke_setResponseOverrideBits(params: Protocol.WebAuthn.SetResponseOverrideBitsRequest): Promise; /** * Removes the given authenticator. */ invoke_removeVirtualAuthenticator(params: Protocol.WebAuthn.RemoveVirtualAuthenticatorRequest): Promise; /** * Adds the credential to the specified authenticator. */ invoke_addCredential(params: Protocol.WebAuthn.AddCredentialRequest): Promise; /** * Returns a single credential stored in the given virtual authenticator that * matches the credential ID. */ invoke_getCredential(params: Protocol.WebAuthn.GetCredentialRequest): Promise; /** * Returns all the credentials stored in the given virtual authenticator. */ invoke_getCredentials(params: Protocol.WebAuthn.GetCredentialsRequest): Promise; /** * Removes a credential from the authenticator. */ invoke_removeCredential(params: Protocol.WebAuthn.RemoveCredentialRequest): Promise; /** * Clears all the credentials from the specified device. */ invoke_clearCredentials(params: Protocol.WebAuthn.ClearCredentialsRequest): Promise; /** * Sets whether User Verification succeeds or fails for an authenticator. * The default is true. */ invoke_setUserVerified(params: Protocol.WebAuthn.SetUserVerifiedRequest): Promise; /** * Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. * The default is true. */ invoke_setAutomaticPresenceSimulation(params: Protocol.WebAuthn.SetAutomaticPresenceSimulationRequest): Promise; /** * Allows setting credential properties. * https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties */ invoke_setCredentialProperties(params: Protocol.WebAuthn.SetCredentialPropertiesRequest): Promise; } export interface WebAuthnDispatcher { /** * Triggered when a credential is added to an authenticator. */ credentialAdded(params: Protocol.WebAuthn.CredentialAddedEvent): void; /** * Triggered when a credential is deleted, e.g. through * PublicKeyCredential.signalUnknownCredential(). */ credentialDeleted(params: Protocol.WebAuthn.CredentialDeletedEvent): void; /** * Triggered when a credential is updated, e.g. through * PublicKeyCredential.signalCurrentUserDetails(). */ credentialUpdated(params: Protocol.WebAuthn.CredentialUpdatedEvent): void; /** * Triggered when a credential is used in a webauthn assertion. */ credentialAsserted(params: Protocol.WebAuthn.CredentialAssertedEvent): void; } export interface DebuggerApi { /** * Continues execution until specific location is reached. */ invoke_continueToLocation(params: Protocol.Debugger.ContinueToLocationRequest): Promise; /** * Disables debugger for given page. */ invoke_disable(): Promise; /** * Enables debugger for the given page. Clients should not assume that the debugging has been * enabled until the result for this command is received. */ invoke_enable(params: Protocol.Debugger.EnableRequest): Promise; /** * Evaluates expression on a given call frame. */ invoke_evaluateOnCallFrame(params: Protocol.Debugger.EvaluateOnCallFrameRequest): Promise; /** * Returns possible locations for breakpoint. scriptId in start and end range locations should be * the same. */ invoke_getPossibleBreakpoints(params: Protocol.Debugger.GetPossibleBreakpointsRequest): Promise; /** * Returns source for the script with given id. */ invoke_getScriptSource(params: Protocol.Debugger.GetScriptSourceRequest): Promise; invoke_disassembleWasmModule(params: Protocol.Debugger.DisassembleWasmModuleRequest): Promise; /** * 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. */ invoke_nextWasmDisassemblyChunk(params: Protocol.Debugger.NextWasmDisassemblyChunkRequest): Promise; /** * This command is deprecated. Use getScriptSource instead. * @deprecated */ invoke_getWasmBytecode(params: Protocol.Debugger.GetWasmBytecodeRequest): Promise; /** * Returns stack trace with given `stackTraceId`. */ invoke_getStackTrace(params: Protocol.Debugger.GetStackTraceRequest): Promise; /** * Stops on the next JavaScript statement. */ invoke_pause(): Promise; /** * @deprecated */ invoke_pauseOnAsyncCall(params: Protocol.Debugger.PauseOnAsyncCallRequest): Promise; /** * Removes JavaScript breakpoint. */ invoke_removeBreakpoint(params: Protocol.Debugger.RemoveBreakpointRequest): Promise; /** * 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. */ invoke_restartFrame(params: Protocol.Debugger.RestartFrameRequest): Promise; /** * Resumes JavaScript execution. */ invoke_resume(params: Protocol.Debugger.ResumeRequest): Promise; /** * Searches for given string in script content. */ invoke_searchInContent(params: Protocol.Debugger.SearchInContentRequest): Promise; /** * Enables or disables async call stacks tracking. */ invoke_setAsyncCallStackDepth(params: Protocol.Debugger.SetAsyncCallStackDepthRequest): Promise; /** * 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. */ invoke_setBlackboxExecutionContexts(params: Protocol.Debugger.SetBlackboxExecutionContextsRequest): Promise; /** * 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. */ invoke_setBlackboxPatterns(params: Protocol.Debugger.SetBlackboxPatternsRequest): Promise; /** * 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. */ invoke_setBlackboxedRanges(params: Protocol.Debugger.SetBlackboxedRangesRequest): Promise; /** * Sets JavaScript breakpoint at a given location. */ invoke_setBreakpoint(params: Protocol.Debugger.SetBreakpointRequest): Promise; /** * Sets instrumentation breakpoint. */ invoke_setInstrumentationBreakpoint(params: Protocol.Debugger.SetInstrumentationBreakpointRequest): Promise; /** * 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. */ invoke_setBreakpointByUrl(params: Protocol.Debugger.SetBreakpointByUrlRequest): Promise; /** * 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. */ invoke_setBreakpointOnFunctionCall(params: Protocol.Debugger.SetBreakpointOnFunctionCallRequest): Promise; /** * Activates / deactivates all breakpoints on the page. */ invoke_setBreakpointsActive(params: Protocol.Debugger.SetBreakpointsActiveRequest): Promise; /** * 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`. */ invoke_setPauseOnExceptions(params: Protocol.Debugger.SetPauseOnExceptionsRequest): Promise; /** * Changes return value in top frame. Available only at return break position. */ invoke_setReturnValue(params: Protocol.Debugger.SetReturnValueRequest): Promise; /** * 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. */ invoke_setScriptSource(params: Protocol.Debugger.SetScriptSourceRequest): Promise; /** * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). */ invoke_setSkipAllPauses(params: Protocol.Debugger.SetSkipAllPausesRequest): Promise; /** * Changes value of variable in a callframe. Object-based scopes are not supported and must be * mutated manually. */ invoke_setVariableValue(params: Protocol.Debugger.SetVariableValueRequest): Promise; /** * Steps into the function call. */ invoke_stepInto(params: Protocol.Debugger.StepIntoRequest): Promise; /** * Steps out of the function call. */ invoke_stepOut(): Promise; /** * Steps over the statement. */ invoke_stepOver(params: Protocol.Debugger.StepOverRequest): Promise; } export interface DebuggerDispatcher { /** * Fired when breakpoint is resolved to an actual script and location. * Deprecated in favor of `resolvedBreakpoints` in the `scriptParsed` event. * @deprecated */ breakpointResolved(params: Protocol.Debugger.BreakpointResolvedEvent): void; /** * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. */ paused(params: Protocol.Debugger.PausedEvent): void; /** * Fired when the virtual machine resumed execution. */ resumed(): void; /** * Fired when virtual machine fails to parse the script. */ scriptFailedToParse(params: Protocol.Debugger.ScriptFailedToParseEvent): void; /** * Fired when virtual machine parses script. This event is also fired for all known and uncollected * scripts upon enabling debugger. */ scriptParsed(params: Protocol.Debugger.ScriptParsedEvent): 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). */ invoke_addInspectedHeapObject(params: Protocol.HeapProfiler.AddInspectedHeapObjectRequest): Promise; invoke_collectGarbage(): Promise; invoke_disable(): Promise; invoke_enable(): Promise; invoke_getHeapObjectId(params: Protocol.HeapProfiler.GetHeapObjectIdRequest): Promise; invoke_getObjectByHeapObjectId(params: Protocol.HeapProfiler.GetObjectByHeapObjectIdRequest): Promise; invoke_getSamplingProfile(): Promise; invoke_startSampling(params: Protocol.HeapProfiler.StartSamplingRequest): Promise; invoke_startTrackingHeapObjects(params: Protocol.HeapProfiler.StartTrackingHeapObjectsRequest): Promise; invoke_stopSampling(): Promise; invoke_stopTrackingHeapObjects(params: Protocol.HeapProfiler.StopTrackingHeapObjectsRequest): Promise; invoke_takeHeapSnapshot(params: Protocol.HeapProfiler.TakeHeapSnapshotRequest): Promise; } export interface HeapProfilerDispatcher { addHeapSnapshotChunk(params: Protocol.HeapProfiler.AddHeapSnapshotChunkEvent): void; /** * If heap objects tracking has been started then backend may send update for one or more fragments */ heapStatsUpdate(params: Protocol.HeapProfiler.HeapStatsUpdateEvent): 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. */ lastSeenObjectId(params: Protocol.HeapProfiler.LastSeenObjectIdEvent): void; reportHeapSnapshotProgress(params: Protocol.HeapProfiler.ReportHeapSnapshotProgressEvent): void; resetProfiles(): void; } export interface ProfilerApi { invoke_disable(): Promise; invoke_enable(): Promise; /** * Collect coverage data for the current isolate. The coverage data may be incomplete due to * garbage collection. */ invoke_getBestEffortCoverage(): Promise; /** * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. */ invoke_setSamplingInterval(params: Protocol.Profiler.SetSamplingIntervalRequest): Promise; invoke_start(): Promise; /** * 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. */ invoke_startPreciseCoverage(params: Protocol.Profiler.StartPreciseCoverageRequest): Promise; invoke_stop(): Promise; /** * Disable precise code coverage. Disabling releases unnecessary execution count records and allows * executing optimized code. */ invoke_stopPreciseCoverage(): Promise; /** * Collect coverage data for the current isolate, and resets execution counters. Precise code * coverage needs to have started. */ invoke_takePreciseCoverage(): Promise; } export interface ProfilerDispatcher { consoleProfileFinished(params: Protocol.Profiler.ConsoleProfileFinishedEvent): void; /** * Sent when new profile recording is started using console.profile() call. */ consoleProfileStarted(params: Protocol.Profiler.ConsoleProfileStartedEvent): 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. */ preciseCoverageDeltaUpdate(params: Protocol.Profiler.PreciseCoverageDeltaUpdateEvent): void; } export interface RuntimeApi { /** * Add handler to promise with given promise object id. */ invoke_awaitPromise(params: Protocol.Runtime.AwaitPromiseRequest): Promise; /** * Calls function with given declaration on the given object. Object group of the result is * inherited from the target object. */ invoke_callFunctionOn(params: Protocol.Runtime.CallFunctionOnRequest): Promise; /** * Compiles expression. */ invoke_compileScript(params: Protocol.Runtime.CompileScriptRequest): Promise; /** * Disables reporting of execution contexts creation. */ invoke_disable(): Promise; /** * Discards collected exceptions and console API calls. */ invoke_discardConsoleEntries(): Promise; /** * 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. */ invoke_enable(): Promise; /** * Evaluates expression on global object. */ invoke_evaluate(params: Protocol.Runtime.EvaluateRequest): Promise; /** * Returns the isolate id. */ invoke_getIsolateId(): Promise; /** * Returns the JavaScript heap usage. * It is the total usage of the corresponding isolate not scoped to a particular Runtime. */ invoke_getHeapUsage(): Promise; /** * Returns properties of a given object. Object group of the result is inherited from the target * object. */ invoke_getProperties(params: Protocol.Runtime.GetPropertiesRequest): Promise; /** * Returns all let, const and class variables from global scope. */ invoke_globalLexicalScopeNames(params: Protocol.Runtime.GlobalLexicalScopeNamesRequest): Promise; invoke_queryObjects(params: Protocol.Runtime.QueryObjectsRequest): Promise; /** * Releases remote object with given id. */ invoke_releaseObject(params: Protocol.Runtime.ReleaseObjectRequest): Promise; /** * Releases all remote objects that belong to a given group. */ invoke_releaseObjectGroup(params: Protocol.Runtime.ReleaseObjectGroupRequest): Promise; /** * Tells inspected instance to run if it was waiting for debugger to attach. */ invoke_runIfWaitingForDebugger(): Promise; /** * Runs script with given id in a given context. */ invoke_runScript(params: Protocol.Runtime.RunScriptRequest): Promise; /** * Enables or disables async call stacks tracking. */ invoke_setAsyncCallStackDepth(params: Protocol.Runtime.SetAsyncCallStackDepthRequest): Promise; invoke_setCustomObjectFormatterEnabled(params: Protocol.Runtime.SetCustomObjectFormatterEnabledRequest): Promise; invoke_setMaxCallStackSizeToCapture(params: Protocol.Runtime.SetMaxCallStackSizeToCaptureRequest): Promise; /** * Terminate current or next JavaScript execution. * Will cancel the termination when the outer-most script execution ends. */ invoke_terminateExecution(): Promise; /** * 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. */ invoke_addBinding(params: Protocol.Runtime.AddBindingRequest): Promise; /** * This method does not remove binding function from global object but * unsubscribes current runtime agent from Runtime.bindingCalled notifications. */ invoke_removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise; /** * 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. */ invoke_getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest): Promise; } export interface RuntimeDispatcher { /** * Notification is issued every time when binding is called. */ bindingCalled(params: Protocol.Runtime.BindingCalledEvent): void; /** * Issued when console API was called. */ consoleAPICalled(params: Protocol.Runtime.ConsoleAPICalledEvent): void; /** * Issued when unhandled exception was revoked. */ exceptionRevoked(params: Protocol.Runtime.ExceptionRevokedEvent): void; /** * Issued when exception was thrown and unhandled. */ exceptionThrown(params: Protocol.Runtime.ExceptionThrownEvent): void; /** * Issued when new execution context is created. */ executionContextCreated(params: Protocol.Runtime.ExecutionContextCreatedEvent): void; /** * Issued when execution context is destroyed. */ executionContextDestroyed(params: Protocol.Runtime.ExecutionContextDestroyedEvent): void; /** * Issued when all executionContexts were cleared in browser */ executionContextsCleared(): void; /** * Issued when object should be inspected (for example, as a result of inspect() command line API * call). */ inspectRequested(params: Protocol.Runtime.InspectRequestedEvent): void; } export interface SchemaApi { /** * Returns supported domains. */ invoke_getDomains(): Promise; } export interface SchemaDispatcher { } } export = ProtocolProxyApi;