chrome-devtools-frontend
Version:
Chrome DevTools UI
1,833 lines (1,688 loc) • 474 kB
text/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.
*/
export type integer = number;
export type binary = string;
export type EnumerableEnum<T> = {[K in keyof T]: T[K]};
export interface ProtocolResponseWithError {
/** Returns an error message if the request failed. */
getError(): string|undefined;
}
type OpaqueType<Tag extends string> = {protocolOpaqueTypeTag: Tag};
type OpaqueIdentifier<RepresentationType, Tag extends string> = RepresentationType&OpaqueType<Tag>;
export namespace Accessibility {
/**
* Unique accessibility node identifier.
*/
export type AXNodeId = OpaqueIdentifier<string, 'Protocol.Accessibility.AXNodeId'>;
/**
* Enum of possible property types.
*/
export const enum AXValueType {
Boolean = 'boolean',
Tristate = 'tristate',
BooleanOrUndefined = 'booleanOrUndefined',
Idref = 'idref',
IdrefList = 'idrefList',
Integer = 'integer',
Node = 'node',
NodeList = 'nodeList',
Number = 'number',
String = 'string',
ComputedString = 'computedString',
Token = 'token',
TokenList = 'tokenList',
DomRelation = 'domRelation',
Role = 'role',
InternalRole = 'internalRole',
ValueUndefined = 'valueUndefined',
}
/**
* Enum of possible property sources.
*/
export const enum AXValueSourceType {
Attribute = 'attribute',
Implicit = 'implicit',
Style = 'style',
Contents = 'contents',
Placeholder = 'placeholder',
RelatedElement = 'relatedElement',
}
/**
* Enum of possible native property sources (as a subtype of a particular AXValueSourceType).
*/
export const enum AXValueNativeSourceType {
Description = 'description',
Figcaption = 'figcaption',
Label = 'label',
Labelfor = 'labelfor',
Labelwrapped = 'labelwrapped',
Legend = 'legend',
Rubyannotation = 'rubyannotation',
Tablecaption = 'tablecaption',
Title = 'title',
Other = 'other',
}
/**
* A single source for a computed AX property.
*/
export interface AXValueSource {
/**
* What type of source this is.
*/
type: AXValueSourceType;
/**
* The value of this property source.
*/
value?: AXValue;
/**
* The name of the relevant attribute, if any.
*/
attribute?: string;
/**
* The value of the relevant attribute, if any.
*/
attributeValue?: AXValue;
/**
* Whether this source is superseded by a higher priority source.
*/
superseded?: boolean;
/**
* The native markup source for this value, e.g. a <label> element.
*/
nativeSource?: AXValueNativeSourceType;
/**
* The value, such as a node or node list, of the native source.
*/
nativeSourceValue?: AXValue;
/**
* Whether the value for this property is invalid.
*/
invalid?: boolean;
/**
* Reason for the value being invalid, if it is.
*/
invalidReason?: string;
}
export interface AXRelatedNode {
/**
* The BackendNodeId of the related DOM node.
*/
backendDOMNodeId: DOM.BackendNodeId;
/**
* The IDRef value provided, if any.
*/
idref?: string;
/**
* The text alternative of this node in the current context.
*/
text?: string;
}
export interface AXProperty {
/**
* The name of this property.
*/
name: AXPropertyName;
/**
* The value of this property.
*/
value: AXValue;
}
/**
* A single computed AX property.
*/
export interface AXValue {
/**
* The type of this value.
*/
type: AXValueType;
/**
* The computed value of this property.
*/
value?: any;
/**
* One or more related nodes, if applicable.
*/
relatedNodes?: AXRelatedNode[];
/**
* The sources which contributed to the computation of this property.
*/
sources?: AXValueSource[];
}
/**
* Values of AXProperty name:
* - from 'busy' to 'roledescription': states which apply to every AX node
* - from 'live' to 'root': attributes which apply to nodes in live regions
* - from 'autocomplete' to 'valuetext': attributes which apply to widgets
* - from 'checked' to 'selected': states which apply to widgets
* - from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling.
*/
export const enum AXPropertyName {
Busy = 'busy',
Disabled = 'disabled',
Editable = 'editable',
Focusable = 'focusable',
Focused = 'focused',
Hidden = 'hidden',
HiddenRoot = 'hiddenRoot',
Invalid = 'invalid',
Keyshortcuts = 'keyshortcuts',
Settable = 'settable',
Roledescription = 'roledescription',
Live = 'live',
Atomic = 'atomic',
Relevant = 'relevant',
Root = 'root',
Autocomplete = 'autocomplete',
HasPopup = 'hasPopup',
Level = 'level',
Multiselectable = 'multiselectable',
Orientation = 'orientation',
Multiline = 'multiline',
Readonly = 'readonly',
Required = 'required',
Valuemin = 'valuemin',
Valuemax = 'valuemax',
Valuetext = 'valuetext',
Checked = 'checked',
Expanded = 'expanded',
Modal = 'modal',
Pressed = 'pressed',
Selected = 'selected',
Activedescendant = 'activedescendant',
Controls = 'controls',
Describedby = 'describedby',
Details = 'details',
Errormessage = 'errormessage',
Flowto = 'flowto',
Labelledby = 'labelledby',
Owns = 'owns',
}
/**
* A node in the accessibility tree.
*/
export interface AXNode {
/**
* Unique identifier for this node.
*/
nodeId: AXNodeId;
/**
* Whether this node is ignored for accessibility
*/
ignored: boolean;
/**
* Collection of reasons why this node is hidden.
*/
ignoredReasons?: AXProperty[];
/**
* This `Node`'s role, whether explicit or implicit.
*/
role?: AXValue;
/**
* This `Node`'s Chrome raw role.
*/
chromeRole?: AXValue;
/**
* The accessible name for this `Node`.
*/
name?: AXValue;
/**
* The accessible description for this `Node`.
*/
description?: AXValue;
/**
* The value for this `Node`.
*/
value?: AXValue;
/**
* All other properties
*/
properties?: AXProperty[];
/**
* ID for this node's parent.
*/
parentId?: AXNodeId;
/**
* IDs for each of this node's child nodes.
*/
childIds?: AXNodeId[];
/**
* The backend ID for the associated DOM node, if any.
*/
backendDOMNodeId?: DOM.BackendNodeId;
/**
* The frame ID for the frame associated with this nodes document.
*/
frameId?: Page.FrameId;
}
export interface GetPartialAXTreeRequest {
/**
* Identifier of the node to get the partial accessibility tree for.
*/
nodeId?: DOM.NodeId;
/**
* Identifier of the backend node to get the partial accessibility tree for.
*/
backendNodeId?: DOM.BackendNodeId;
/**
* JavaScript object id of the node wrapper to get the partial accessibility tree for.
*/
objectId?: Runtime.RemoteObjectId;
/**
* Whether to fetch this node's ancestors, siblings and children. Defaults to true.
*/
fetchRelatives?: boolean;
}
export interface GetPartialAXTreeResponse extends ProtocolResponseWithError {
/**
* The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and
* children, if requested.
*/
nodes: AXNode[];
}
export interface GetFullAXTreeRequest {
/**
* The maximum depth at which descendants of the root node should be retrieved.
* If omitted, the full tree is returned.
*/
depth?: integer;
/**
* The frame for whose document the AX tree should be retrieved.
* If omited, the root frame is used.
*/
frameId?: Page.FrameId;
}
export interface GetFullAXTreeResponse extends ProtocolResponseWithError {
nodes: AXNode[];
}
export interface GetRootAXNodeRequest {
/**
* The frame in whose document the node resides.
* If omitted, the root frame is used.
*/
frameId?: Page.FrameId;
}
export interface GetRootAXNodeResponse extends ProtocolResponseWithError {
node: AXNode;
}
export interface GetAXNodeAndAncestorsRequest {
/**
* Identifier of the node to get.
*/
nodeId?: DOM.NodeId;
/**
* Identifier of the backend node to get.
*/
backendNodeId?: DOM.BackendNodeId;
/**
* JavaScript object id of the node wrapper to get.
*/
objectId?: Runtime.RemoteObjectId;
}
export interface GetAXNodeAndAncestorsResponse extends ProtocolResponseWithError {
nodes: AXNode[];
}
export interface GetChildAXNodesRequest {
id: AXNodeId;
/**
* The frame in whose document the node resides.
* If omitted, the root frame is used.
*/
frameId?: Page.FrameId;
}
export interface GetChildAXNodesResponse extends ProtocolResponseWithError {
nodes: AXNode[];
}
export interface QueryAXTreeRequest {
/**
* Identifier of the node for the root to query.
*/
nodeId?: DOM.NodeId;
/**
* Identifier of the backend node for the root to query.
*/
backendNodeId?: DOM.BackendNodeId;
/**
* JavaScript object id of the node wrapper for the root to query.
*/
objectId?: Runtime.RemoteObjectId;
/**
* Find nodes with this computed name.
*/
accessibleName?: string;
/**
* Find nodes with this computed role.
*/
role?: string;
}
export interface QueryAXTreeResponse extends ProtocolResponseWithError {
/**
* A list of `Accessibility.AXNode` matching the specified attributes,
* including nodes that are ignored for accessibility.
*/
nodes: AXNode[];
}
/**
* The loadComplete event mirrors the load complete event sent by the browser to assistive
* technology when the web page has finished loading.
*/
export interface LoadCompleteEvent {
/**
* New document root node.
*/
root: AXNode;
}
/**
* The nodesUpdated event is sent every time a previously requested node has changed the in tree.
*/
export interface NodesUpdatedEvent {
/**
* Updated node data.
*/
nodes: AXNode[];
}
}
export namespace Animation {
export const enum AnimationType {
CSSTransition = 'CSSTransition',
CSSAnimation = 'CSSAnimation',
WebAnimation = 'WebAnimation',
}
/**
* Animation instance.
*/
export interface Animation {
/**
* `Animation`'s id.
*/
id: string;
/**
* `Animation`'s name.
*/
name: string;
/**
* `Animation`'s internal paused state.
*/
pausedState: boolean;
/**
* `Animation`'s play state.
*/
playState: string;
/**
* `Animation`'s playback rate.
*/
playbackRate: number;
/**
* `Animation`'s start time.
*/
startTime: number;
/**
* `Animation`'s current time.
*/
currentTime: number;
/**
* Animation type of `Animation`.
*/
type: AnimationType;
/**
* `Animation`'s source animation node.
*/
source?: AnimationEffect;
/**
* A unique ID for `Animation` representing the sources that triggered this CSS
* animation/transition.
*/
cssId?: string;
}
/**
* AnimationEffect instance
*/
export interface AnimationEffect {
/**
* `AnimationEffect`'s delay.
*/
delay: number;
/**
* `AnimationEffect`'s end delay.
*/
endDelay: number;
/**
* `AnimationEffect`'s iteration start.
*/
iterationStart: number;
/**
* `AnimationEffect`'s iterations.
*/
iterations: number;
/**
* `AnimationEffect`'s iteration duration.
*/
duration: number;
/**
* `AnimationEffect`'s playback direction.
*/
direction: string;
/**
* `AnimationEffect`'s fill mode.
*/
fill: string;
/**
* `AnimationEffect`'s target node.
*/
backendNodeId?: DOM.BackendNodeId;
/**
* `AnimationEffect`'s keyframes.
*/
keyframesRule?: KeyframesRule;
/**
* `AnimationEffect`'s timing function.
*/
easing: string;
}
/**
* Keyframes Rule
*/
export interface KeyframesRule {
/**
* CSS keyframed animation's name.
*/
name?: string;
/**
* List of animation keyframes.
*/
keyframes: KeyframeStyle[];
}
/**
* Keyframe Style
*/
export interface KeyframeStyle {
/**
* Keyframe's time offset.
*/
offset: string;
/**
* `AnimationEffect`'s timing function.
*/
easing: string;
}
export interface GetCurrentTimeRequest {
/**
* Id of animation.
*/
id: string;
}
export interface GetCurrentTimeResponse extends ProtocolResponseWithError {
/**
* Current time of the page.
*/
currentTime: number;
}
export interface GetPlaybackRateResponse extends ProtocolResponseWithError {
/**
* Playback rate for animations on page.
*/
playbackRate: number;
}
export interface ReleaseAnimationsRequest {
/**
* List of animation ids to seek.
*/
animations: string[];
}
export interface ResolveAnimationRequest {
/**
* Animation id.
*/
animationId: string;
}
export interface ResolveAnimationResponse extends ProtocolResponseWithError {
/**
* Corresponding remote object.
*/
remoteObject: Runtime.RemoteObject;
}
export interface SeekAnimationsRequest {
/**
* List of animation ids to seek.
*/
animations: string[];
/**
* Set the current time of each animation.
*/
currentTime: number;
}
export interface SetPausedRequest {
/**
* Animations to set the pause state of.
*/
animations: string[];
/**
* Paused state to set to.
*/
paused: boolean;
}
export interface SetPlaybackRateRequest {
/**
* Playback rate for animations on page
*/
playbackRate: number;
}
export interface SetTimingRequest {
/**
* Animation id.
*/
animationId: string;
/**
* Duration of the animation.
*/
duration: number;
/**
* Delay of the animation.
*/
delay: number;
}
/**
* Event for when an animation has been cancelled.
*/
export interface AnimationCanceledEvent {
/**
* Id of the animation that was cancelled.
*/
id: string;
}
/**
* Event for each animation that has been created.
*/
export interface AnimationCreatedEvent {
/**
* Id of the animation that was created.
*/
id: string;
}
/**
* Event for animation that has been started.
*/
export interface AnimationStartedEvent {
/**
* Animation that was started.
*/
animation: Animation;
}
}
/**
* Audits domain allows investigation of page violations and possible improvements.
*/
export namespace Audits {
/**
* Information about a cookie that is affected by an inspector issue.
*/
export interface AffectedCookie {
/**
* The following three properties uniquely identify a cookie
*/
name: string;
path: string;
domain: string;
}
/**
* Information about a request that is affected by an inspector issue.
*/
export interface AffectedRequest {
/**
* The unique request id.
*/
requestId: Network.RequestId;
url?: string;
}
/**
* Information about the frame affected by an inspector issue.
*/
export interface AffectedFrame {
frameId: Page.FrameId;
}
export const enum CookieExclusionReason {
ExcludeSameSiteUnspecifiedTreatedAsLax = 'ExcludeSameSiteUnspecifiedTreatedAsLax',
ExcludeSameSiteNoneInsecure = 'ExcludeSameSiteNoneInsecure',
ExcludeSameSiteLax = 'ExcludeSameSiteLax',
ExcludeSameSiteStrict = 'ExcludeSameSiteStrict',
ExcludeInvalidSameParty = 'ExcludeInvalidSameParty',
ExcludeSamePartyCrossPartyContext = 'ExcludeSamePartyCrossPartyContext',
ExcludeDomainNonASCII = 'ExcludeDomainNonASCII',
ExcludeThirdPartyCookieBlockedInFirstPartySet = 'ExcludeThirdPartyCookieBlockedInFirstPartySet',
}
export const enum CookieWarningReason {
WarnSameSiteUnspecifiedCrossSiteContext = 'WarnSameSiteUnspecifiedCrossSiteContext',
WarnSameSiteNoneInsecure = 'WarnSameSiteNoneInsecure',
WarnSameSiteUnspecifiedLaxAllowUnsafe = 'WarnSameSiteUnspecifiedLaxAllowUnsafe',
WarnSameSiteStrictLaxDowngradeStrict = 'WarnSameSiteStrictLaxDowngradeStrict',
WarnSameSiteStrictCrossDowngradeStrict = 'WarnSameSiteStrictCrossDowngradeStrict',
WarnSameSiteStrictCrossDowngradeLax = 'WarnSameSiteStrictCrossDowngradeLax',
WarnSameSiteLaxCrossDowngradeStrict = 'WarnSameSiteLaxCrossDowngradeStrict',
WarnSameSiteLaxCrossDowngradeLax = 'WarnSameSiteLaxCrossDowngradeLax',
WarnAttributeValueExceedsMaxSize = 'WarnAttributeValueExceedsMaxSize',
WarnDomainNonASCII = 'WarnDomainNonASCII',
}
export const enum CookieOperation {
SetCookie = 'SetCookie',
ReadCookie = 'ReadCookie',
}
/**
* This information is currently necessary, as the front-end has a difficult
* time finding a specific cookie. With this, we can convey specific error
* information without the cookie.
*/
export interface CookieIssueDetails {
/**
* If AffectedCookie is not set then rawCookieLine contains the raw
* Set-Cookie header string. This hints at a problem where the
* cookie line is syntactically or semantically malformed in a way
* that no valid cookie could be created.
*/
cookie?: AffectedCookie;
rawCookieLine?: string;
cookieWarningReasons: CookieWarningReason[];
cookieExclusionReasons: CookieExclusionReason[];
/**
* Optionally identifies the site-for-cookies and the cookie url, which
* may be used by the front-end as additional context.
*/
operation: CookieOperation;
siteForCookies?: string;
cookieUrl?: string;
request?: AffectedRequest;
}
export const enum MixedContentResolutionStatus {
MixedContentBlocked = 'MixedContentBlocked',
MixedContentAutomaticallyUpgraded = 'MixedContentAutomaticallyUpgraded',
MixedContentWarning = 'MixedContentWarning',
}
export const enum MixedContentResourceType {
AttributionSrc = 'AttributionSrc',
Audio = 'Audio',
Beacon = 'Beacon',
CSPReport = 'CSPReport',
Download = 'Download',
EventSource = 'EventSource',
Favicon = 'Favicon',
Font = 'Font',
Form = 'Form',
Frame = 'Frame',
Image = 'Image',
Import = 'Import',
Manifest = 'Manifest',
Ping = 'Ping',
PluginData = 'PluginData',
PluginResource = 'PluginResource',
Prefetch = 'Prefetch',
Resource = 'Resource',
Script = 'Script',
ServiceWorker = 'ServiceWorker',
SharedWorker = 'SharedWorker',
Stylesheet = 'Stylesheet',
Track = 'Track',
Video = 'Video',
Worker = 'Worker',
XMLHttpRequest = 'XMLHttpRequest',
XSLT = 'XSLT',
}
export interface MixedContentIssueDetails {
/**
* The type of resource causing the mixed content issue (css, js, iframe,
* form,...). Marked as optional because it is mapped to from
* blink::mojom::RequestContextType, which will be replaced
* by network::mojom::RequestDestination
*/
resourceType?: MixedContentResourceType;
/**
* The way the mixed content issue is being resolved.
*/
resolutionStatus: MixedContentResolutionStatus;
/**
* The unsafe http url causing the mixed content issue.
*/
insecureURL: string;
/**
* The url responsible for the call to an unsafe url.
*/
mainResourceURL: string;
/**
* The mixed content request.
* Does not always exist (e.g. for unsafe form submission urls).
*/
request?: AffectedRequest;
/**
* Optional because not every mixed content issue is necessarily linked to a frame.
*/
frame?: AffectedFrame;
}
/**
* Enum indicating the reason a response has been blocked. These reasons are
* refinements of the net error BLOCKED_BY_RESPONSE.
*/
export const enum BlockedByResponseReason {
CoepFrameResourceNeedsCoepHeader = 'CoepFrameResourceNeedsCoepHeader',
CoopSandboxedIFrameCannotNavigateToCoopPage = 'CoopSandboxedIFrameCannotNavigateToCoopPage',
CorpNotSameOrigin = 'CorpNotSameOrigin',
CorpNotSameOriginAfterDefaultedToSameOriginByCoep = 'CorpNotSameOriginAfterDefaultedToSameOriginByCoep',
CorpNotSameSite = 'CorpNotSameSite',
}
/**
* Details for a request that has been blocked with the BLOCKED_BY_RESPONSE
* code. Currently only used for COEP/COOP, but may be extended to include
* some CSP errors in the future.
*/
export interface BlockedByResponseIssueDetails {
request: AffectedRequest;
parentFrame?: AffectedFrame;
blockedFrame?: AffectedFrame;
reason: BlockedByResponseReason;
}
export const enum HeavyAdResolutionStatus {
HeavyAdBlocked = 'HeavyAdBlocked',
HeavyAdWarning = 'HeavyAdWarning',
}
export const enum HeavyAdReason {
NetworkTotalLimit = 'NetworkTotalLimit',
CpuTotalLimit = 'CpuTotalLimit',
CpuPeakLimit = 'CpuPeakLimit',
}
export interface HeavyAdIssueDetails {
/**
* The resolution status, either blocking the content or warning.
*/
resolution: HeavyAdResolutionStatus;
/**
* The reason the ad was blocked, total network or cpu or peak cpu.
*/
reason: HeavyAdReason;
/**
* The frame that was blocked.
*/
frame: AffectedFrame;
}
export const enum ContentSecurityPolicyViolationType {
KInlineViolation = 'kInlineViolation',
KEvalViolation = 'kEvalViolation',
KURLViolation = 'kURLViolation',
KTrustedTypesSinkViolation = 'kTrustedTypesSinkViolation',
KTrustedTypesPolicyViolation = 'kTrustedTypesPolicyViolation',
KWasmEvalViolation = 'kWasmEvalViolation',
}
export interface SourceCodeLocation {
scriptId?: Runtime.ScriptId;
url: string;
lineNumber: integer;
columnNumber: integer;
}
export interface ContentSecurityPolicyIssueDetails {
/**
* The url not included in allowed sources.
*/
blockedURL?: string;
/**
* Specific directive that is violated, causing the CSP issue.
*/
violatedDirective: string;
isReportOnly: boolean;
contentSecurityPolicyViolationType: ContentSecurityPolicyViolationType;
frameAncestor?: AffectedFrame;
sourceCodeLocation?: SourceCodeLocation;
violatingNodeId?: DOM.BackendNodeId;
}
export const enum SharedArrayBufferIssueType {
TransferIssue = 'TransferIssue',
CreationIssue = 'CreationIssue',
}
/**
* Details for a issue arising from an SAB being instantiated in, or
* transferred to a context that is not cross-origin isolated.
*/
export interface SharedArrayBufferIssueDetails {
sourceCodeLocation: SourceCodeLocation;
isWarning: boolean;
type: SharedArrayBufferIssueType;
}
export interface LowTextContrastIssueDetails {
violatingNodeId: DOM.BackendNodeId;
violatingNodeSelector: string;
contrastRatio: number;
thresholdAA: number;
thresholdAAA: number;
fontSize: string;
fontWeight: string;
}
/**
* Details for a CORS related issue, e.g. a warning or error related to
* CORS RFC1918 enforcement.
*/
export interface CorsIssueDetails {
corsErrorStatus: Network.CorsErrorStatus;
isWarning: boolean;
request: AffectedRequest;
location?: SourceCodeLocation;
initiatorOrigin?: string;
resourceIPAddressSpace?: Network.IPAddressSpace;
clientSecurityState?: Network.ClientSecurityState;
}
export const enum AttributionReportingIssueType {
PermissionPolicyDisabled = 'PermissionPolicyDisabled',
UntrustworthyReportingOrigin = 'UntrustworthyReportingOrigin',
InsecureContext = 'InsecureContext',
InvalidHeader = 'InvalidHeader',
InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
SourceAndTriggerHeaders = 'SourceAndTriggerHeaders',
SourceIgnored = 'SourceIgnored',
TriggerIgnored = 'TriggerIgnored',
OsSourceIgnored = 'OsSourceIgnored',
OsTriggerIgnored = 'OsTriggerIgnored',
InvalidRegisterOsSourceHeader = 'InvalidRegisterOsSourceHeader',
InvalidRegisterOsTriggerHeader = 'InvalidRegisterOsTriggerHeader',
WebAndOsHeaders = 'WebAndOsHeaders',
NoWebOrOsSupport = 'NoWebOrOsSupport',
}
/**
* Details for issues around "Attribution Reporting API" usage.
* Explainer: https://github.com/WICG/attribution-reporting-api
*/
export interface AttributionReportingIssueDetails {
violationType: AttributionReportingIssueType;
request?: AffectedRequest;
violatingNodeId?: DOM.BackendNodeId;
invalidParameter?: string;
}
/**
* Details for issues about documents in Quirks Mode
* or Limited Quirks Mode that affects page layouting.
*/
export interface QuirksModeIssueDetails {
/**
* If false, it means the document's mode is "quirks"
* instead of "limited-quirks".
*/
isLimitedQuirksMode: boolean;
documentNodeId: DOM.BackendNodeId;
url: string;
frameId: Page.FrameId;
loaderId: Network.LoaderId;
}
export interface NavigatorUserAgentIssueDetails {
url: string;
location?: SourceCodeLocation;
}
export const enum GenericIssueErrorType {
CrossOriginPortalPostMessageError = 'CrossOriginPortalPostMessageError',
FormLabelForNameError = 'FormLabelForNameError',
FormDuplicateIdForInputError = 'FormDuplicateIdForInputError',
FormInputWithNoLabelError = 'FormInputWithNoLabelError',
FormAutocompleteAttributeEmptyError = 'FormAutocompleteAttributeEmptyError',
FormEmptyIdAndNameAttributesForInputError = 'FormEmptyIdAndNameAttributesForInputError',
FormAriaLabelledByToNonExistingId = 'FormAriaLabelledByToNonExistingId',
FormInputAssignedAutocompleteValueToIdOrNameAttributeError = 'FormInputAssignedAutocompleteValueToIdOrNameAttributeError',
FormLabelHasNeitherForNorNestedInput = 'FormLabelHasNeitherForNorNestedInput',
FormLabelForMatchesNonExistingIdError = 'FormLabelForMatchesNonExistingIdError',
FormInputHasWrongButWellIntendedAutocompleteValueError = 'FormInputHasWrongButWellIntendedAutocompleteValueError',
}
/**
* Depending on the concrete errorType, different properties are set.
*/
export interface GenericIssueDetails {
/**
* Issues with the same errorType are aggregated in the frontend.
*/
errorType: GenericIssueErrorType;
frameId?: Page.FrameId;
violatingNodeId?: DOM.BackendNodeId;
violatingNodeAttribute?: string;
}
/**
* This issue tracks information needed to print a deprecation message.
* https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md
*/
export interface DeprecationIssueDetails {
affectedFrame?: AffectedFrame;
sourceCodeLocation: SourceCodeLocation;
/**
* One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
*/
type: string;
}
/**
* This issue warns about sites in the redirect chain of a finished navigation
* that may be flagged as trackers and have their state cleared if they don't
* receive a user interaction. Note that in this context 'site' means eTLD+1.
* For example, if the URL `https://example.test:80/bounce` was in the
* redirect chain, the site reported would be `example.test`.
*/
export interface BounceTrackingIssueDetails {
trackingSites: string[];
}
export const enum ClientHintIssueReason {
MetaTagAllowListInvalidOrigin = 'MetaTagAllowListInvalidOrigin',
MetaTagModifiedHTML = 'MetaTagModifiedHTML',
}
export interface FederatedAuthRequestIssueDetails {
federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason;
}
/**
* Represents the failure reason when a federated authentication reason fails.
* Should be updated alongside RequestIdTokenStatus in
* third_party/blink/public/mojom/devtools/inspector_issue.mojom to include
* all cases except for success.
*/
export const enum FederatedAuthRequestIssueReason {
ShouldEmbargo = 'ShouldEmbargo',
TooManyRequests = 'TooManyRequests',
WellKnownHttpNotFound = 'WellKnownHttpNotFound',
WellKnownNoResponse = 'WellKnownNoResponse',
WellKnownInvalidResponse = 'WellKnownInvalidResponse',
WellKnownListEmpty = 'WellKnownListEmpty',
WellKnownInvalidContentType = 'WellKnownInvalidContentType',
ConfigNotInWellKnown = 'ConfigNotInWellKnown',
WellKnownTooBig = 'WellKnownTooBig',
ConfigHttpNotFound = 'ConfigHttpNotFound',
ConfigNoResponse = 'ConfigNoResponse',
ConfigInvalidResponse = 'ConfigInvalidResponse',
ConfigInvalidContentType = 'ConfigInvalidContentType',
ClientMetadataHttpNotFound = 'ClientMetadataHttpNotFound',
ClientMetadataNoResponse = 'ClientMetadataNoResponse',
ClientMetadataInvalidResponse = 'ClientMetadataInvalidResponse',
ClientMetadataInvalidContentType = 'ClientMetadataInvalidContentType',
DisabledInSettings = 'DisabledInSettings',
ErrorFetchingSignin = 'ErrorFetchingSignin',
InvalidSigninResponse = 'InvalidSigninResponse',
AccountsHttpNotFound = 'AccountsHttpNotFound',
AccountsNoResponse = 'AccountsNoResponse',
AccountsInvalidResponse = 'AccountsInvalidResponse',
AccountsListEmpty = 'AccountsListEmpty',
AccountsInvalidContentType = 'AccountsInvalidContentType',
IdTokenHttpNotFound = 'IdTokenHttpNotFound',
IdTokenNoResponse = 'IdTokenNoResponse',
IdTokenInvalidResponse = 'IdTokenInvalidResponse',
IdTokenInvalidRequest = 'IdTokenInvalidRequest',
IdTokenInvalidContentType = 'IdTokenInvalidContentType',
ErrorIdToken = 'ErrorIdToken',
Canceled = 'Canceled',
RpPageNotVisible = 'RpPageNotVisible',
SilentMediationFailure = 'SilentMediationFailure',
ThirdPartyCookiesBlocked = 'ThirdPartyCookiesBlocked',
}
/**
* This issue tracks client hints related issues. It's used to deprecate old
* features, encourage the use of new ones, and provide general guidance.
*/
export interface ClientHintIssueDetails {
sourceCodeLocation: SourceCodeLocation;
clientHintIssueReason: ClientHintIssueReason;
}
export interface FailedRequestInfo {
/**
* The URL that failed to load.
*/
url: string;
/**
* The failure message for the failed request.
*/
failureMessage: string;
}
export const enum StyleSheetLoadingIssueReason {
LateImportRule = 'LateImportRule',
RequestFailed = 'RequestFailed',
}
/**
* This issue warns when a referenced stylesheet couldn't be loaded.
*/
export interface StylesheetLoadingIssueDetails {
/**
* Source code position that referenced the failing stylesheet.
*/
sourceCodeLocation: SourceCodeLocation;
/**
* Reason why the stylesheet couldn't be loaded.
*/
styleSheetLoadingIssueReason: StyleSheetLoadingIssueReason;
/**
* Contains additional info when the failure was due to a request.
*/
failedRequestInfo?: FailedRequestInfo;
}
/**
* A unique identifier for the type of issue. Each type may use one of the
* optional fields in InspectorIssueDetails to convey more specific
* information about the kind of issue.
*/
export const enum InspectorIssueCode {
CookieIssue = 'CookieIssue',
MixedContentIssue = 'MixedContentIssue',
BlockedByResponseIssue = 'BlockedByResponseIssue',
HeavyAdIssue = 'HeavyAdIssue',
ContentSecurityPolicyIssue = 'ContentSecurityPolicyIssue',
SharedArrayBufferIssue = 'SharedArrayBufferIssue',
LowTextContrastIssue = 'LowTextContrastIssue',
CorsIssue = 'CorsIssue',
AttributionReportingIssue = 'AttributionReportingIssue',
QuirksModeIssue = 'QuirksModeIssue',
NavigatorUserAgentIssue = 'NavigatorUserAgentIssue',
GenericIssue = 'GenericIssue',
DeprecationIssue = 'DeprecationIssue',
ClientHintIssue = 'ClientHintIssue',
FederatedAuthRequestIssue = 'FederatedAuthRequestIssue',
BounceTrackingIssue = 'BounceTrackingIssue',
StylesheetLoadingIssue = 'StylesheetLoadingIssue',
}
/**
* This struct holds a list of optional fields with additional information
* specific to the kind of issue. When adding a new issue code, please also
* add a new optional field to this type.
*/
export interface InspectorIssueDetails {
cookieIssueDetails?: CookieIssueDetails;
mixedContentIssueDetails?: MixedContentIssueDetails;
blockedByResponseIssueDetails?: BlockedByResponseIssueDetails;
heavyAdIssueDetails?: HeavyAdIssueDetails;
contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails;
lowTextContrastIssueDetails?: LowTextContrastIssueDetails;
corsIssueDetails?: CorsIssueDetails;
attributionReportingIssueDetails?: AttributionReportingIssueDetails;
quirksModeIssueDetails?: QuirksModeIssueDetails;
navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails;
genericIssueDetails?: GenericIssueDetails;
deprecationIssueDetails?: DeprecationIssueDetails;
clientHintIssueDetails?: ClientHintIssueDetails;
federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails;
bounceTrackingIssueDetails?: BounceTrackingIssueDetails;
stylesheetLoadingIssueDetails?: StylesheetLoadingIssueDetails;
}
/**
* A unique id for a DevTools inspector issue. Allows other entities (e.g.
* exceptions, CDP message, console messages, etc.) to reference an issue.
*/
export type IssueId = OpaqueIdentifier<string, 'Protocol.Audits.IssueId'>;
/**
* An inspector issue reported from the back-end.
*/
export interface InspectorIssue {
code: InspectorIssueCode;
details: InspectorIssueDetails;
/**
* A unique id for this issue. May be omitted if no other entity (e.g.
* exception, CDP message, etc.) is referencing this issue.
*/
issueId?: IssueId;
}
export const enum GetEncodedResponseRequestEncoding {
Webp = 'webp',
Jpeg = 'jpeg',
Png = 'png',
}
export interface GetEncodedResponseRequest {
/**
* Identifier of the network request to get content for.
*/
requestId: Network.RequestId;
/**
* The encoding to use.
*/
encoding: GetEncodedResponseRequestEncoding;
/**
* The quality of the encoding (0-1). (defaults to 1)
*/
quality?: number;
/**
* Whether to only return the size information (defaults to false).
*/
sizeOnly?: boolean;
}
export interface GetEncodedResponseResponse extends ProtocolResponseWithError {
/**
* The encoded body as a base64 string. Omitted if sizeOnly is true.
*/
body?: binary;
/**
* Size before re-encoding.
*/
originalSize: integer;
/**
* Size after re-encoding.
*/
encodedSize: integer;
}
export interface CheckContrastRequest {
/**
* Whether to report WCAG AAA level issues. Default is false.
*/
reportAAA?: boolean;
}
export interface CheckFormsIssuesResponse extends ProtocolResponseWithError {
formIssues: GenericIssueDetails[];
}
export interface IssueAddedEvent {
issue: InspectorIssue;
}
}
/**
* Defines commands and events for Autofill.
*/
export namespace Autofill {
export interface CreditCard {
/**
* 16-digit credit card number.
*/
number: string;
/**
* Name of the credit card owner.
*/
name: string;
/**
* 2-digit expiry month.
*/
expiryMonth: string;
/**
* 4-digit expiry year.
*/
expiryYear: string;
/**
* 3-digit card verification code.
*/
cvc: string;
}
export interface TriggerRequest {
/**
* Identifies a field that serves as an anchor for autofill.
*/
fieldId: DOM.BackendNodeId;
/**
* Identifies the frame that field belongs to.
*/
frameId?: Page.FrameId;
/**
* Credit card information to fill out the form. Credit card data is not saved.
*/
card: CreditCard;
}
}
/**
* Defines events for background web platform features.
*/
export namespace BackgroundService {
/**
* The Background Service that will be associated with the commands/events.
* Every Background Service operates independently, but they share the same
* API.
*/
export const enum ServiceName {
BackgroundFetch = 'backgroundFetch',
BackgroundSync = 'backgroundSync',
PushMessaging = 'pushMessaging',
Notifications = 'notifications',
PaymentHandler = 'paymentHandler',
PeriodicBackgroundSync = 'periodicBackgroundSync',
}
/**
* A key-value pair for additional event information to pass along.
*/
export interface EventMetadata {
key: string;
value: string;
}
export interface BackgroundServiceEvent {
/**
* Timestamp of the event (in seconds).
*/
timestamp: Network.TimeSinceEpoch;
/**
* The origin this event belongs to.
*/
origin: string;
/**
* The Service Worker ID that initiated the event.
*/
serviceWorkerRegistrationId: ServiceWorker.RegistrationID;
/**
* The Background Service this event belongs to.
*/
service: ServiceName;
/**
* A description of the event.
*/
eventName: string;
/**
* An identifier that groups related events together.
*/
instanceId: string;
/**
* A list of event-specific information.
*/
eventMetadata: EventMetadata[];
/**
* Storage key this event belongs to.
*/
storageKey: string;
}
export interface StartObservingRequest {
service: ServiceName;
}
export interface StopObservingRequest {
service: ServiceName;
}
export interface SetRecordingRequest {
shouldRecord: boolean;
service: ServiceName;
}
export interface ClearEventsRequest {
service: ServiceName;
}
/**
* Called when the recording state for the service has been updated.
*/
export interface RecordingStateChangedEvent {
isRecording: boolean;
service: ServiceName;
}
/**
* Called with all existing backgroundServiceEvents when enabled, and all new
* events afterwards if enabled and recording.
*/
export interface BackgroundServiceEventReceivedEvent {
backgroundServiceEvent: BackgroundServiceEvent;
}
}
/**
* The Browser domain defines methods and events for browser managing.
*/
export namespace Browser {
export type BrowserContextID = OpaqueIdentifier<string, 'Protocol.Browser.BrowserContextID'>;
export type WindowID = OpaqueIdentifier<integer, 'Protocol.Browser.WindowID'>;
/**
* The state of the browser window.
*/
export const enum WindowState {
Normal = 'normal',
Minimized = 'minimized',
Maximized = 'maximized',
Fullscreen = 'fullscreen',
}
/**
* Browser window bounds information
*/
export interface Bounds {
/**
* The offset from the left edge of the screen to the window in pixels.
*/
left?: integer;
/**
* The offset from the top edge of the screen to the window in pixels.
*/
top?: integer;
/**
* The window width in pixels.
*/
width?: integer;
/**
* The window height in pixels.
*/
height?: integer;
/**
* The window state. Default to normal.
*/
windowState?: WindowState;
}
export const enum PermissionType {
AccessibilityEvents = 'accessibilityEvents',
AudioCapture = 'audioCapture',
BackgroundSync = 'backgroundSync',
BackgroundFetch = 'backgroundFetch',
ClipboardReadWrite = 'clipboardReadWrite',
ClipboardSanitizedWrite = 'clipboardSanitizedWrite',
DisplayCapture = 'displayCapture',
DurableStorage = 'durableStorage',
Flash = 'flash',
Geolocation = 'geolocation',
IdleDetection = 'idleDetection',
LocalFonts = 'localFonts',
Midi = 'midi',
MidiSysex = 'midiSysex',
Nfc = 'nfc',
Notifications = 'notifications',
PaymentHandler = 'paymentHandler',
PeriodicBackgroundSync = 'periodicBackgroundSync',
ProtectedMediaIdentifier = 'protectedMediaIdentifier',
Sensors = 'sensors',
StorageAccess = 'storageAccess',
TopLevelStorageAccess = 'topLevelStorageAccess',
VideoCapture = 'videoCapture',
VideoCapturePanTiltZoom = 'videoCapturePanTiltZoom',
WakeLockScreen = 'wakeLockScreen',
WakeLockSystem = 'wakeLockSystem',
WindowManagement = 'windowManagement',
}
export const enum PermissionSetting {
Granted = 'granted',
Denied = 'denied',
Prompt = 'prompt',
}
/**
* Definition of PermissionDescriptor defined in the Permissions API:
* https://w3c.github.io/permissions/#dictdef-permissiondescriptor.
*/
export interface PermissionDescriptor {
/**
* Name of permission.
* See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
*/
name: string;
/**
* For "midi" permission, may also specify sysex control.
*/
sysex?: boolean;
/**
* For "push" permission, may specify userVisibleOnly.
* Note that userVisibleOnly = true is the only currently supported type.
*/
userVisibleOnly?: boolean;
/**
* For "clipboard" permission, may specify allowWithoutSanitization.
*/
allowWithoutSanitization?: boolean;
/**
* For "camera" permission, may specify panTiltZoom.
*/
panTiltZoom?: boolean;
}
/**
* Browser command ids used by executeBrowserCommand.
*/
export const enum BrowserCommandId {
OpenTabSearch = 'openTabSearch',
CloseTabSearch = 'closeTabSearch',
}
/**
* Chrome histogram bucket.
*/
export interface Bucket {
/**
* Minimum value (inclusive).
*/
low: integer;
/**
* Maximum value (exclusive).
*/
high: integer;
/**
* Number of samples.
*/
count: integer;
}
/**
* Chrome histogram.
*/
export interface Histogram {
/**
* Name.
*/
name: string;
/**
* Sum of sample values.
*/
sum: integer;
/**
* Total number of samples.
*/
count: integer;
/**
* Buckets.
*/
buckets: Bucket[];
}
export interface SetPermissionRequest {
/**
* Descriptor of permission to override.
*/
permission: PermissionDescriptor;
/**
* Setting of the permission.
*/
setting: PermissionSetting;
/**
* Origin the permission applies to, all origins if not specified.
*/
origin?: string;
/**
* Context to override. When omitted, default browser context is used.
*/
browserContextId?: BrowserContextID;
}
export interface GrantPermissionsRequest {
permissions: PermissionType[];
/**
* Origin the permission applies to, all origins if not specified.
*/
origin?: string;
/**
* BrowserContext to override permissions. When omitted, default browser context is used.
*/
browserContextId?: BrowserContextID;
}
export interface ResetPermissionsRequest {
/**
* BrowserContext to reset permissions. When omitted, default browser context is used.
*/
browserContextId?: BrowserContextID;
}
export const enum SetDownloadBehaviorRequestBehavior {
Deny = 'deny',
Allow = 'allow',
AllowAndName = 'allowAndName',
Default = 'default',
}
export interface SetDownloadBehaviorRequest {
/**
* Whether to allow all or deny all download requests, or use default Chrome behavior if
* available (otherwise deny). |allowAndName| allows download and names files according to
* their dowmload guids.
*/
behavior: SetDownloadBehaviorRequestBehavior;
/**
* BrowserContext to set download behavior. When omitted, default browser context is used.
*/
browserContextId?: BrowserContextID;
/**
* The default path to save downloaded files to. This is required if behavior is set to 'allow'
* or 'allowAndName'.
*/
downloadPath?: string;
/**
* Whether to emit download events (defaults to false).
*/
eventsEnabled?: boolean;
}
export interface CancelDownloadRequest {
/**
* Global unique identifier of the download.
*/
guid: string;
/**
* BrowserContext to perform the action in. When omitted, default browser context is used.
*/
browserContextId?: BrowserContextID;
}
export interface GetVersionResponse extends ProtocolResponseWithError {
/**
* Protocol version.
*/
protocolVersion: string;
/**
* Product name.
*/
product: string;
/**
* Product revision.
*/
revision: string;
/**
* User-Agent.
*/
userAgent: string;
/**
* V8 version.
*/
jsVersion: string;
}
export interface GetBrowserCommandLineResponse extends ProtocolResponseWithError {
/**
* Commandline parameters
*/
arguments: string[];
}
export interface GetHistogramsRequest {
/**
* Requested substring in name. Only histograms which have query as a
* substring in their name are extracted. An empty or absent query returns
* all histograms.
*/
query?: string;
/**
* If true, retrieve delta since last delta call.
*/
delta?: boolean;
}
export interface GetHistogramsResponse extends ProtocolResponseWithError {
/**
* Histograms.
*/
histograms: Histogram[];
}
export interface GetHistogramRequest {
/**
* Requested histogram name.
*/
name: string;
/**
* If true, retrieve delta since last delta call.
*/
delta?: boolean;
}
export interface GetHistogramResponse extends ProtocolResponseWithError {
/**
* Histogram.
*/
histogram: Histogram;
}
export interface GetWindowBoundsRequest {
/**
* Browser window id.
*/
windowId: WindowID;
}
export interface GetWindowBoundsResponse extends ProtocolResponseWithError {
/**
* Bounds information of the window. When window state is 'minimized', the restored window
* position and size are returned.
*/
bounds: Bounds;
}
export interface GetWindowForTargetRequest {
/**
* Devtools agent host id. If called as a part of the session, associated targetId is used.
*/
targetId?: Target.TargetID;
}
export interface GetWindowForTargetResponse extends ProtocolResponseWithError {
/**
* Browser window id.
*/
windowId: WindowID;
/**
* Bounds information of the window. When window state is 'minimized', the restored window
* position and size are returned.
*/
bounds: Bounds;
}
export interface SetWindowBoundsRequest {
/**
* Browser window id.
*/
windowId: WindowID;
/**
* New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined
* with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
*/
bounds: Bounds;
}
export interface SetDockTileRequest {
badgeLabel?: string;
/**
* Png encoded image.
*/
image?: binary;
}
export interface ExecuteBrowserCommandRequest {
commandId: BrowserCommandId;
}
export interface AddPrivacySandboxEnrollmentOverrideRequest {
url: string;
}
/**
* Fired when page is about to start a download.
*/
export interface DownloadWillBeginEvent {
/**
* Id of the frame that caused the download to begin.
*/
frameId: Page.FrameId;
/**
* Global unique identifier of the download.
*/
guid: string;
/**
* URL of the resource being downloaded.
*/
url: string;
/**
* Suggested file name of the resource (the actual name of the file saved on disk may differ).
*/
suggestedFilename: string;
}
export const enum DownloadProgressEventState {
InProgress = 'inProgress',
Completed = 'completed',
Canceled = 'canceled',
}
/**
* Fired when download makes progress. Last call has |done| == true.
*/
export interface DownloadProgressEvent {
/**
* Global unique identifier of the download.
*/
guid: string;
/**
* Total expected bytes to download.
*/
totalBytes: number;
/**
* Total bytes received.
*/
receivedBytes: number;
/**
* Download status.
*/
state: DownloadProgressEventState;
}
}
/**
* This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)
* have an associated `id` used in subsequent operations on the related object. Each object type has
* a specific `id` structure, and those are not interchangeable between objects of different kinds.
* CSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client
* can also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and
* subsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.
*/
export namespace CSS {
export type StyleSheetId = OpaqueIdentifier<string, 'Protocol.CSS.StyleSheetId'>;
/**
* Stylesheet type: "injected" for styl