// This is generated from /utils/protocol-types-generator/index.js
type binary = string;
export module Protocol {
/**
* Domain for tracking/modifying Web Animations, as well as CSS (declarative) animations and transitions.
*/
export module Animation {
/**
* Unique Web Animation identifier.
*/
export type AnimationId = string;
export type AnimationState = "ready"|"delayed"|"active"|"canceled"|"done";
export type PlaybackDirection = "normal"|"reverse"|"alternate"|"alternate-reverse";
export type FillMode = "none"|"forwards"|"backwards"|"both"|"auto";
export interface Animation {
animationId: AnimationId;
/**
* Equal to `Animation.prototype.get id`.
*/
name?: string;
/**
* Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided.
*/
cssAnimationName?: string;
/**
* Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided.
*/
cssTransitionProperty?: string;
effect?: Effect;
/**
* Backtrace that was captured when this `WebAnimation` was created.
*/
stackTrace?: Console.StackTrace;
}
export interface Effect {
startDelay?: number;
endDelay?: number;
/**
* Number of iterations in the animation. Infinity
is represented as -1
.
*/
iterationCount?: number;
/**
* Index of which iteration to start at.
*/
iterationStart?: number;
/**
* Total time of each iteration, measured in milliseconds.
*/
iterationDuration?: number;
/**
* CSS timing function of the overall animation.
*/
timingFunction?: string;
playbackDirection?: PlaybackDirection;
fillMode?: FillMode;
keyframes?: Keyframe[];
}
export interface Keyframe {
/**
* Decimal percentage [0,1] representing where this keyframe is in the entire duration of the animation.
*/
offset: number;
/**
* CSS timing function for how the `style` is applied.
*/
easing?: string;
/**
* CSS style declaration of the CSS properties that will be animated.
*/
style?: string;
}
export interface TrackingUpdate {
trackingAnimationId: AnimationId;
animationState: AnimationState;
nodeId?: DOM.NodeId;
/**
* Equal to the corresponding `animation-name` CSS property. Should not be provided if `transitionProperty` is also provided.
*/
animationName?: string;
/**
* Equal to the corresponding `transition-property` CSS property. Should not be provided if `animationName` is also provided.
*/
transitionProperty?: string;
}
/**
* Dispatched whenever a `WebAnimation` is created.
*/
export type animationCreatedPayload = {
animation: Animation;
}
/**
* Dispatched whenever `Animation.prototype.set id` is called.
*/
export type nameChangedPayload = {
animationId: AnimationId;
/**
* Equal to `Animation.prototype.get id`.
*/
name?: string;
}
/**
* Dispatched whenever the effect of any animation is changed in any way.
*/
export type effectChangedPayload = {
animationId: AnimationId;
/**
* This is omitted when the effect is removed without a replacement.
*/
effect?: Effect;
}
/**
* Dispatched whenever the target of any effect of any animation is changed in any way.
*/
export type targetChangedPayload = {
animationId: AnimationId;
}
/**
* Dispatched whenever a `WebAnimation` is destroyed.
*/
export type animationDestroyedPayload = {
animationId: AnimationId;
}
/**
* Dispatched after `startTracking` command.
*/
export type trackingStartPayload = {
timestamp: number;
}
/**
* Fired for each phase of Web Animation.
*/
export type trackingUpdatePayload = {
timestamp: number;
event: TrackingUpdate;
}
/**
* Dispatched after `stopTracking` command.
*/
export type trackingCompletePayload = {
timestamp: number;
}
/**
* Enables Canvas domain events.
*/
export type enableParameters = {
}
export type enableReturnValue = {
}
/**
* Disables Canvas domain events.
*/
export type disableParameters = {
}
export type disableReturnValue = {
}
/**
* Gets the `DOM.NodeId` for the target of the effect of the animation with the given `AnimationId`.
*/
export type requestEffectTargetParameters = {
animationId: AnimationId;
}
export type requestEffectTargetReturnValue = {
effectTarget: DOM.Styleable;
}
/**
* Resolves JavaScript `WebAnimation` object for given `AnimationId`.
*/
export type resolveAnimationParameters = {
animationId: AnimationId;
/**
* Symbolic group name that can be used to release multiple objects.
*/
objectGroup?: string;
}
export type resolveAnimationReturnValue = {
object: Runtime.RemoteObject;
}
/**
* Start tracking animations. This will produce a `trackingStart` event.
*/
export type startTrackingParameters = {
}
export type startTrackingReturnValue = {
}
/**
* Stop tracking animations. This will produce a `trackingComplete` event.
*/
export type stopTrackingParameters = {
}
export type stopTrackingReturnValue = {
}
}
export module ApplicationCache {
/**
* Detailed application cache resource information.
*/
export interface ApplicationCacheResource {
/**
* Resource url.
*/
url: string;
/**
* Resource size.
*/
size: number;
/**
* 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: Network.FrameId;
/**
* Manifest URL.
*/
manifestURL: string;
/**
* Application cache status.
*/
status: number;
}
export type applicationCacheStatusUpdatedPayload = {
/**
* Identifier of the frame containing document whose application cache updated status.
*/
frameId: Network.FrameId;
/**
* Manifest URL.
*/
manifestURL: string;
/**
* Updated application cache status.
*/
status: number;
}
export type networkStateUpdatedPayload = {
isNowOnline: boolean;
}
/**
* Returns array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
*/
export type getFramesWithManifestsParameters = {
}
export type getFramesWithManifestsReturnValue = {
/**
* Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
*/
frameIds: FrameWithManifest[];
}
/**
* Enables application cache domain notifications.
*/
export type enableParameters = {
}
export type enableReturnValue = {
}
/**
* Disable application cache domain notifications.
*/
export type disableParameters = {
}
export type disableReturnValue = {
}
/**
* Returns manifest URL for document in the given frame.
*/
export type getManifestForFrameParameters = {
/**
* Identifier of the frame containing document whose manifest is retrieved.
*/
frameId: Network.FrameId;
}
export type getManifestForFrameReturnValue = {
/**
* Manifest URL for document in the given frame.
*/
manifestURL: string;
}
/**
* Returns relevant application cache data for the document in given frame.
*/
export type getApplicationCacheForFrameParameters = {
/**
* Identifier of the frame containing document whose application cache is retrieved.
*/
frameId: Network.FrameId;
}
export type getApplicationCacheForFrameReturnValue = {
/**
* Relevant application cache data for the document in given frame.
*/
applicationCache: ApplicationCache;
}
}
export module Audit {
/**
* Creates the `WebInspectorAudit` object that is passed to run. Must call teardown before calling setup more than once.
*/
export type setupParameters = {
/**
* Specifies in which isolated context to run the test. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
*/
contextId?: Runtime.ExecutionContextId;
}
export type setupReturnValue = {
}
/**
* Parses and evaluates the given test string and sends back the result. Returned values are saved to the "audit" object group. Call setup before and teardown after if the `WebInspectorAudit` object should be passed into the test.
*/
export type runParameters = {
/**
* Test string to parse and evaluate.
*/
test: string;
/**
* Specifies in which isolated context to run the test. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page.
*/
contextId?: Runtime.ExecutionContextId;
}
export type runReturnValue = {
/**
* Evaluation result.
*/
result: Runtime.RemoteObject;
/**
* True if the result was thrown during the evaluation.
*/
wasThrown?: boolean;
}
/**
* Destroys the `WebInspectorAudit` object that is passed to run. Must call setup before calling teardown.
*/
export type teardownParameters = {
}
export type teardownReturnValue = {
}
}
/**
* The Browser domain contains commands and events related to getting information about the browser
*/
export module Browser {
/**
* Unique extension identifier.
*/
export type ExtensionId = string;
/**
* Information about an extension.
*/
export interface Extension {
/**
* Extension identifier.
*/
extensionId: ExtensionId;
/**
* The display name for the extension.
*/
name: string;
}
export type extensionsEnabledPayload = {
/**
* Information about the enabled extensions.
*/
extensions: Extension[];
}
export type extensionsDisabledPayload = {
/**
* Disabled extension identifiers.
*/
extensionIds: ExtensionId[];
}
/**
* Enables Browser domain events.
*/
export type enableParameters = {
}
export type enableReturnValue = {
}
/**
* Disables Browser domain events.
*/
export type disableParameters = {
}
export type disableReturnValue = {
}
}
/**
* CPUProfiler domain exposes cpu usage tracking.
*/
export module CPUProfiler {
/**
* CPU usage for an individual thread.
*/
export interface ThreadInfo {
/**
* Some thread identification information.
*/
name: string;
/**
* CPU usage for this thread. This should not exceed 100% for an individual thread.
*/
usage: number;
/**
* Type of thread. There should be a single main thread.
*/
type?: "main"|"webkit";
/**
* A thread may be associated with a target, such as a Worker, in the process.
*/
targetId?: string;
}
export interface Event {
timestamp: number;
/**
* Percent of total cpu usage. If there are multiple cores the usage may be greater than 100%.
*/
usage: number;
/**
* Per-thread CPU usage information. Does not include the main thread.
*/
threads?: ThreadInfo[];
}
/**
* Tracking started.
*/
export type trackingStartPayload = {
timestamp: number;
}
/**
* Periodic tracking updates with event data.
*/
export type trackingUpdatePayload = {
event: Event;
}
/**
* Tracking stopped.
*/
export type trackingCompletePayload = {
timestamp: number;
}
/**
* Start tracking cpu usage.
*/
export type startTrackingParameters = {
}
export type startTrackingReturnValue = {
}
/**
* Stop tracking cpu usage. This will produce a `trackingComplete` event.
*/
export type stopTrackingParameters = {
}
export type stopTrackingReturnValue = {
}
}
/**
* This domain exposes CSS read/write operations. All CSS objects, like 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). Alternatively, a client can discover all the existing stylesheets with the getAllStyleSheets()
method and subsequently load the required stylesheet contents using the getStyleSheet[Text]()
methods.
*/
export module CSS {
export type StyleSheetId = string;
/**
* This object identifies a CSS style in a unique way.
*/
export interface CSSStyleId {
/**
* Enclosing stylesheet identifier.
*/
styleSheetId: StyleSheetId;
/**
* The style ordinal within the stylesheet.
*/
ordinal: number;
}
/**
* Stylesheet type: "user" for user stylesheets, "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 type StyleSheetOrigin = "user"|"user-agent"|"author"|"inspector";
/**
* This object identifies a CSS rule in a unique way.
*/
export interface CSSRuleId {
/**
* Enclosing stylesheet identifier.
*/
styleSheetId: StyleSheetId;
/**
* The rule ordinal within the stylesheet.
*/
ordinal: number;
}
/**
* Pseudo-style identifier (see enum PseudoId
in RenderStyleConstants.h
).
*/
export type PseudoId = "first-line"|"first-letter"|"grammar-error"|"highlight"|"marker"|"before"|"after"|"selection"|"backdrop"|"spelling-error"|"target-text"|"view-transition"|"view-transition-group"|"view-transition-image-pair"|"view-transition-old"|"view-transition-new"|"-webkit-scrollbar"|"-webkit-resizer"|"-webkit-scrollbar-thumb"|"-webkit-scrollbar-button"|"-webkit-scrollbar-track"|"-webkit-scrollbar-track-piece"|"-webkit-scrollbar-corner";
/**
* Pseudo-style identifier (see enum PseudoId
in RenderStyleConstants.h
).
*/
export type ForceablePseudoClass = "active"|"focus"|"focus-visible"|"focus-within"|"hover"|"target"|"visited";
/**
* CSS rule collection for a single pseudo style.
*/
export interface PseudoIdMatches {
pseudoId: PseudoId;
/**
* Matches of CSS rules applicable to the pseudo style.
*/
matches: RuleMatch[];
}
/**
* CSS rule collection for a single pseudo style.
*/
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: number[];
}
/**
* CSS selector.
*/
export interface CSSSelector {
/**
* Canonicalized selector text.
*/
text: string;
/**
* Specificity (a, b, c) tuple. Included if the selector is sent in response to CSS.getMatchedStylesForNode which provides a context element.
*/
specificity?: number[];
/**
* Whether or not the specificity can be dynamic. Included if the selector is sent in response to CSS.getMatchedStylesForNode which provides a context element.
*/
dynamic?: boolean;
}
/**
* Selector list data.
*/
export interface SelectorList {
/**
* Selectors in the list.
*/
selectors: CSSSelector[];
/**
* Rule selector text.
*/
text: string;
/**
* Rule selector range in the underlying resource (if available).
*/
range?: SourceRange;
}
/**
* CSS style information for a DOM style attribute.
*/
export interface CSSStyleAttribute {
/**
* DOM attribute name (e.g. "width").
*/
name: string;
/**
* CSS style generated by the respective DOM attribute.
*/
style: CSSStyle;
}
/**
* CSS stylesheet meta-information.
*/
export interface CSSStyleSheetHeader {
/**
* The stylesheet identifier.
*/
styleSheetId: StyleSheetId;
/**
* Owner frame identifier.
*/
frameId: Network.FrameId;
/**
* Stylesheet resource URL.
*/
sourceURL: string;
/**
* Stylesheet origin.
*/
origin: StyleSheetOrigin;
/**
* Stylesheet title.
*/
title: string;
/**
* Denotes whether the stylesheet is disabled.
*/
disabled: boolean;
/**
* Whether this stylesheet is a