Skip to content
Snippets Groups Projects
browser_protocol.json 271 KiB
Newer Older
  • Learn to ignore specific revisions
  •                     { "name": "boundingBox", "$ref": "DOM.Rect", "description": "The absolute position bounding box." },
                        { "name": "startCharacterIndex", "type": "integer", "description": "The starting index in characters, for this post layout textbox substring." },
                        { "name": "numCharacters", "type": "integer", "description": "The number of characters in this post layout textbox substring." }
                    ],
                    "description": "Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.",
                    "experimental": true
                },
                {
                    "id": "LayoutTreeNode",
                    "type": "object",
                    "properties": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The id of the related DOM node matching one from DOM.GetDocument." },
                        { "name": "boundingBox", "$ref": "DOM.Rect", "description": "The absolute position bounding box." },
                        { "name": "layoutText", "type": "string", "optional": true, "description": "Contents of the LayoutText if any" },
                        { "name": "inlineTextNodes", "type": "array", "optional": true, "items": { "$ref": "InlineTextBox" }, "description": "The post layout inline text nodes, if any." },
                        { "name": "styleIndex", "type": "integer", "optional": true, "description": "Index into the computedStyles array returned by getLayoutTreeAndStyles." }
                    ],
                    "description": "Details of an element in the DOM tree with a LayoutObject.",
                    "experimental": true
                },
                {
                    "id": "ComputedStyle",
                    "type": "object",
                    "properties": [
                        { "name": "properties", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" } }
                    ],
                    "description": "A subset of the full ComputedStyle as defined by the request whitelist.",
                    "experimental": true
    
                }
            ],
            "commands": [
                {
                    "name": "enable",
                    "description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received."
                },
                {
                    "name": "disable",
                    "description": "Disables the CSS agent for the given page."
                },
                {
                    "name": "getMatchedStylesForNode",
                    "parameters": [
    
                        { "name": "nodeId", "$ref": "DOM.NodeId" }
    
                        { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." },
                        { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."},
    
                        { "name": "matchedCSSRules", "type": "array", "items": { "$ref": "RuleMatch" }, "optional": true, "description": "CSS rules matching this node, from all applicable stylesheets." },
    
                        { "name": "pseudoElements", "type": "array", "items": { "$ref": "PseudoElementMatches" }, "optional": true, "description": "Pseudo style matches for this node." },
                        { "name": "inherited", "type": "array", "items": { "$ref": "InheritedStyleEntry" }, "optional": true, "description": "A chain of inherited styles (from the immediate node parent up to the DOM tree root)." },
                        { "name": "cssKeyframesRules", "type": "array", "items": { "$ref": "CSSKeyframesRule" }, "optional": true, "description": "A list of CSS keyframed animations matching this node." }
    
                    ],
                    "description": "Returns requested styles for a DOM node identified by <code>nodeId</code>."
                },
                {
                    "name": "getInlineStylesForNode",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId" }
                    ],
                    "returns": [
                        { "name": "inlineStyle", "$ref": "CSSStyle", "optional": true, "description": "Inline style for the specified DOM node." },
                        { "name": "attributesStyle", "$ref": "CSSStyle", "optional": true, "description": "Attribute-defined element style (e.g. resulting from \"width=20 height=100%\")."}
                    ],
                    "description": "Returns the styles defined inline (explicitly in the \"style\" attribute and implicitly, using DOM attributes) for a DOM node identified by <code>nodeId</code>."
                },
                {
                    "name": "getComputedStyleForNode",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId" }
                    ],
                    "returns": [
                        { "name": "computedStyle", "type": "array", "items": { "$ref": "CSSComputedStyleProperty" }, "description": "Computed style for the specified DOM node." }
                    ],
                    "description": "Returns the computed style for a DOM node identified by <code>nodeId</code>."
                },
                {
                    "name": "getPlatformFontsForNode",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId" }
                    ],
                    "returns": [
                        { "name": "fonts", "type": "array", "items": { "$ref": "PlatformFontUsage" }, "description": "Usage statistics for every employed platform font." }
                    ],
                    "description": "Requests information about platform fonts which we used to render child TextNodes in the given node.",
    
                    "experimental": true
    
                },
                {
                    "name": "getStyleSheetText",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" }
                    ],
                    "returns": [
                        { "name": "text", "type": "string", "description": "The stylesheet text." }
                    ],
                    "description": "Returns the current textual content and the URL for a stylesheet."
                },
                {
    
                    "name": "collectClassNames",
    
                        { "name": "styleSheetId", "$ref": "StyleSheetId" }
    
                    "returns": [
                        {"name": "classNames", "type": "array", "items": { "type": "string" }, "description": "Class name list." }
                    ],
                    "description": "Returns all class names from specified stylesheet.",
                    "experimental": true
    
                    "name": "setStyleSheetText",
    
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" },
                        { "name": "text", "type": "string" }
                    ],
                    "returns": [
    
                        { "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with script (if any)." }
    
                    "description": "Sets the new stylesheet text."
    
                },
                {
                    "name": "setRuleSelector",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" },
                        { "name": "range", "$ref": "SourceRange" },
                        { "name": "selector", "type": "string" }
                    ],
                    "returns": [
    
                        { "name": "selectorList", "$ref": "SelectorList", "description": "The resulting selector list after modification." }
    
                    ],
                    "description": "Modifies the rule selector."
                },
    
                {
                    "name": "setKeyframeKey",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" },
                        { "name": "range", "$ref": "SourceRange" },
                        { "name": "keyText", "type": "string" }
                    ],
                    "returns": [
                        { "name": "keyText", "$ref": "Value", "description": "The resulting key text after modification." }
                    ],
                    "description": "Modifies the keyframe rule key text."
                },
                {
                    "name": "setStyleTexts",
                    "parameters": [
                        { "name": "edits", "type": "array", "items": { "$ref": "StyleDeclarationEdit" }}
                    ],
                    "returns": [
                        { "name": "styles", "type": "array", "items": { "$ref": "CSSStyle" }, "description": "The resulting styles after modification." }
                    ],
                    "description": "Applies specified style edits one after another in the given order."
                },
    
                {
                    "name": "setMediaText",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" },
                        { "name": "range", "$ref": "SourceRange" },
                        { "name": "text", "type": "string" }
                    ],
                    "returns": [
                        { "name": "media", "$ref": "CSSMedia", "description": "The resulting CSS media rule after modification." }
                    ],
                    "description": "Modifies the rule selector."
                },
                {
                    "name": "createStyleSheet",
                    "parameters": [
                        { "name": "frameId", "$ref": "Page.FrameId", "description": "Identifier of the frame where \"via-inspector\" stylesheet should be created."}
                    ],
                    "returns": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the created \"via-inspector\" stylesheet." }
                    ],
                    "description": "Creates a new special \"via-inspector\" stylesheet in the frame with given <code>frameId</code>."
                },
                {
                    "name": "addRule",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "The css style sheet identifier where a new rule should be inserted." },
                        { "name": "ruleText", "type": "string", "description": "The text of a new rule." },
                        { "name": "location", "$ref": "SourceRange", "description": "Text position of a new rule in the target style sheet." }
                    ],
                    "returns": [
                        { "name": "rule", "$ref": "CSSRule", "description": "The newly created rule." }
                    ],
                    "description": "Inserts a new rule with the given <code>ruleText</code> in a stylesheet with given <code>styleSheetId</code>, at the position specified by <code>location</code>."
                },
                {
                    "name": "forcePseudoState",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to force the pseudo state." },
                        { "name": "forcedPseudoClasses", "type": "array", "items": { "type": "string", "enum": ["active", "focus", "hover", "visited"] }, "description": "Element pseudo classes to force when computing the element's style." }
                    ],
                    "description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
                },
                {
                    "name": "getMediaQueries",
                    "returns": [
                        { "name": "medias", "type": "array", "items": { "$ref": "CSSMedia" } }
                    ],
                    "description": "Returns all media queries parsed by the rendering engine.",
    
                    "experimental": true
                },
                {
                    "name": "setEffectivePropertyValueForNode",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "The element id for which to set property." },
                        { "name": "propertyName", "type": "string"},
                        { "name": "value", "type": "string"}
                    ],
                    "description": "Find a rule with the given active property for the given node and set the new value for this property",
                    "experimental": true
                },
                {
                    "name": "getBackgroundColors",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Id of the node to get background colors for." }
                    ],
                    "returns": [
                        { "name": "backgroundColors", "type": "array", "items": { "type": "string" }, "description": "The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).", "optional": true }
                    ],
                    "experimental": true
                },
                {
                    "name": "getLayoutTreeAndStyles",
                    "parameters": [
                        { "name": "computedStyleWhitelist", "type": "array", "items": { "type": "string" }, "description": "Whitelist of computed styles to return." }
                    ],
                    "returns": [
                        { "name": "layoutTreeNodes", "type": "array", "items": { "$ref": "LayoutTreeNode" } },
                        { "name": "computedStyles", "type": "array", "items": { "$ref": "ComputedStyle" } }
                    ],
                    "description": "For the main document and any content documents, return the LayoutTreeNodes and a whitelisted subset of the computed style. It only returns pushed nodes, on way to pull all nodes is to call DOM.getDocument with a depth of -1.",
                    "experimental": true
    
    svatal's avatar
    svatal committed
                },
    
                {
                    "name": "startRuleUsageTracking",
                    "description": "Enables the selector recording.",
                    "experimental": true
                },
    
    svatal's avatar
    svatal committed
                {
                    "name": "takeCoverageDelta",
                    "description": "Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation)",
                    "returns": [
                        { "name": "coverage", "type": "array", "items": { "$ref": "RuleUsage" } }
                    ],
                    "experimental": true
                },
    
                {
                    "name": "stopRuleUsageTracking",
                    "returns": [
                        { "name": "ruleUsage", "type": "array", "items": { "$ref": "RuleUsage" } }
                    ],
                    "description": "The list of rules with an indication of whether these were used",
                    "experimental": true
    
                }
            ],
            "events": [
                {
                    "name": "mediaQueryResultChanged",
                    "description": "Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features."
                },
    
                {
                    "name": "fontsUpdated",
                    "description": "Fires whenever a web font gets loaded."
                },
    
                {
                    "name": "styleSheetChanged",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId" }
                    ],
                    "description": "Fired whenever a stylesheet is changed as a result of the client operation."
                },
                {
                    "name": "styleSheetAdded",
                    "parameters": [
                        { "name": "header", "$ref": "CSSStyleSheetHeader", "description": "Added stylesheet metainfo." }
                    ],
                    "description": "Fired whenever an active document stylesheet is added."
                },
                {
                    "name": "styleSheetRemoved",
                    "parameters": [
                        { "name": "styleSheetId", "$ref": "StyleSheetId", "description": "Identifier of the removed stylesheet." }
                    ],
                    "description": "Fired whenever an active document stylesheet is removed."
                }
            ]
        },
        {
    
            "domain": "IO",
            "description": "Input/Output operations for streams produced by DevTools.",
            "experimental": true,
    
                    "id": "StreamHandle",
                    "type": "string"
    
                    "name": "read",
                    "description": "Read a chunk of the stream",
    
                        { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to read." },
                        { "name": "offset", "type": "integer", "optional": true, "description": "Seek to the specified offset before reading (if not specificed, proceed with offset following the last read)." },
                        { "name": "size", "type": "integer", "optional": true,  "description": "Maximum number of bytes to read (left upon the agent discretion if not specified)." }
    
                    "returns": [
                        { "name": "data", "type": "string", "description": "Data that were read." },
                        { "name": "eof", "type": "boolean", "description": "Set if the end-of-file condition occured while reading." }
                    ]
    
                    "name": "close",
                    "description": "Close the stream, discard any temporary backing storage.",
    
                        { "name": "handle", "$ref": "StreamHandle", "description": "Handle of the stream to close." }
                    ]
    
            "domain": "DOMDebugger",
            "description": "DOM debugging allows setting breakpoints on particular DOM operations and events. JavaScript execution will stop on these operations as if there was a regular breakpoint set.",
            "dependencies": ["DOM", "Debugger"],
    
                    "id": "DOMBreakpointType",
    
                    "enum": ["subtree-modified", "attribute-modified", "node-removed"],
                    "description": "DOM breakpoint type."
    
                    "id": "EventListener",
    
                    "description": "Object event listener.",
    
                        { "name": "type", "type": "string", "description": "<code>EventListener</code>'s type." },
                        { "name": "useCapture", "type": "boolean", "description": "<code>EventListener</code>'s useCapture." },
                        { "name": "passive", "type": "boolean", "description": "<code>EventListener</code>'s passive flag." },
                        { "name": "once", "type": "boolean", "description": "<code>EventListener</code>'s once flag." },
                        { "name": "scriptId", "$ref": "Runtime.ScriptId", "description": "Script id of the handler code." },
    
                        { "name": "lineNumber", "type": "integer", "description": "Line number in the script (0-based)." },
    
                        { "name": "columnNumber", "type": "integer", "description": "Column number in the script (0-based)." },
                        { "name": "handler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event handler function value." },
                        { "name": "originalHandler", "$ref": "Runtime.RemoteObject", "optional": true, "description": "Event original handler function value." },
                        { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "Node the listener is added to (if any)." }
                    ],
                    "experimental": true
                }
            ],
            "commands": [
                {
                    "name": "setDOMBreakpoint",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to set breakpoint on." },
                        { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the operation to stop upon." }
    
                    "description": "Sets breakpoint on particular operation with DOM."
    
                    "name": "removeDOMBreakpoint",
                    "parameters": [
                        { "name": "nodeId", "$ref": "DOM.NodeId", "description": "Identifier of the node to remove breakpoint from." },
                        { "name": "type", "$ref": "DOMBreakpointType", "description": "Type of the breakpoint to remove." }
    
                    "description": "Removes DOM breakpoint that was set using <code>setDOMBreakpoint</code>."
    
                    "name": "setEventListenerBreakpoint",
                    "parameters": [
                        { "name": "eventName", "type": "string", "description": "DOM Event name to stop on (any DOM event will do)." },
                        { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name to stop on. If equal to <code>\"*\"</code> or not provided, will stop on any EventTarget.", "experimental": true }
    
                    "description": "Sets breakpoint on particular DOM event."
    
                    "name": "removeEventListenerBreakpoint",
                    "parameters": [
                        { "name": "eventName", "type": "string", "description": "Event name." },
                        { "name": "targetName", "type": "string", "optional": true, "description": "EventTarget interface name.", "experimental": true }
    
                    "description": "Removes breakpoint on particular DOM event."
    
                    "name": "setInstrumentationBreakpoint",
                    "parameters": [
                        { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
    
                    "description": "Sets breakpoint on particular native event.",
                    "experimental": true
    
                    "name": "removeInstrumentationBreakpoint",
                    "parameters": [
                        { "name": "eventName", "type": "string", "description": "Instrumentation name to stop on." }
    
                    "description": "Removes breakpoint on particular native event.",
                    "experimental": true
    
                    "name": "setXHRBreakpoint",
                    "parameters": [
                        { "name": "url", "type": "string", "description": "Resource URL substring. All XHRs having this substring in the URL will get stopped upon." }
    
                    "description": "Sets breakpoint on XMLHttpRequest."
    
                    "name": "removeXHRBreakpoint",
    
                        { "name": "url", "type": "string", "description": "Resource URL substring." }
    
                    "description": "Removes breakpoint from XMLHttpRequest."
    
                    "name": "getEventListeners",
                    "experimental": true,
    
                        { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to return listeners for." },
                        { "name": "depth", "type": "integer", "optional": true, "description": "The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.", "experimental": true },
                        { "name": "pierce", "type": "boolean", "optional": true, "description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.", "experimental": true }
    
                    "returns": [
                        { "name": "listeners", "type": "array", "items": { "$ref": "EventListener" }, "description": "Array of relevant listeners." }
    
                    "description": "Returns event listeners of the given object."
    
            "domain": "Target",
            "description": "Supports additional targets discovery and allows to attach to them.",
            "experimental": true,
    
                    "id": "TargetID",
                    "type": "string"
                },
                {
                    "id": "BrowserContextID",
                    "type": "string"
    
                    "id": "TargetInfo",
    
                    "type": "object",
                    "properties": [
    
                        { "name": "targetId", "$ref": "TargetID" },
                        { "name": "type", "type": "string" },
                        { "name": "title", "type": "string" },
                        { "name": "url", "type": "string" }
    
                    "id": "RemoteLocation",
    
                    "type": "object",
                    "properties": [
    
                        { "name": "host", "type": "string" },
                        { "name": "port", "type": "integer" }
    
                    "name": "setDiscoverTargets",
                    "description": "Controls whether to discover available targets and notify via <code>targetCreated/targetDestroyed</code> events.",
    
                        { "name": "discover", "type": "boolean", "description": "Whether to discover available targets." }
    
                    "name": "setAutoAttach",
                    "description": "Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets.",
    
                        { "name": "autoAttach", "type": "boolean", "description": "Whether to auto-attach to related targets." },
                        { "name": "waitForDebuggerOnStart", "type": "boolean", "description": "Whether to pause new targets when attaching to them. Use <code>Runtime.runIfWaitingForDebugger</code> to run paused targets." }
    
                    "name": "setAttachToFrames",
    
                        { "name": "value", "type": "boolean", "description": "Whether to attach to frames." }
    
                    "name": "setRemoteLocations",
                    "description": "Enables target discovery for the specified locations, when <code>setDiscoverTargets</code> was set to <code>true</code>.",
    
                        { "name": "locations", "type": "array", "items": { "$ref": "RemoteLocation" }, "description": "List of remote locations." }
    
                    "name": "sendMessageToTarget",
                    "description": "Sends protocol message to the target with given id.",
    
    svatal's avatar
    svatal committed
                        { "name": "targetId", "$ref": "TargetID" },
    
                        { "name": "message", "type": "string" }
    
                    "name": "getTargetInfo",
                    "description": "Returns information about a target.",
    
                        { "name": "targetId", "$ref": "TargetID" }
    
                        { "name": "targetInfo","$ref": "TargetInfo" }
    
                    "name": "activateTarget",
                    "description": "Activates (focuses) the target.",
    
                        { "name": "targetId", "$ref": "TargetID" }
                    ]
    
                    "name": "closeTarget",
                    "description": "Closes the target. If the target is a page that gets closed too.",
    
                        { "name": "targetId", "$ref": "TargetID" }
    
                        { "name": "success", "type": "boolean" }
    
                    "name": "attachToTarget",
                    "description": "Attaches to the target with given id.",
    
                        { "name": "targetId", "$ref": "TargetID" }
                    ],
                    "returns": [
                        { "name": "success", "type": "boolean", "description": "Whether attach succeeded." }
    
                    "name": "detachFromTarget",
                    "description": "Detaches from the target with given id.",
    
                        { "name": "targetId", "$ref": "TargetID" }
    
                    "name": "createBrowserContext",
                    "description": "Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one.",
                    "returns": [
                        { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The id of the context created." }
    
                    "name": "disposeBrowserContext",
                    "description": "Deletes a BrowserContext, will fail of any open page uses it.",
    
                        { "name": "browserContextId", "$ref": "BrowserContextID" }
                    ],
                    "returns": [
                        { "name": "success", "type": "boolean" }
    
                    "name": "createTarget",
                    "description": "Creates a new page.",
    
                        { "name": "url", "type": "string", "description": "The initial URL the page will be navigated to." },
                        { "name": "width", "type": "integer", "description": "Frame width in DIP (headless chrome only).", "optional": true },
                        { "name": "height", "type": "integer", "description": "Frame height in DIP (headless chrome only).", "optional": true },
                        { "name": "browserContextId", "$ref": "BrowserContextID", "description": "The browser context to create the page in (headless chrome only).", "optional": true }
                    ],
                    "returns": [
                        { "name": "targetId", "$ref": "TargetID", "description": "The id of the page opened." }
    
                    "name": "getTargets",
                    "description": "Retrieves a list of available targets.",
                    "returns": [
                        { "name": "targetInfos", "type": "array", "items": { "$ref": "TargetInfo" }, "description": "The list of targets." }
    
                    "name": "targetCreated",
                    "description": "Issued when a possible inspection target is created.",
    
                        { "name": "targetInfo", "$ref": "TargetInfo" }
    
                    "name": "targetDestroyed",
                    "description": "Issued when a target is destroyed.",
    
                        { "name": "targetId", "$ref": "TargetID" }
    
                    "name": "attachedToTarget",
                    "description": "Issued when attached to target because of auto-attach or <code>attachToTarget</code> command.",
    
                        { "name": "targetInfo", "$ref": "TargetInfo" },
                        { "name": "waitingForDebugger", "type": "boolean" }
    
                    "name": "detachedFromTarget",
                    "description": "Issued when detached from target for any reason (including <code>detachFromTarget</code> command).",
    
                        { "name": "targetId", "$ref": "TargetID" }
    
                    "name": "receivedMessageFromTarget",
                    "description": "Notifies about new protocol message from attached target.",
    
                        { "name": "targetId", "$ref": "TargetID" },
    
                        { "name": "message", "type": "string" }
                    ]
                }
            ]
        },
        {
            "domain": "ServiceWorker",
    
            "experimental": true,
    
            "types": [
                {
                    "id": "ServiceWorkerRegistration",
                    "type": "object",
                    "description": "ServiceWorker registration.",
                    "properties": [
                        { "name": "registrationId", "type": "string" },
                        { "name": "scopeURL", "type": "string" },
    
                        { "name": "isDeleted", "type": "boolean" }
    
                    ]
                },
                {
                    "id": "ServiceWorkerVersionRunningStatus",
                    "type": "string",
                    "enum": ["stopped", "starting", "running", "stopping"]
                },
                {
                    "id": "ServiceWorkerVersionStatus",
    
                    "type": "string",
                    "enum": ["new", "installing", "installed", "activating", "activated", "redundant"]
    
                    "id": "ServiceWorkerVersion",
    
                    "description": "ServiceWorker version.",
    
                        { "name": "versionId", "type": "string" },
                        { "name": "registrationId", "type": "string" },
                        { "name": "scriptURL", "type": "string" },
                        { "name": "runningStatus", "$ref": "ServiceWorkerVersionRunningStatus" },
                        { "name": "status", "$ref": "ServiceWorkerVersionStatus" },
                        { "name": "scriptLastModified", "type": "number", "optional": true, "description": "The Last-Modified header value of the main script." },
                        { "name": "scriptResponseTime", "type": "number", "optional": true, "description": "The time at which the response headers of the main script were received from the server.  For cached script it is the last time the cache entry was validated." },
                        { "name": "controlledClients", "type": "array", "optional": true, "items": { "$ref": "Target.TargetID" } },
                        { "name": "targetId", "$ref": "Target.TargetID", "optional": true }
    
                    "id": "ServiceWorkerErrorMessage",
    
                    "description": "ServiceWorker error message.",
    
                        { "name": "errorMessage", "type": "string" },
                        { "name": "registrationId", "type": "string" },
                        { "name": "versionId", "type": "string" },
                        { "name": "sourceURL", "type": "string" },
                        { "name": "lineNumber", "type": "integer" },
                        { "name": "columnNumber", "type": "integer" }
    
                    "name": "enable"
    
                    "name": "disable"
    
                    "name": "unregister",
    
                        { "name": "scopeURL", "type": "string" }
    
                    "name": "updateRegistration",
                    "parameters": [
                        { "name": "scopeURL", "type": "string" }
                    ]
    
                    "name": "startWorker",
    
                        { "name": "scopeURL", "type": "string" }
                    ]
    
                    "name": "skipWaiting",
    
                        { "name": "scopeURL", "type": "string" }
                    ]
    
                    "name": "stopWorker",
    
                        { "name": "versionId", "type": "string" }
    
                    "name": "inspectWorker",
    
                        { "name": "versionId", "type": "string" }
    
                    "name": "setForceUpdateOnPageLoad",
    
                        { "name": "forceUpdateOnPageLoad", "type": "boolean" }
    
                    "name": "deliverPushMessage",
    
                        { "name": "origin", "type": "string" },
                        { "name": "registrationId", "type": "string" },
                        { "name": "data", "type": "string" }
    
                    "name": "dispatchSyncEvent",
    
                        { "name": "origin", "type": "string" },
                        { "name": "registrationId", "type": "string" },
                        { "name": "tag", "type": "string" },
                        { "name": "lastChance", "type": "boolean" }
                    ]
    
                    "name": "workerRegistrationUpdated",
    
                        { "name": "registrations", "type": "array", "items": { "$ref": "ServiceWorkerRegistration" } }
                    ]
    
                    "name": "workerVersionUpdated",
    
                        { "name": "versions", "type": "array", "items": { "$ref": "ServiceWorkerVersion" } }
                    ]
                },
                {
                    "name": "workerErrorReported",
                    "parameters": [
                        { "name": "errorMessage", "$ref": "ServiceWorkerErrorMessage" }
                    ]
    
                }
            ]
        },
        {
            "domain": "Input",
            "types": [
                {
                    "id": "TouchPoint",
                    "type": "object",
    
                    "experimental": true,
    
                    "properties": [
                        { "name": "state", "type": "string", "enum": ["touchPressed", "touchReleased", "touchMoved", "touchStationary", "touchCancelled"], "description": "State of the touch point." },
                        { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
                        { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
                        { "name": "radiusX", "type": "integer", "optional": true, "description": "X radius of the touch area (default: 1)."},
                        { "name": "radiusY", "type": "integer", "optional": true, "description": "Y radius of the touch area (default: 1)."},
                        { "name": "rotationAngle", "type": "number", "optional": true, "description": "Rotation angle (default: 0.0)."},
                        { "name": "force", "type": "number", "optional": true, "description": "Force (default: 1.0)."},
                        { "name": "id", "type": "number", "optional": true, "description": "Identifier used to track touch sources between events, must be unique within an event."}
                    ]
                },
                {
                    "id": "GestureSourceType",
                    "type": "string",
    
                    "experimental": true,
    
                    "enum": ["default", "touch", "mouse"]
                }
            ],
            "commands": [
    
    svatal's avatar
    svatal committed
                {
                    "name": "setIgnoreInputEvents",
                    "parameters": [
                        { "name": "ignore", "type": "boolean", "description": "Ignores input events processing when set to true." }
                    ],
                    "description": "Ignores input events (useful while auditing page)."
                },
    
                {
                    "name": "dispatchKeyEvent",
                    "parameters": [
                        { "name": "type", "type": "string", "enum": ["keyDown", "keyUp", "rawKeyDown", "char"], "description": "Type of the key event." },
                        { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
                        { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
                        { "name": "text", "type": "string", "optional": true, "description": "Text as generated by processing a virtual key code with a keyboard layout. Not needed for for <code>keyUp</code> and <code>rawKeyDown</code> events (default: \"\")" },
                        { "name": "unmodifiedText", "type": "string", "optional": true, "description": "Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: \"\")." },
                        { "name": "keyIdentifier", "type": "string", "optional": true, "description": "Unique key identifier (e.g., 'U+0041') (default: \"\")." },
                        { "name": "code", "type": "string", "optional": true, "description": "Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: \"\")." },
    
                        { "name": "key", "type": "string", "optional": true, "description": "Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: \"\")." },
    
                        { "name": "windowsVirtualKeyCode", "type": "integer", "optional": true, "description": "Windows virtual key code (default: 0)." },
                        { "name": "nativeVirtualKeyCode", "type": "integer", "optional": true, "description": "Native virtual key code (default: 0)." },
                        { "name": "autoRepeat", "type": "boolean", "optional": true, "description": "Whether the event was generated from auto repeat (default: false)." },
                        { "name": "isKeypad", "type": "boolean", "optional": true, "description": "Whether the event was generated from the keypad (default: false)." },
                        { "name": "isSystemKey", "type": "boolean", "optional": true, "description": "Whether the event was a system key event (default: false)." }
                    ],
    
                    "description": "Dispatches a key event to the page."
    
                },
                {
                    "name": "dispatchMouseEvent",
                    "parameters": [
                        { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved"], "description": "Type of the mouse event." },
                        { "name": "x", "type": "integer", "description": "X coordinate of the event relative to the main frame's viewport."},
                        { "name": "y", "type": "integer", "description": "Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport."},
                        { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
                        { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." },
                        { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "optional": true, "description": "Mouse button (default: \"none\")." },
                        { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
                    ],
    
                    "description": "Dispatches a mouse event to the page."
    
                    "experimental": true,
    
                    "parameters": [
                        { "name": "type", "type": "string", "enum": ["touchStart", "touchEnd", "touchMove"], "description": "Type of the touch event." },
                        { "name": "touchPoints", "type": "array", "items": { "$ref": "TouchPoint" }, "description": "Touch points." },
                        { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
                        { "name": "timestamp", "type": "number", "optional": true, "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970 (default: current time)." }
                    ],
                    "description": "Dispatches a touch event to the page."
                },
                {
                    "name": "emulateTouchFromMouseEvent",
    
                    "experimental": true,
    
                    "parameters": [
                        { "name": "type", "type": "string", "enum": ["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel"], "description": "Type of the mouse event." },
                        { "name": "x", "type": "integer", "description": "X coordinate of the mouse pointer in DIP."},
                        { "name": "y", "type": "integer", "description": "Y coordinate of the mouse pointer in DIP."},
                        { "name": "timestamp", "type": "number", "description": "Time at which the event occurred. Measured in UTC time in seconds since January 1, 1970." },
                        { "name": "button", "type": "string", "enum": ["none", "left", "middle", "right"], "description": "Mouse button." },
                        { "name": "deltaX", "type": "number", "optional": true, "description": "X delta in DIP for mouse wheel event (default: 0)."},
                        { "name": "deltaY", "type": "number", "optional": true, "description": "Y delta in DIP for mouse wheel event (default: 0)."},
                        { "name": "modifiers", "type": "integer", "optional": true, "description": "Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0)." },
                        { "name": "clickCount", "type": "integer", "optional": true, "description": "Number of times the mouse button was clicked (default: 0)." }
                    ],
    
                    "description": "Emulates touch event from the mouse event parameters."
    
                },
                {
                    "name": "synthesizePinchGesture",
                    "parameters": [
                        { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
                        { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
                        { "name": "scaleFactor", "type": "number", "description": "Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out)." },
                        { "name": "relativeSpeed", "type": "integer", "optional": true, "description": "Relative pointer speed in pixels per second (default: 800)." },
                        { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }
                    ],
                    "description": "Synthesizes a pinch gesture over a time period by issuing appropriate touch events.",
    
                    "experimental": true
    
                },
                {
                    "name": "synthesizeScrollGesture",
                    "parameters": [
                        { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
                        { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
                        { "name": "xDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the X axis (positive to scroll left)." },
                        { "name": "yDistance", "type": "integer", "optional": true, "description": "The distance to scroll along the Y axis (positive to scroll up)." },
                        { "name": "xOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the X axis, in addition to the given distance." },
                        { "name": "yOverscroll", "type": "integer", "optional": true, "description": "The number of additional pixels to scroll back along the Y axis, in addition to the given distance." },
                        { "name": "preventFling", "type": "boolean", "optional": true, "description": "Prevent fling (default: true)." },
                        { "name": "speed", "type": "integer", "optional": true, "description": "Swipe speed in pixels per second (default: 800)." },
    
                        { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." },
                        { "name": "repeatCount", "type": "integer", "optional": true, "description": "The number of times to repeat the gesture (default: 0)." },
                        { "name": "repeatDelayMs", "type": "integer", "optional": true, "description": "The number of milliseconds delay between each repeat. (default: 250)." },
                        { "name": "interactionMarkerName", "type": "string", "optional": true, "description": "The name of the interaction markers to generate, if not empty (default: \"\")." }
    
                    ],
                    "description": "Synthesizes a scroll gesture over a time period by issuing appropriate touch events.",
    
                    "experimental": true
    
                },
                {
                    "name": "synthesizeTapGesture",
                    "parameters": [
                        { "name": "x", "type": "integer", "description": "X coordinate of the start of the gesture in CSS pixels." },
                        { "name": "y", "type": "integer", "description": "Y coordinate of the start of the gesture in CSS pixels." },
                        { "name": "duration", "type": "integer", "optional": true, "description": "Duration between touchdown and touchup events in ms (default: 50)." },
                        { "name": "tapCount", "type": "integer", "optional": true, "description": "Number of times to perform the tap (e.g. 2 for double tap, default: 1)." },
                        { "name": "gestureSourceType", "$ref": "GestureSourceType", "optional": true, "description": "Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type)." }
                    ],
                    "description": "Synthesizes a tap gesture over a time period by issuing appropriate touch events.",
    
                    "experimental": true
    
            "experimental": true,
            "dependencies": ["DOM"],
    
            "types": [
                {
                    "id": "LayerId",
                    "type": "string",
                    "description": "Unique Layer identifier."
                },
                {
                    "id": "SnapshotId",
                    "type": "string",
                    "description": "Unique snapshot identifier."
                },
                {
                    "id": "ScrollRect",
                    "type": "object",
                    "description": "Rectangle where scrolling happens on the main thread.",
                    "properties": [
                        { "name": "rect", "$ref": "DOM.Rect", "description": "Rectangle itself." },
                        { "name": "type", "type": "string", "enum": ["RepaintsOnScroll", "TouchEventHandler", "WheelEventHandler"], "description": "Reason for rectangle to force scrolling on the main thread" }
                    ]
                },
                {
                    "id": "PictureTile",
                    "type": "object",
                    "description": "Serialized fragment of layer picture along with its offset within the layer.",
                    "properties": [
                        { "name": "x", "type": "number", "description": "Offset from owning layer left boundary" },
                        { "name": "y", "type": "number", "description": "Offset from owning layer top boundary" },
                        { "name": "picture", "type": "string", "description": "Base64-encoded snapshot data." }
                    ]
                },
                {
                    "id": "Layer",
                    "type": "object",
                    "description": "Information about a compositing layer.",
                    "properties": [
                        { "name": "layerId", "$ref": "LayerId", "description": "The unique id for this layer." },
                        { "name": "parentLayerId", "$ref": "LayerId", "optional": true, "description": "The id of parent (not present for root)." },
                        { "name": "backendNodeId", "$ref": "DOM.BackendNodeId", "optional": true, "description": "The backend id for the node associated with this layer." },
                        { "name": "offsetX", "type": "number", "description": "Offset from parent layer, X coordinate." },
                        { "name": "offsetY", "type": "number", "description": "Offset from parent layer, Y coordinate." },
                        { "name": "width", "type": "number", "description": "Layer width." },
                        { "name": "height", "type": "number", "description": "Layer height." },
                        { "name": "transform", "type": "array", "items": { "type": "number" }, "minItems": 16, "maxItems": 16, "optional": true, "description": "Transformation matrix for layer, default is identity matrix" },
                        { "name": "anchorX", "type": "number", "optional": true, "description": "Transform anchor point X, absent if no transform specified" },
                        { "name": "anchorY", "type": "number", "optional": true, "description": "Transform anchor point Y, absent if no transform specified" },
                        { "name": "anchorZ", "type": "number", "optional": true, "description": "Transform anchor point Z, absent if no transform specified" },
                        { "name": "paintCount", "type": "integer", "description": "Indicates how many time this layer has painted." },
                        { "name": "drawsContent", "type": "boolean", "description": "Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only." },
                        { "name": "invisible", "type": "boolean", "optional": true, "description": "Set if layer is not visible." },
                        { "name": "scrollRects", "type": "array", "items": { "$ref": "ScrollRect"}, "optional": true, "description": "Rectangles scrolling on main thread only."}
                    ]
                },
                {
                    "id": "PaintProfile",
                    "type": "array",
                    "description": "Array of timings, one per paint step.",
                    "items": {
                        "type": "number",
                        "description": "A time in seconds since the end of previous step (for the first step, time since painting started)"
                    }
                }
            ],
            "commands": [
                {
                    "name": "enable",
                    "description": "Enables compositing tree inspection."
                },
                {
                    "name": "disable",
                    "description": "Disables compositing tree inspection."
                },
                {
                    "name": "compositingReasons",
                    "parameters": [
                        { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer for which we want to get the reasons it was composited." }
                    ],
                    "description": "Provides the reasons why the given layer was composited.",
                    "returns": [
                        { "name": "compositingReasons", "type": "array", "items": { "type": "string" }, "description": "A list of strings specifying reasons for the given layer to become composited." }
                    ]
                },
                {
                    "name": "makeSnapshot",
                    "parameters": [
                        { "name": "layerId", "$ref": "LayerId", "description": "The id of the layer." }
                    ],
                    "description": "Returns the layer snapshot identifier.",
                    "returns": [
                        { "name": "snapshotId", "$ref": "SnapshotId", "description": "The id of the layer snapshot." }
                    ]
                },
                {
                    "name": "loadSnapshot",
                    "parameters": [
                        { "name": "tiles", "type": "array", "items": { "$ref": "PictureTile" }, "minItems": 1, "description": "An array of tiles composing the snapshot." }
                    ],