UNPKG

chrome-devtools-frontend

Version:
1,417 lines (1,085 loc) • 190 kB
// Copyright (c) 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * 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; Extensions: ExtensionsApi; Autofill: AutofillApi; BackgroundService: BackgroundServiceApi; Browser: BrowserApi; CSS: CSSApi; CacheStorage: CacheStorageApi; Cast: CastApi; DOM: DOMApi; DOMDebugger: DOMDebuggerApi; EventBreakpoints: EventBreakpointsApi; DOMSnapshot: DOMSnapshotApi; DOMStorage: DOMStorageApi; DeviceOrientation: DeviceOrientationApi; Emulation: EmulationApi; HeadlessExperimental: HeadlessExperimentalApi; IO: IOApi; FileSystem: FileSystemApi; IndexedDB: IndexedDBApi; Input: InputApi; Inspector: InspectorApi; LayerTree: LayerTreeApi; Log: LogApi; Memory: MemoryApi; Network: NetworkApi; Overlay: OverlayApi; Page: PageApi; Performance: PerformanceApi; PerformanceTimeline: PerformanceTimelineApi; Security: SecurityApi; ServiceWorker: ServiceWorkerApi; Storage: StorageApi; SystemInfo: SystemInfoApi; Target: TargetApi; Tethering: TetheringApi; Tracing: TracingApi; Fetch: FetchApi; WebAudio: WebAudioApi; WebAuthn: WebAuthnApi; Media: MediaApi; DeviceAccess: DeviceAccessApi; Preload: PreloadApi; FedCm: FedCmApi; PWA: PWAApi; BluetoothEmulation: BluetoothEmulationApi; Debugger: DebuggerApi; HeapProfiler: HeapProfilerApi; Profiler: ProfilerApi; Runtime: RuntimeApi; Schema: SchemaApi; } export interface ProtocolDispatchers { Accessibility: AccessibilityDispatcher; Animation: AnimationDispatcher; Audits: AuditsDispatcher; Extensions: ExtensionsDispatcher; Autofill: AutofillDispatcher; BackgroundService: BackgroundServiceDispatcher; Browser: BrowserDispatcher; CSS: CSSDispatcher; CacheStorage: CacheStorageDispatcher; Cast: CastDispatcher; DOM: DOMDispatcher; DOMDebugger: DOMDebuggerDispatcher; EventBreakpoints: EventBreakpointsDispatcher; DOMSnapshot: DOMSnapshotDispatcher; DOMStorage: DOMStorageDispatcher; DeviceOrientation: DeviceOrientationDispatcher; Emulation: EmulationDispatcher; HeadlessExperimental: HeadlessExperimentalDispatcher; IO: IODispatcher; FileSystem: FileSystemDispatcher; IndexedDB: IndexedDBDispatcher; Input: InputDispatcher; Inspector: InspectorDispatcher; LayerTree: LayerTreeDispatcher; Log: LogDispatcher; Memory: MemoryDispatcher; Network: NetworkDispatcher; Overlay: OverlayDispatcher; Page: PageDispatcher; Performance: PerformanceDispatcher; PerformanceTimeline: PerformanceTimelineDispatcher; Security: SecurityDispatcher; ServiceWorker: ServiceWorkerDispatcher; Storage: StorageDispatcher; SystemInfo: SystemInfoDispatcher; Target: TargetDispatcher; Tethering: TetheringDispatcher; Tracing: TracingDispatcher; Fetch: FetchDispatcher; WebAudio: WebAudioDispatcher; WebAuthn: WebAuthnDispatcher; Media: MediaDispatcher; DeviceAccess: DeviceAccessDispatcher; Preload: PreloadDispatcher; FedCm: FedCmDispatcher; PWA: PWADispatcher; BluetoothEmulation: BluetoothEmulationDispatcher; Debugger: DebuggerDispatcher; HeapProfiler: HeapProfilerDispatcher; Profiler: ProfilerDispatcher; Runtime: RuntimeDispatcher; Schema: SchemaDispatcher; } export interface AccessibilityApi { /** * Disables the accessibility domain. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. */ invoke_getPartialAXTree(params: Protocol.Accessibility.GetPartialAXTreeRequest): Promise<Protocol.Accessibility.GetPartialAXTreeResponse>; /** * Fetches the entire accessibility tree for the root Document */ invoke_getFullAXTree(params: Protocol.Accessibility.GetFullAXTreeRequest): Promise<Protocol.Accessibility.GetFullAXTreeResponse>; /** * Fetches the root node. * Requires `enable()` to have been called previously. */ invoke_getRootAXNode(params: Protocol.Accessibility.GetRootAXNodeRequest): Promise<Protocol.Accessibility.GetRootAXNodeResponse>; /** * Fetches a node and all ancestors up to and including the root. * Requires `enable()` to have been called previously. */ invoke_getAXNodeAndAncestors(params: Protocol.Accessibility.GetAXNodeAndAncestorsRequest): Promise<Protocol.Accessibility.GetAXNodeAndAncestorsResponse>; /** * Fetches a particular accessibility node by AXNodeId. * Requires `enable()` to have been called previously. */ invoke_getChildAXNodes(params: Protocol.Accessibility.GetChildAXNodesRequest): Promise<Protocol.Accessibility.GetChildAXNodesResponse>; /** * Query a DOM node's accessibility subtree for accessible name and role. * This command computes the name and role for all nodes in the subtree, including those that are * ignored for accessibility, and returns those that match the specified name and role. If no DOM * node is specified, or the DOM node does not exist, the command returns an error. If neither * `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. */ invoke_queryAXTree(params: Protocol.Accessibility.QueryAXTreeRequest): Promise<Protocol.Accessibility.QueryAXTreeResponse>; } 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<Protocol.ProtocolResponseWithError>; /** * Enables animation domain notifications. */ invoke_enable(): Promise<Protocol.ProtocolResponseWithError>; /** * Returns the current time of the an animation. */ invoke_getCurrentTime(params: Protocol.Animation.GetCurrentTimeRequest): Promise<Protocol.Animation.GetCurrentTimeResponse>; /** * Gets the playback rate of the document timeline. */ invoke_getPlaybackRate(): Promise<Protocol.Animation.GetPlaybackRateResponse>; /** * Releases a set of animations to no longer be manipulated. */ invoke_releaseAnimations(params: Protocol.Animation.ReleaseAnimationsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Gets the remote object of the Animation. */ invoke_resolveAnimation(params: Protocol.Animation.ResolveAnimationRequest): Promise<Protocol.Animation.ResolveAnimationResponse>; /** * Seek a set of animations to a particular time within each animation. */ invoke_seekAnimations(params: Protocol.Animation.SeekAnimationsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets the paused state of a set of animations. */ invoke_setPaused(params: Protocol.Animation.SetPausedRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets the playback rate of the document timeline. */ invoke_setPlaybackRate(params: Protocol.Animation.SetPlaybackRateRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets the timing of an animation node. */ invoke_setTiming(params: Protocol.Animation.SetTimingRequest): Promise<Protocol.ProtocolResponseWithError>; } 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<Protocol.Audits.GetEncodedResponseResponse>; /** * Disables issues domain, prevents further issues from being reported to the client. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * Enables issues domain, sends the issues collected so far to the client by means of the * `issueAdded` event. */ invoke_enable(): Promise<Protocol.ProtocolResponseWithError>; /** * Runs the contrast check for the target page. Found issues are reported * using Audits.issueAdded event. */ invoke_checkContrast(params: Protocol.Audits.CheckContrastRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Runs the form issues check for the target page. Found issues are reported * using Audits.issueAdded event. */ invoke_checkFormsIssues(): Promise<Protocol.Audits.CheckFormsIssuesResponse>; } export interface AuditsDispatcher { issueAdded(params: Protocol.Audits.IssueAddedEvent): void; } export interface ExtensionsApi { /** * 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<Protocol.Extensions.LoadUnpackedResponse>; /** * 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<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.Extensions.GetStorageItemsResponse>; /** * Removes `keys` from extension storage in the given `storageArea`. */ invoke_removeStorageItems(params: Protocol.Extensions.RemoveStorageItemsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Clears extension storage in the given `storageArea`. */ invoke_clearStorageItems(params: Protocol.Extensions.ClearStorageItemsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; } export interface ExtensionsDispatcher { } 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<Protocol.ProtocolResponseWithError>; /** * Set addresses so that developers can verify their forms implementation. */ invoke_setAddresses(params: Protocol.Autofill.SetAddressesRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Disables autofill domain notifications. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * Enables autofill domain notifications. */ invoke_enable(): Promise<Protocol.ProtocolResponseWithError>; } 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<Protocol.ProtocolResponseWithError>; /** * Disables event updates for the service. */ invoke_stopObserving(params: Protocol.BackgroundService.StopObservingRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Set the recording state for the service. */ invoke_setRecording(params: Protocol.BackgroundService.SetRecordingRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Clears all stored data for the service. */ invoke_clearEvents(params: Protocol.BackgroundService.ClearEventsRequest): Promise<Protocol.ProtocolResponseWithError>; } 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 BrowserApi { /** * Set permission settings for given origin. */ invoke_setPermission(params: Protocol.Browser.SetPermissionRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Grant specific permissions to the given origin and reject all others. */ invoke_grantPermissions(params: Protocol.Browser.GrantPermissionsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Reset all permission management for all origins. */ invoke_resetPermissions(params: Protocol.Browser.ResetPermissionsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Set the behavior when downloading a file. */ invoke_setDownloadBehavior(params: Protocol.Browser.SetDownloadBehaviorRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Cancel a download if in progress */ invoke_cancelDownload(params: Protocol.Browser.CancelDownloadRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Close browser gracefully. */ invoke_close(): Promise<Protocol.ProtocolResponseWithError>; /** * Crashes browser on the main thread. */ invoke_crash(): Promise<Protocol.ProtocolResponseWithError>; /** * Crashes GPU process. */ invoke_crashGpuProcess(): Promise<Protocol.ProtocolResponseWithError>; /** * Returns version information. */ invoke_getVersion(): Promise<Protocol.Browser.GetVersionResponse>; /** * Returns the command line switches for the browser process if, and only if * --enable-automation is on the commandline. */ invoke_getBrowserCommandLine(): Promise<Protocol.Browser.GetBrowserCommandLineResponse>; /** * Get Chrome histograms. */ invoke_getHistograms(params: Protocol.Browser.GetHistogramsRequest): Promise<Protocol.Browser.GetHistogramsResponse>; /** * Get a Chrome histogram by name. */ invoke_getHistogram(params: Protocol.Browser.GetHistogramRequest): Promise<Protocol.Browser.GetHistogramResponse>; /** * Get position and size of the browser window. */ invoke_getWindowBounds(params: Protocol.Browser.GetWindowBoundsRequest): Promise<Protocol.Browser.GetWindowBoundsResponse>; /** * Get the browser window that contains the devtools target. */ invoke_getWindowForTarget(params: Protocol.Browser.GetWindowForTargetRequest): Promise<Protocol.Browser.GetWindowForTargetResponse>; /** * Set position and/or size of the browser window. */ invoke_setWindowBounds(params: Protocol.Browser.SetWindowBoundsRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Set dock tile details, platform-specific. */ invoke_setDockTile(params: Protocol.Browser.SetDockTileRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Invoke custom browser commands used by telemetry. */ invoke_executeBrowserCommand(params: Protocol.Browser.ExecuteBrowserCommandRequest): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; } 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<Protocol.CSS.AddRuleResponse>; /** * Returns all class names from specified stylesheet. */ invoke_collectClassNames(params: Protocol.CSS.CollectClassNamesRequest): Promise<Protocol.CSS.CollectClassNamesResponse>; /** * Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. */ invoke_createStyleSheet(params: Protocol.CSS.CreateStyleSheetRequest): Promise<Protocol.CSS.CreateStyleSheetResponse>; /** * Disables the CSS agent for the given page. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Ensures that the given node is in its starting-style state. */ invoke_forceStartingStyle(params: Protocol.CSS.ForceStartingStyleRequest): Promise<Protocol.ProtocolResponseWithError>; invoke_getBackgroundColors(params: Protocol.CSS.GetBackgroundColorsRequest): Promise<Protocol.CSS.GetBackgroundColorsResponse>; /** * Returns the computed style for a DOM node identified by `nodeId`. */ invoke_getComputedStyleForNode(params: Protocol.CSS.GetComputedStyleForNodeRequest): Promise<Protocol.CSS.GetComputedStyleForNodeResponse>; /** * Resolve the specified values in the context of the provided element. * For example, a value of '1em' is evaluated according to the computed * 'font-size' of the element and a value 'calc(1px + 2px)' will be * resolved to '3px'. * If the `propertyName` was specified the `values` are resolved as if * they were property's declaration. If a value cannot be parsed according * to the provided property syntax, the value is parsed using combined * syntax as if null `propertyName` was provided. If the value cannot be * resolved even then, return the provided value without any changes. */ invoke_resolveValues(params: Protocol.CSS.ResolveValuesRequest): Promise<Protocol.CSS.ResolveValuesResponse>; invoke_getLonghandProperties(params: Protocol.CSS.GetLonghandPropertiesRequest): Promise<Protocol.CSS.GetLonghandPropertiesResponse>; /** * Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM * attributes) for a DOM node identified by `nodeId`. */ invoke_getInlineStylesForNode(params: Protocol.CSS.GetInlineStylesForNodeRequest): Promise<Protocol.CSS.GetInlineStylesForNodeResponse>; /** * Returns the styles coming from animations & transitions * including the animation & transition styles coming from inheritance chain. */ invoke_getAnimatedStylesForNode(params: Protocol.CSS.GetAnimatedStylesForNodeRequest): Promise<Protocol.CSS.GetAnimatedStylesForNodeResponse>; /** * Returns requested styles for a DOM node identified by `nodeId`. */ invoke_getMatchedStylesForNode(params: Protocol.CSS.GetMatchedStylesForNodeRequest): Promise<Protocol.CSS.GetMatchedStylesForNodeResponse>; /** * Returns all media queries parsed by the rendering engine. */ invoke_getMediaQueries(): Promise<Protocol.CSS.GetMediaQueriesResponse>; /** * Requests information about platform fonts which we used to render child TextNodes in the given * node. */ invoke_getPlatformFontsForNode(params: Protocol.CSS.GetPlatformFontsForNodeRequest): Promise<Protocol.CSS.GetPlatformFontsForNodeResponse>; /** * Returns the current textual content for a stylesheet. */ invoke_getStyleSheetText(params: Protocol.CSS.GetStyleSheetTextRequest): Promise<Protocol.CSS.GetStyleSheetTextResponse>; /** * Returns all layers parsed by the rendering engine for the tree scope of a node. * Given a DOM element identified by nodeId, getLayersForNode returns the root * layer for the nearest ancestor document or shadow root. The layer root contains * the full layer tree for the tree scope and their ordering. */ invoke_getLayersForNode(params: Protocol.CSS.GetLayersForNodeRequest): Promise<Protocol.CSS.GetLayersForNodeResponse>; /** * Given a CSS selector text and a style sheet ID, getLocationForSelector * returns an array of locations of the CSS selector in the style sheet. */ invoke_getLocationForSelector(params: Protocol.CSS.GetLocationForSelectorRequest): Promise<Protocol.CSS.GetLocationForSelectorResponse>; /** * 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<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Polls the next batch of computed style updates. */ invoke_takeComputedStyleUpdates(): Promise<Protocol.CSS.TakeComputedStyleUpdatesResponse>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Modifies the property rule property name. */ invoke_setPropertyRulePropertyName(params: Protocol.CSS.SetPropertyRulePropertyNameRequest): Promise<Protocol.CSS.SetPropertyRulePropertyNameResponse>; /** * Modifies the keyframe rule key text. */ invoke_setKeyframeKey(params: Protocol.CSS.SetKeyframeKeyRequest): Promise<Protocol.CSS.SetKeyframeKeyResponse>; /** * Modifies the rule selector. */ invoke_setMediaText(params: Protocol.CSS.SetMediaTextRequest): Promise<Protocol.CSS.SetMediaTextResponse>; /** * Modifies the expression of a container query. */ invoke_setContainerQueryText(params: Protocol.CSS.SetContainerQueryTextRequest): Promise<Protocol.CSS.SetContainerQueryTextResponse>; /** * Modifies the expression of a supports at-rule. */ invoke_setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise<Protocol.CSS.SetSupportsTextResponse>; /** * Modifies the expression of a scope at-rule. */ invoke_setScopeText(params: Protocol.CSS.SetScopeTextRequest): Promise<Protocol.CSS.SetScopeTextResponse>; /** * Modifies the rule selector. */ invoke_setRuleSelector(params: Protocol.CSS.SetRuleSelectorRequest): Promise<Protocol.CSS.SetRuleSelectorResponse>; /** * Sets the new stylesheet text. */ invoke_setStyleSheetText(params: Protocol.CSS.SetStyleSheetTextRequest): Promise<Protocol.CSS.SetStyleSheetTextResponse>; /** * Applies specified style edits one after another in the given order. */ invoke_setStyleTexts(params: Protocol.CSS.SetStyleTextsRequest): Promise<Protocol.CSS.SetStyleTextsResponse>; /** * Enables the selector recording. */ invoke_startRuleUsageTracking(): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.CSS.StopRuleUsageTrackingResponse>; /** * Obtain list of rules that became used since last call to this method (or since start of coverage * instrumentation). */ invoke_takeCoverageDelta(): Promise<Protocol.CSS.TakeCoverageDeltaResponse>; /** * Enables/disables rendering of local CSS fonts (enabled by default). */ invoke_setLocalFontsEnabled(params: Protocol.CSS.SetLocalFontsEnabledRequest): Promise<Protocol.ProtocolResponseWithError>; } 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<Protocol.ProtocolResponseWithError>; /** * Deletes a cache entry. */ invoke_deleteEntry(params: Protocol.CacheStorage.DeleteEntryRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Requests cache names. */ invoke_requestCacheNames(params: Protocol.CacheStorage.RequestCacheNamesRequest): Promise<Protocol.CacheStorage.RequestCacheNamesResponse>; /** * Fetches cache entry. */ invoke_requestCachedResponse(params: Protocol.CacheStorage.RequestCachedResponseRequest): Promise<Protocol.CacheStorage.RequestCachedResponseResponse>; /** * Requests data from cache. */ invoke_requestEntries(params: Protocol.CacheStorage.RequestEntriesRequest): Promise<Protocol.CacheStorage.RequestEntriesResponse>; } 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<Protocol.ProtocolResponseWithError>; /** * Stops observing for sinks and issues. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Starts mirroring the desktop to the sink. */ invoke_startDesktopMirroring(params: Protocol.Cast.StartDesktopMirroringRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Starts mirroring the tab to the sink. */ invoke_startTabMirroring(params: Protocol.Cast.StartTabMirroringRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Stops the active Cast session on the sink. */ invoke_stopCasting(params: Protocol.Cast.StopCastingRequest): Promise<Protocol.ProtocolResponseWithError>; } 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<Protocol.DOM.CollectClassNamesFromSubtreeResponse>; /** * 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<Protocol.DOM.CopyToResponse>; /** * 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<Protocol.DOM.DescribeNodeResponse>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Disables DOM agent for the given page. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Enables DOM agent for the given page. */ invoke_enable(params: Protocol.DOM.EnableRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Focuses the given element. */ invoke_focus(params: Protocol.DOM.FocusRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Returns attributes for the specified node. */ invoke_getAttributes(params: Protocol.DOM.GetAttributesRequest): Promise<Protocol.DOM.GetAttributesResponse>; /** * Returns boxes for the given node. */ invoke_getBoxModel(params: Protocol.DOM.GetBoxModelRequest): Promise<Protocol.DOM.GetBoxModelResponse>; /** * 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<Protocol.DOM.GetContentQuadsResponse>; /** * 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<Protocol.DOM.GetDocumentResponse>; /** * 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. */ invoke_getFlattenedDocument(params: Protocol.DOM.GetFlattenedDocumentRequest): Promise<Protocol.DOM.GetFlattenedDocumentResponse>; /** * Finds nodes with a given computed style in a subtree. */ invoke_getNodesForSubtreeByStyle(params: Protocol.DOM.GetNodesForSubtreeByStyleRequest): Promise<Protocol.DOM.GetNodesForSubtreeByStyleResponse>; /** * 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<Protocol.DOM.GetNodeForLocationResponse>; /** * Returns node's HTML markup. */ invoke_getOuterHTML(params: Protocol.DOM.GetOuterHTMLRequest): Promise<Protocol.DOM.GetOuterHTMLResponse>; /** * Returns the id of the nearest ancestor that is a relayout boundary. */ invoke_getRelayoutBoundary(params: Protocol.DOM.GetRelayoutBoundaryRequest): Promise<Protocol.DOM.GetRelayoutBoundaryResponse>; /** * Returns search results from given `fromIndex` to given `toIndex` from the search with the given * identifier. */ invoke_getSearchResults(params: Protocol.DOM.GetSearchResultsRequest): Promise<Protocol.DOM.GetSearchResultsResponse>; /** * Hides any highlight. */ invoke_hideHighlight(): Promise<Protocol.ProtocolResponseWithError>; /** * Highlights DOM node. */ invoke_highlightNode(): Promise<Protocol.ProtocolResponseWithError>; /** * Highlights given rectangle. */ invoke_highlightRect(): Promise<Protocol.ProtocolResponseWithError>; /** * Marks last undoable state. */ invoke_markUndoableState(): Promise<Protocol.ProtocolResponseWithError>; /** * Moves node into the new container, places it before the given anchor. */ invoke_moveTo(params: Protocol.DOM.MoveToRequest): Promise<Protocol.DOM.MoveToResponse>; /** * 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<Protocol.DOM.PerformSearchResponse>; /** * Requests that the node is sent to the caller given its path. // FIXME, use XPath */ invoke_pushNodeByPathToFrontend(params: Protocol.DOM.PushNodeByPathToFrontendRequest): Promise<Protocol.DOM.PushNodeByPathToFrontendResponse>; /** * Requests that a batch of nodes is sent to the caller given their backend node ids. */ invoke_pushNodesByBackendIdsToFrontend(params: Protocol.DOM.PushNodesByBackendIdsToFrontendRequest): Promise<Protocol.DOM.PushNodesByBackendIdsToFrontendResponse>; /** * Executes `querySelector` on a given node. */ invoke_querySelector(params: Protocol.DOM.QuerySelectorRequest): Promise<Protocol.DOM.QuerySelectorResponse>; /** * Executes `querySelectorAll` on a given node. */ invoke_querySelectorAll(params: Protocol.DOM.QuerySelectorAllRequest): Promise<Protocol.DOM.QuerySelectorAllResponse>; /** * 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<Protocol.DOM.GetTopLayerElementsResponse>; /** * Returns the NodeId of the matched element according to certain relations. */ invoke_getElementByRelation(params: Protocol.DOM.GetElementByRelationRequest): Promise<Protocol.DOM.GetElementByRelationResponse>; /** * Re-does the last undone action. */ invoke_redo(): Promise<Protocol.ProtocolResponseWithError>; /** * Removes attribute with given name from an element with given id. */ invoke_removeAttribute(params: Protocol.DOM.RemoveAttributeRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes node with given id. */ invoke_removeNode(params: Protocol.DOM.RemoveNodeRequest): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.DOM.RequestNodeResponse>; /** * Resolves the JavaScript node object for a given NodeId or BackendNodeId. */ invoke_resolveNode(params: Protocol.DOM.ResolveNodeRequest): Promise<Protocol.DOM.ResolveNodeResponse>; /** * Sets attribute for an element with given id. */ invoke_setAttributeValue(params: Protocol.DOM.SetAttributeValueRequest): Promise<Protocol.ProtocolResponseWithError>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Sets files for the given file input element. */ invoke_setFileInputFiles(params: Protocol.DOM.SetFileInputFilesRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. */ invoke_setNodeStackTracesEnabled(params: Protocol.DOM.SetNodeStackTracesEnabledRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. */ invoke_getNodeStackTraces(params: Protocol.DOM.GetNodeStackTracesRequest): Promise<Protocol.DOM.GetNodeStackTracesResponse>; /** * Returns file information for the given * File wrapper. */ invoke_getFileInfo(params: Protocol.DOM.GetFileInfoRequest): Promise<Protocol.DOM.GetFileInfoResponse>; /** * Returns list of detached nodes */ invoke_getDetachedDomNodes(): Promise<Protocol.DOM.GetDetachedDomNodesResponse>; /** * 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<Protocol.ProtocolResponseWithError>; /** * Sets node name for a node with given id. */ invoke_setNodeName(params: Protocol.DOM.SetNodeNameRequest): Promise<Protocol.DOM.SetNodeNameResponse>; /** * Sets node value for a node with given id. */ invoke_setNodeValue(params: Protocol.DOM.SetNodeValueRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets node HTML markup, returns new node id. */ invoke_setOuterHTML(params: Protocol.DOM.SetOuterHTMLRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Undoes the last performed action. */ invoke_undo(): Promise<Protocol.ProtocolResponseWithError>; /** * Returns iframe node that owns iframe with the given domain. */ invoke_getFrameOwner(params: Protocol.DOM.GetFrameOwnerRequest): Promise<Protocol.DOM.GetFrameOwnerResponse>; /** * Returns the query container of the given node based on container query * conditions: containerName, physical and logical axes, and whether it queries * scroll-state. 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<Protocol.DOM.GetContainerForNodeResponse>; /** * Returns the descendants of a container query container that have * container queries against this container. */ invoke_getQueryingDescendantsForContainer(params: Protocol.DOM.GetQueryingDescendantsForContainerRequest): Promise<Protocol.DOM.GetQueryingDescendantsForContainerResponse>; /** * 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<Protocol.DOM.GetAnchorElementResponse>; } export interface DOMDispatcher { /** * Fired when `Element`'s attribute is modified. */ attributeModified(params: Protocol.DOM.AttributeModifiedEvent): 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; /** * 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<Protocol.DOMDebugger.GetEventListenersResponse>; /** * Removes DOM breakpoint that was set using `setDOMBreakpoint`. */ invoke_removeDOMBreakpoint(params: Protocol.DOMDebugger.RemoveDOMBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes breakpoint on particular DOM event. */ invoke_removeEventListenerBreakpoint(params: Protocol.DOMDebugger.RemoveEventListenerBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes breakpoint on particular native event. */ invoke_removeInstrumentationBreakpoint(params: Protocol.DOMDebugger.RemoveInstrumentationBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes breakpoint from XMLHttpRequest. */ invoke_removeXHRBreakpoint(params: Protocol.DOMDebugger.RemoveXHRBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets breakpoint on particular CSP violations. */ invoke_setBreakOnCSPViolation(params: Protocol.DOMDebugger.SetBreakOnCSPViolationRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets breakpoint on particular operation with DOM. */ invoke_setDOMBreakpoint(params: Protocol.DOMDebugger.SetDOMBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets breakpoint on particular DOM event. */ invoke_setEventListenerBreakpoint(params: Protocol.DOMDebugger.SetEventListenerBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets breakpoint on particular native event. */ invoke_setInstrumentationBreakpoint(params: Protocol.DOMDebugger.SetInstrumentationBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Sets breakpoint on XMLHttpRequest. */ invoke_setXHRBreakpoint(params: Protocol.DOMDebugger.SetXHRBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; } export interface DOMDebuggerDispatcher { } export interface EventBreakpointsApi { /** * Sets breakpoint on particular native event. */ invoke_setInstrumentationBreakpoint(params: Protocol.EventBreakpoints.SetInstrumentationBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes breakpoint on particular native event. */ invoke_removeInstrumentationBreakpoint(params: Protocol.EventBreakpoints.RemoveInstrumentationBreakpointRequest): Promise<Protocol.ProtocolResponseWithError>; /** * Removes all breakpoints */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; } export interface EventBreakpointsDispatcher { } export interface DOMSnapshotApi { /** * Disables DOM snapshot agent for the given page. */ invoke_disable(): Promise<Protocol.ProtocolResponseWithError>; /** * Enables DOM snapshot agent for the given page. */ invoke_enable(): Promise<Protocol.ProtocolResponseWithError>; /** * Returns a document snapshot, including the full DOM tree of the root node (including iframes, * templat