UNPKG

chrome-devtools-frontend

Version:
1,869 lines (1,729 loc) • 405 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. */ declare namespace Protocol { export type integer = number export type binary = string export interface ProtocolResponseWithError { /** Returns an error message if the request failed. */ getError(): string|undefined; } export namespace Accessibility { /** * Unique accessibility node identifier. */ export type AXNodeId = string; /** * Enum of possible property types. */ export 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 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 enum AXValueNativeSourceType { 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 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; /** * 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[]; /** * IDs for each of this node's child nodes. */ childIds?: AXNodeId[]; /** * The backend ID for the associated DOM node, if any. */ backendDOMNodeId?: DOM.BackendNodeId; } 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 nodes 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. */ max_depth?: integer; } export interface GetFullAXTreeResponse extends ProtocolResponseWithError { nodes: AXNode[]; } export interface GetChildAXNodesRequest { id: AXNodeId; } 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[]; } } export namespace Animation { export 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; } } export namespace ApplicationCache { /** * Detailed application cache resource information. */ export interface ApplicationCacheResource { /** * Resource url. */ url: string; /** * Resource size. */ size: integer; /** * Resource type. */ type: string; } /** * Detailed application cache information. */ export interface ApplicationCache { /** * Manifest URL. */ manifestURL: string; /** * Application cache size. */ size: number; /** * Application cache creation time. */ creationTime: number; /** * Application cache update time. */ updateTime: number; /** * Application cache resources. */ resources: ApplicationCacheResource[]; } /** * Frame identifier - manifest URL pair. */ export interface FrameWithManifest { /** * Frame identifier. */ frameId: Page.FrameId; /** * Manifest URL. */ manifestURL: string; /** * Application cache status. */ status: integer; } export interface GetApplicationCacheForFrameRequest { /** * Identifier of the frame containing document whose application cache is retrieved. */ frameId: Page.FrameId; } export interface GetApplicationCacheForFrameResponse extends ProtocolResponseWithError { /** * Relevant application cache data for the document in given frame. */ applicationCache: ApplicationCache; } export interface GetFramesWithManifestsResponse extends ProtocolResponseWithError { /** * Array of frame identifiers with manifest urls for each frame containing a document * associated with some application cache. */ frameIds: FrameWithManifest[]; } export interface GetManifestForFrameRequest { /** * Identifier of the frame containing document whose manifest is retrieved. */ frameId: Page.FrameId; } export interface GetManifestForFrameResponse extends ProtocolResponseWithError { /** * Manifest URL for document in the given frame. */ manifestURL: string; } export interface ApplicationCacheStatusUpdatedEvent { /** * Identifier of the frame containing document whose application cache updated status. */ frameId: Page.FrameId; /** * Manifest URL. */ manifestURL: string; /** * Updated application cache status. */ status: integer; } export interface NetworkStateUpdatedEvent { isNowOnline: boolean; } } /** * 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 enum SameSiteCookieExclusionReason { ExcludeSameSiteUnspecifiedTreatedAsLax = 'ExcludeSameSiteUnspecifiedTreatedAsLax', ExcludeSameSiteNoneInsecure = 'ExcludeSameSiteNoneInsecure', ExcludeSameSiteLax = 'ExcludeSameSiteLax', ExcludeSameSiteStrict = 'ExcludeSameSiteStrict', } export enum SameSiteCookieWarningReason { WarnSameSiteUnspecifiedCrossSiteContext = 'WarnSameSiteUnspecifiedCrossSiteContext', WarnSameSiteNoneInsecure = 'WarnSameSiteNoneInsecure', WarnSameSiteUnspecifiedLaxAllowUnsafe = 'WarnSameSiteUnspecifiedLaxAllowUnsafe', WarnSameSiteStrictLaxDowngradeStrict = 'WarnSameSiteStrictLaxDowngradeStrict', WarnSameSiteStrictCrossDowngradeStrict = 'WarnSameSiteStrictCrossDowngradeStrict', WarnSameSiteStrictCrossDowngradeLax = 'WarnSameSiteStrictCrossDowngradeLax', WarnSameSiteLaxCrossDowngradeStrict = 'WarnSameSiteLaxCrossDowngradeStrict', WarnSameSiteLaxCrossDowngradeLax = 'WarnSameSiteLaxCrossDowngradeLax', } export enum SameSiteCookieOperation { 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 SameSiteCookieIssueDetails { cookie: AffectedCookie; cookieWarningReasons: SameSiteCookieWarningReason[]; cookieExclusionReasons: SameSiteCookieExclusionReason[]; /** * Optionally identifies the site-for-cookies and the cookie url, which * may be used by the front-end as additional context. */ operation: SameSiteCookieOperation; siteForCookies?: string; cookieUrl?: string; request?: AffectedRequest; } export enum MixedContentResolutionStatus { MixedContentBlocked = 'MixedContentBlocked', MixedContentAutomaticallyUpgraded = 'MixedContentAutomaticallyUpgraded', MixedContentWarning = 'MixedContentWarning', } export enum MixedContentResourceType { 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 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 enum HeavyAdResolutionStatus { HeavyAdBlocked = 'HeavyAdBlocked', HeavyAdWarning = 'HeavyAdWarning', } export 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 enum ContentSecurityPolicyViolationType { KInlineViolation = 'kInlineViolation', KEvalViolation = 'kEvalViolation', KURLViolation = 'kURLViolation', KTrustedTypesSinkViolation = 'kTrustedTypesSinkViolation', KTrustedTypesPolicyViolation = 'kTrustedTypesPolicyViolation', } 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 enum SharedArrayBufferIssueType { TransferIssue = 'TransferIssue', CreationIssue = 'CreationIssue', } /** * Details for a issue arising from an SAB being instantiated in, or * transfered to a context that is not cross-origin isolated. */ export interface SharedArrayBufferIssueDetails { sourceCodeLocation: SourceCodeLocation; isWarning: boolean; type: SharedArrayBufferIssueType; } export enum TwaQualityEnforcementViolationType { KHttpError = 'kHttpError', KUnavailableOffline = 'kUnavailableOffline', KDigitalAssetLinks = 'kDigitalAssetLinks', } export interface TrustedWebActivityIssueDetails { /** * The url that triggers the violation. */ url: string; violationType: TwaQualityEnforcementViolationType; httpStatusCode?: integer; /** * The package name of the Trusted Web Activity client app. This field is * only used when violation type is kDigitalAssetLinks. */ packageName?: string; /** * The signature of the Trusted Web Activity client app. This field is only * used when violation type is kDigitalAssetLinks. */ signature?: string; } 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; resourceIPAddressSpace?: Network.IPAddressSpace; clientSecurityState?: Network.ClientSecurityState; } /** * 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 enum InspectorIssueCode { SameSiteCookieIssue = 'SameSiteCookieIssue', MixedContentIssue = 'MixedContentIssue', BlockedByResponseIssue = 'BlockedByResponseIssue', HeavyAdIssue = 'HeavyAdIssue', ContentSecurityPolicyIssue = 'ContentSecurityPolicyIssue', SharedArrayBufferIssue = 'SharedArrayBufferIssue', TrustedWebActivityIssue = 'TrustedWebActivityIssue', LowTextContrastIssue = 'LowTextContrastIssue', CorsIssue = 'CorsIssue', } /** * 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 { sameSiteCookieIssueDetails?: SameSiteCookieIssueDetails; mixedContentIssueDetails?: MixedContentIssueDetails; blockedByResponseIssueDetails?: BlockedByResponseIssueDetails; heavyAdIssueDetails?: HeavyAdIssueDetails; contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails; sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails; twaQualityEnforcementDetails?: TrustedWebActivityIssueDetails; lowTextContrastIssueDetails?: LowTextContrastIssueDetails; corsIssueDetails?: CorsIssueDetails; } /** * An inspector issue reported from the back-end. */ export interface InspectorIssue { code: InspectorIssueCode; details: InspectorIssueDetails; } export 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 IssueAddedEvent { issue: InspectorIssue; } } /** * 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 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[]; } 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 = string; export type WindowID = integer; /** * The state of the browser window. */ export 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 enum PermissionType { AccessibilityEvents = 'accessibilityEvents', AudioCapture = 'audioCapture', BackgroundSync = 'backgroundSync', BackgroundFetch = 'backgroundFetch', ClipboardReadWrite = 'clipboardReadWrite', ClipboardSanitizedWrite = 'clipboardSanitizedWrite', DisplayCapture = 'displayCapture', DurableStorage = 'durableStorage', Flash = 'flash', Geolocation = 'geolocation', Midi = 'midi', MidiSysex = 'midiSysex', Nfc = 'nfc', Notifications = 'notifications', PaymentHandler = 'paymentHandler', PeriodicBackgroundSync = 'periodicBackgroundSync', ProtectedMediaIdentifier = 'protectedMediaIdentifier', Sensors = 'sensors', VideoCapture = 'videoCapture', VideoCapturePanTiltZoom = 'videoCapturePanTiltZoom', IdleDetection = 'idleDetection', WakeLockScreen = 'wakeLockScreen', WakeLockSystem = 'wakeLockSystem', } export 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 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 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 requred if behavior is set to 'allow' * or 'allowAndName'. */ downloadPath?: string; } 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 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 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; } } /** * 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 = string; /** * Stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent * stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via * inspector" rules), "regular" for regular stylesheets. */ export enum StyleSheetOrigin { Injected = 'injected', UserAgent = 'user-agent', Inspector = 'inspector', Regular = 'regular', } /** * CSS rule collection for a single pseudo style. */ export interface PseudoElementMatches { /** * Pseudo element type. */ pseudoType: DOM.PseudoType; /** * Matches of CSS rules applicable to the pseudo style. */ matches: RuleMatch[]; } /** * Inherited CSS rule collection from ancestor node. */ export interface InheritedStyleEntry { /** * The ancestor node's inline style, if any, in the style inheritance chain. */ inlineStyle?: CSSStyle; /** * Matches of CSS rules matching the ancestor node in the style inheritance chain. */ matchedCSSRules: RuleMatch[]; } /** * Match data for a CSS rule. */ export interface RuleMatch { /** * CSS rule in the match. */ rule: CSSRule; /** * Matching selector indices in the rule's selectorList selectors (0-based). */ matchingSelectors: integer[]; } /** * Data for a simple selector (these are delimited by commas in a selector list). */ export interface Value { /** * Value text. */ text: string; /** * Value range in the underlying resource (if available). */ range?: SourceRange; } /** * Selector list data. */ export interface SelectorList { /** * Selectors in the list. */ selectors: Value[]; /** * Rule selector text. */ text: string; } /** * CSS stylesheet metainformation. */ export interface CSSStyleSheetHeader { /** * The stylesheet identifier. */ styleSheetId: StyleSheetId; /** * Owner frame identifier. */ frameId: Page.FrameId; /** * Stylesheet resource URL. */ sourceURL: string; /** * URL of source map associated with the stylesheet (if any). */ sourceMapURL?: string; /** * Stylesheet origin. */ origin: StyleSheetOrigin; /** * Stylesheet title. */ title: string; /** * The backend id for the owner node of the stylesheet. */ ownerNode?: DOM.BackendNodeId; /** * Denotes whether the stylesheet is disabled. */ disabled: boolean; /** * Whether the sourceURL field value comes from the sourceURL comment. */ hasSourceURL?: boolean; /** * Whether this stylesheet is created for STYLE tag by parser. This flag is not set for * document.written STYLE tags. */ isInline: boolean; /** * Whether this stylesheet is mutable. Inline stylesheets become mutable * after they have been modified via CSSOM API. * <link> element's stylesheets become mutable only if DevTools modifies them. * Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation. */ isMutable: boolean; /** * Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()). */ isConstructed: boolean; /** * Line offset of the stylesheet within the resource (zero based). */ startLine: number; /** * Column offset of the stylesheet within the resource (zero based). */ startColumn: number; /** * Size of the content (in characters). */ length: number; /** * Line offset of the end of the stylesheet within the resource (zero based). */ endLine: number; /** * Column offset of the end of the stylesheet within the resource (zero based). */ endColumn: number; } /** * CSS rule representation. */ export interface CSSRule { /** * The css style sheet identifier (absent for user agent stylesheet and user-specified * stylesheet rules) this rule came from. */ styleSheetId?: StyleSheetId; /** * Rule selector data. */ selectorList: SelectorList; /** * Parent stylesheet's origin. */ origin: StyleSheetOrigin; /** * Associated style declaration. */ style: CSSStyle; /** * Media list array (for rules involving media queries). The array enumerates media queries * starting with the innermost one, going outwards. */ media?: CSSMedia[]; } /** * CSS coverage information. */ export interface RuleUsage { /** * The css style sheet identifier (absent for user agent stylesheet and user-specified * stylesheet rules) this rule came from. */ styleSheetId: StyleSheetId; /** * Offset of the start of the rule (including selector) from the beginning of the stylesheet. */ startOffset: number; /** * Offset of the end of the rule body from the beginning of the stylesheet. */ endOffset: number; /** * Indicates whether the rule was actually used by some element in the page. */ used: boolean; } /** * Text range within a resource. All numbers are zero-based. */ export interface SourceRange { /** * Start line of range. */ startLine: integer; /** * Start column of range (inclusive). */ startColumn: integer; /** * End line of range */ endLine: integer; /** * End column of range (exclusive). */ endColumn: integer; } export interface ShorthandEntry { /** * Shorthand name. */ name: string; /** * Shorthand value. */ value: string; /** * Whether the property has "!important" annotation (implies `false` if absent). */ important?: boolean; } export interface CSSComputedStyleProperty { /** * Computed style property name. */ name: string; /** * Computed style property value. */ value: string; } /** * CSS style representation. */ export interface CSSStyle { /** * The css style sheet identifier (absent for user agent stylesheet and user-specified * stylesheet rules) this rule came from. */ styleSheetId?: StyleSheetId; /** * CSS properties in the style. */ cssProperties: CSSProperty[]; /** * Computed values for all shorthands found in the style. */ shorthandEntries: ShorthandEntry[]; /** * Style declaration text (if available). */ cssText?: string; /** * Style declaration range in the enclosing stylesheet (if available). */ range?: SourceRange; } /** * CSS property declaration data. */ export interface CSSProperty { /** * The property name. */ name: string; /** * The property value. */ value: string; /** * Whether the property has "!important" annotation (implies `false` if absent). */ important?: boolean; /** * Whether the property is implicit (implies `false` if absent). */ implicit?: boolean; /** * The full property text as specified in the style. */ text?: string; /** * Whether the property is understood by the browser (implies `true` if absent). */ parsedOk?: boolean; /** * Whether the property is disabled by the user (present for source-based properties only). */ disabled?: boolean; /** * The entire property range in the enclosing style declaration (if available). */ range?: SourceRange; } export enum CSSMediaSource { MediaRule = 'mediaRule', ImportRule = 'importRule', LinkedSheet = 'linkedSheet', InlineSheet = 'inlineSheet', } /** * CSS media rule descriptor. */ export interface CSSMedia { /** * Media query text. */ text: string; /** * Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if * specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked * stylesheet's LINK tag, "inlineShee