chrome-devtools-frontend
Version:
Chrome DevTools UI
1,413 lines (1,149 loc) • 138 kB
TypeScript
// 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.
*/
/**
* API generated from Protocol commands and events.
*/
declare namespace ProtocolProxyApi {
export interface ProtocolApi {
Accessibility: AccessibilityApi;
Animation: AnimationApi;
ApplicationCache: ApplicationCacheApi;
Audits: AuditsApi;
BackgroundService: BackgroundServiceApi;
Browser: BrowserApi;
CSS: CSSApi;
CacheStorage: CacheStorageApi;
Cast: CastApi;
DOM: DOMApi;
DOMDebugger: DOMDebuggerApi;
DOMSnapshot: DOMSnapshotApi;
DOMStorage: DOMStorageApi;
Database: DatabaseApi;
DeviceOrientation: DeviceOrientationApi;
Emulation: EmulationApi;
HeadlessExperimental: HeadlessExperimentalApi;
IO: IOApi;
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;
Debugger: DebuggerApi;
HeapProfiler: HeapProfilerApi;
Profiler: ProfilerApi;
Runtime: RuntimeApi;
Schema: SchemaApi;
}
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 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 mactch 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 {}
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;
}
export interface ApplicationCacheApi {
/**
* Enables application cache domain notifications.
*/
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Returns relevant application cache data for the document in given frame.
*/
invoke_getApplicationCacheForFrame(params: Protocol.ApplicationCache.GetApplicationCacheForFrameRequest):
Promise<Protocol.ApplicationCache.GetApplicationCacheForFrameResponse>;
/**
* Returns array of frame identifiers with manifest urls for each frame containing a document
* associated with some application cache.
*/
invoke_getFramesWithManifests(): Promise<Protocol.ApplicationCache.GetFramesWithManifestsResponse>;
/**
* Returns manifest URL for document in the given frame.
*/
invoke_getManifestForFrame(params: Protocol.ApplicationCache.GetManifestForFrameRequest):
Promise<Protocol.ApplicationCache.GetManifestForFrameResponse>;
}
export interface ApplicationCacheDispatcher {
applicationCacheStatusUpdated(params: Protocol.ApplicationCache.ApplicationCacheStatusUpdatedEvent): void;
networkStateUpdated(params: Protocol.ApplicationCache.NetworkStateUpdatedEvent): 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(): Promise<Protocol.ProtocolResponseWithError>;
}
export interface AuditsDispatcher {
issueAdded(params: Protocol.Audits.IssueAddedEvent): 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>;
/**
* 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>;
}
export interface BrowserDispatcher {}
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>;
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>;
/**
* 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 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>;
/**
* 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 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 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;
}
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 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(): 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.
*/
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>;
/**
* 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>;
/**
* 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>;
}
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 distrubution 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 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 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,
* 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_getSnapshot(params: Protocol.DOMSnapshot.GetSnapshotRequest):
Promise<Protocol.DOMSnapshot.GetSnapshotResponse>;
/**
* 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<Protocol.DOMSnapshot.CaptureSnapshotResponse>;
}
export interface DOMSnapshotDispatcher {}
export interface DOMStorageApi {
invoke_clear(params: Protocol.DOMStorage.ClearRequest): Promise<Protocol.ProtocolResponseWithError>;
/**
* Disables storage tracking, prevents storage events from being sent to the client.
*/
invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables storage tracking, storage events will now be delivered to the client.
*/
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
invoke_getDOMStorageItems(params: Protocol.DOMStorage.GetDOMStorageItemsRequest):
Promise<Protocol.DOMStorage.GetDOMStorageItemsResponse>;
invoke_removeDOMStorageItem(params: Protocol.DOMStorage.RemoveDOMStorageItemRequest):
Promise<Protocol.ProtocolResponseWithError>;
invoke_setDOMStorageItem(params: Protocol.DOMStorage.SetDOMStorageItemRequest):
Promise<Protocol.ProtocolResponseWithError>;
}
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 DatabaseApi {
/**
* Disables database tracking, prevents database events from being sent to the client.
*/
invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables database tracking, database events will now be delivered to the client.
*/
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
invoke_executeSQL(params: Protocol.Database.ExecuteSQLRequest): Promise<Protocol.Database.ExecuteSQLResponse>;
invoke_getDatabaseTableNames(params: Protocol.Database.GetDatabaseTableNamesRequest):
Promise<Protocol.Database.GetDatabaseTableNamesResponse>;
}
export interface DatabaseDispatcher {
addDatabase(params: Protocol.Database.AddDatabaseEvent): void;
}
export interface DeviceOrientationApi {
/**
* Clears the overridden Device Orientation.
*/
invoke_clearDeviceOrientationOverride(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Overrides the Device Orientation.
*/
invoke_setDeviceOrientationOverride(params: Protocol.DeviceOrientation.SetDeviceOrientationOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
}
export interface DeviceOrientationDispatcher {}
export interface EmulationApi {
/**
* Tells whether emulation is supported.
*/
invoke_canEmulate(): Promise<Protocol.Emulation.CanEmulateResponse>;
/**
* Clears the overriden device metrics.
*/
invoke_clearDeviceMetricsOverride(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Clears the overriden Geolocation Position and Error.
*/
invoke_clearGeolocationOverride(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Requests that page scale factor is reset to initial values.
*/
invoke_resetPageScaleFactor(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables or disables simulating a focused and active page.
*/
invoke_setFocusEmulationEnabled(params: Protocol.Emulation.SetFocusEmulationEnabledRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables CPU throttling to emulate slow CPUs.
*/
invoke_setCPUThrottlingRate(params: Protocol.Emulation.SetCPUThrottlingRateRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* 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<Protocol.ProtocolResponseWithError>;
/**
* 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<Protocol.ProtocolResponseWithError>;
invoke_setScrollbarsHidden(params: Protocol.Emulation.SetScrollbarsHiddenRequest):
Promise<Protocol.ProtocolResponseWithError>;
invoke_setDocumentCookieDisabled(params: Protocol.Emulation.SetDocumentCookieDisabledRequest):
Promise<Protocol.ProtocolResponseWithError>;
invoke_setEmitTouchEventsForMouse(params: Protocol.Emulation.SetEmitTouchEventsForMouseRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Emulates the given media type or media feature for CSS media queries.
*/
invoke_setEmulatedMedia(params: Protocol.Emulation.SetEmulatedMediaRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Emulates the given vision deficiency.
*/
invoke_setEmulatedVisionDeficiency(params: Protocol.Emulation.SetEmulatedVisionDeficiencyRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position
* unavailable.
*/
invoke_setGeolocationOverride(params: Protocol.Emulation.SetGeolocationOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Overrides the Idle state.
*/
invoke_setIdleOverride(params: Protocol.Emulation.SetIdleOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Clears Idle state overrides.
*/
invoke_clearIdleOverride(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Overrides value returned by the javascript navigator object.
*/
invoke_setNavigatorOverrides(params: Protocol.Emulation.SetNavigatorOverridesRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Sets a specified page scale factor.
*/
invoke_setPageScaleFactor(params: Protocol.Emulation.SetPageScaleFactorRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Switches script execution in the page.
*/
invoke_setScriptExecutionDisabled(params: Protocol.Emulation.SetScriptExecutionDisabledRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables touch on platforms which do not support them.
*/
invoke_setTouchEmulationEnabled(params: Protocol.Emulation.SetTouchEmulationEnabledRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* 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<Protocol.Emulation.SetVirtualTimePolicyResponse>;
/**
* Overrides default host system locale with the specified one.
*/
invoke_setLocaleOverride(params: Protocol.Emulation.SetLocaleOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Overrides default host system timezone with the specified one.
*/
invoke_setTimezoneOverride(params: Protocol.Emulation.SetTimezoneOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* 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.
*/
invoke_setVisibleSize(params: Protocol.Emulation.SetVisibleSizeRequest):
Promise<Protocol.ProtocolResponseWithError>;
invoke_setDisabledImageTypes(params: Protocol.Emulation.SetDisabledImageTypesRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Allows overriding user agent with the given string.
*/
invoke_setUserAgentOverride(params: Protocol.Emulation.SetUserAgentOverrideRequest):
Promise<Protocol.ProtocolResponseWithError>;
}
export interface EmulationDispatcher {
/**
* Notification sent after the virtual time budget for the current VirtualTimePolicy has run out.
*/
virtualTimeBudgetExpired(): void;
}
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.gl/3zHXhB for more background.
*/
invoke_beginFrame(params: Protocol.HeadlessExperimental.BeginFrameRequest):
Promise<Protocol.HeadlessExperimental.BeginFrameResponse>;
/**
* Disables headless events for the target.
*/
invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables headless events for the target.
*/
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
}
export interface HeadlessExperimentalDispatcher {
/**
* Issued when the target starts or stops needing BeginFrames.
* Deprecated. Issue beginFrame unconditionally instead and use result from
* beginFrame to detect whether the frames were suppressed.
*/
needsBeginFramesChanged(params: Protocol.HeadlessExperimental.NeedsBeginFramesChangedEvent): void;
}
// 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<Protocol.ProtocolResponseWithError>;
/**
* Read a chunk of the stream
*/
invoke_read(params: Protocol.IO.ReadRequest): Promise<Protocol.IO.ReadResponse>;
/**
* Return UUID of Blob object specified by a remote object id.
*/
invoke_resolveBlob(params: Protocol.IO.ResolveBlobRequest): Promise<Protocol.IO.ResolveBlobResponse>;
}
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<Protocol.ProtocolResponseWithError>;
/**
* Deletes a database.
*/
invoke_deleteDatabase(params: Protocol.IndexedDB.DeleteDatabaseRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Delete a range of entries from an object store
*/
invoke_deleteObjectStoreEntries(params: Protocol.IndexedDB.DeleteObjectStoreEntriesRequest):
Promise<Protocol.ProtocolResponseWithError>;
/**
* Disables events from backend.
*/
invoke_disable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Enables events from backend.
*/
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
/**
* Requests data from object store or index.
*/
invoke_requestData(params: Protocol.IndexedDB.RequestDataRequest): Promise<Protocol.IndexedDB.RequestDataResponse>;
/**
* Gets metadata of an object store
*/
invoke_getMetadata(params: Protocol.IndexedDB.GetMetadataRequest): Promise<Protocol.IndexedDB.GetMetadataResponse>;
/**
* Requests database with given name in given frame.
*/
invoke_requestDatabase(p