blob: e406126fc24f6a88db4a6492af3433d4282d5693 [file] [log] [blame]
{
"domains": [
{
"commands": [
{
"name": "disable",
"description": "Disables DOM agent for the given page."
},
{
"name": "enable",
"description": "Enables DOM agent for the given page."
},
{
"name": "getDocument",
"description": "Returns the root DOM node (and optionally the subtree) to the caller.",
"returns": [
{
"name": "root",
"$ref": "Node",
"description": "Resulting node."
}
]
},
{
"name": "hideHighlight",
"description": "Hides any highlight.",
"redirect": "Overlay"
},
{
"name": "highlightNode",
"description": "Highlights DOM node.",
"redirect": "Overlay"
},
{
"name": "pushNodesByBackendIdsToFrontend",
"description": "Requests that a batch of nodes is sent to the caller given their backend node ids.",
"parameters": [
{
"name": "backendNodeIds",
"type": "array",
"items": {
"$ref": "BackendNodeId"
},
"description": "The array of backend node ids."
}
],
"returns": [
{
"name": "nodeIds",
"type": "array",
"items": {
"$ref": "NodeId"
},
"description": "The array of ids of pushed nodes that correspond to the backend ids specified in\nbackendNodeIds."
}
],
"experimental": true
}
],
"description": "This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object\nthat has an `id`. This `id` can be used to get additional information on the Node, resolve it into\nthe JavaScript object wrapper, etc. It is important that client receives DOM events only for the\nnodes that are known to the client. Backend keeps track of the nodes that were sent to the client\nand never sends the same node twice. It is client's responsibility to collect information about\nthe nodes that were sent to the client.<p>Note that `iframe` owner elements will return\ncorresponding document elements as their child nodes.</p>",
"domain": "DOM",
"dependencies": [
"Runtime"
],
"events": [
{
"name": "childNodeInserted",
"description": "Mirrors `DOMNodeInserted` event.",
"parameters": [
{
"name": "parentNodeId",
"$ref": "NodeId",
"description": "Id of the node that has changed."
},
{
"name": "previousNodeId",
"$ref": "NodeId",
"description": "If of the previous siblint."
},
{
"name": "node",
"$ref": "Node",
"description": "Inserted node data."
}
]
},
{
"name": "childNodeRemoved",
"description": "Mirrors `DOMNodeRemoved` event.",
"parameters": [
{
"name": "parentNodeId",
"$ref": "NodeId",
"description": "Parent id."
},
{
"name": "nodeId",
"$ref": "NodeId",
"description": "Id of the node that has been removed."
}
]
}
],
"types": [
{
"id": "NodeId",
"description": "Unique DOM node identifier.",
"type": "integer"
},
{
"id": "BackendNodeId",
"description": "Unique DOM node identifier used to reference a node that may not have been pushed to the\nfront-end.",
"type": "integer"
},
{
"id": "Node",
"description": "DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes.\nDOMNode is a base node mirror type.",
"type": "object",
"properties": [
{
"name": "nodeId",
"$ref": "NodeId",
"description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend\nwill only push node with given `id` once. It is aware of all requested nodes and will only\nfire DOM events for nodes known to the client."
},
{
"name": "backendNodeId",
"$ref": "BackendNodeId",
"description": "The BackendNodeId for this node."
},
{
"name": "nodeType",
"type": "integer",
"description": "`Node`'s nodeType."
},
{
"name": "nodeName",
"type": "string",
"description": "`Node`'s nodeName."
},
{
"name": "childNodeCount",
"optional": true,
"type": "integer",
"description": "Child count for `Container` nodes."
},
{
"name": "children",
"optional": true,
"type": "array",
"items": {
"$ref": "Node"
},
"description": "Child nodes of this node when requested with children."
},
{
"name": "attributes",
"optional": true,
"type": "array",
"items": {
"type": "string"
},
"description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`."
},
{
"name": "name",
"optional": true,
"type": "string",
"description": "`Attr`'s name."
},
{
"name": "value",
"optional": true,
"type": "string",
"description": "`Attr`'s value."
}
]
},
{
"id": "RGBA",
"description": "A structure holding an RGBA color.",
"type": "object",
"properties": [
{
"name": "r",
"type": "integer",
"description": "The red component, in the [0-255] range."
},
{
"name": "g",
"type": "integer",
"description": "The green component, in the [0-255] range."
},
{
"name": "b",
"type": "integer",
"description": "The blue component, in the [0-255] range."
},
{
"name": "a",
"optional": true,
"type": "number",
"description": "The alpha component, in the [0-1] range (default: 1)."
}
]
}
]
},
{
"commands": [
{
"name": "disable",
"description": "Disables the CSS agent for the given page."
},
{
"name": "enable",
"description": "Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been\nenabled until the result of this command is received."
},
{
"name": "getMatchedStylesForNode",
"description": "Returns requested styles for a DOM node identified by `nodeId`.",
"parameters": [
{
"name": "nodeId",
"$ref": "DOM.NodeId"
}
],
"returns": [
{
"name": "inlineStyle",
"$ref": "CSSStyle",
"optional": true,
"description": "Inline style for the specified DOM node."
}
]
},
{
"name": "setStyleTexts",
"description": "Applies specified style edits one after another in the given order.",
"parameters": [
{
"name": "edits",
"type": "array",
"items": {
"$ref": "StyleDeclarationEdit"
}
}
],
"returns": [
{
"name": "styles",
"type": "array",
"items": {
"$ref": "CSSStyle"
},
"description": "The resulting styles after modification."
}
]
}
],
"description": "This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles)\nhave an associated `id` used in subsequent operations on the related object. Each object type has\na specific `id` structure, and those are not interchangeable between objects of different kinds.\nCSS objects can be loaded using the `get*ForNode()` calls (which accept a DOM node id). A client\ncan also keep track of stylesheets via the `styleSheetAdded`/`styleSheetRemoved` events and\nsubsequently load the required stylesheet contents using the `getStyleSheet[Text]()` methods.",
"domain": "CSS",
"dependencies": [
"DOM"
],
"experimental": true,
"events": [
{
"name": "styleSheetChanged",
"description": "Fired whenever a stylesheet is changed as a result of the client operation.",
"parameters": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId"
}
]
}
],
"types": [
{
"id": "StyleSheetId",
"type": "string"
},
{
"id": "SourceRange",
"description": "Text range within a resource. All numbers are zero-based.",
"type": "object",
"properties": [
{
"name": "startLine",
"type": "integer",
"description": "Start line of range."
},
{
"name": "startColumn",
"type": "integer",
"description": "Start column of range (inclusive)."
},
{
"name": "endLine",
"type": "integer",
"description": "End line of range"
},
{
"name": "endColumn",
"type": "integer",
"description": "End column of range (exclusive)."
}
]
},
{
"id": "ShorthandEntry",
"type": "object",
"properties": [
{
"name": "name",
"description": "Shorthand name.",
"type": "string"
},
{
"name": "value",
"description": "Shorthand value.",
"type": "string"
},
{
"name": "important",
"description": "Whether the property has \"!important\" annotation (implies `false` if absent).",
"optional": true,
"type": "boolean"
}
]
},
{
"id": "CSSStyle",
"description": "CSS style representation.",
"type": "object",
"properties": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId",
"optional": true,
"description": "The css style sheet identifier (absent for user agent stylesheet and user-specified\nstylesheet rules) this rule came from."
},
{
"name": "cssProperties",
"type": "array",
"items": {
"$ref": "CSSProperty"
},
"description": "CSS properties in the style."
},
{
"name": "shorthandEntries",
"type": "array",
"items": {
"$ref": "ShorthandEntry"
},
"description": "Computed values for all shorthands found in the style."
},
{
"name": "range",
"$ref": "SourceRange",
"optional": true,
"description": "Style declaration range in the enclosing stylesheet (if available)."
}
]
},
{
"id": "CSSProperty",
"description": "CSS property declaration data.",
"type": "object",
"properties": [
{
"name": "name",
"type": "string",
"description": "The property name."
},
{
"name": "value",
"type": "string",
"description": "The property value."
},
{
"name": "range",
"$ref": "SourceRange",
"optional": true,
"description": "The entire property range in the enclosing style declaration (if available)."
}
]
},
{
"id": "StyleDeclarationEdit",
"description": "A descriptor of operation to mutate style declaration text.",
"type": "object",
"properties": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId",
"description": "The css style sheet identifier."
},
{
"name": "range",
"$ref": "SourceRange",
"description": "The range of the style text in the enclosing stylesheet."
},
{
"name": "text",
"type": "string",
"description": "New style text."
}
]
}
]
},
{
"commands": [
{
"name": "disable",
"description": "Disables domain notifications."
},
{
"name": "enable",
"description": "Enables domain notifications."
},
{
"name": "hideHighlight",
"description": "Hides any highlight."
},
{
"name": "highlightNode",
"description": "Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or\nobjectId must be specified.",
"parameters": [
{
"name": "highlightConfig",
"$ref": "HighlightConfig",
"description": "A descriptor for the highlight appearance."
},
{
"name": "nodeId",
"$ref": "DOM.NodeId",
"optional": true,
"description": "Identifier of the node to highlight."
}
]
},
{
"name": "setInspectMode",
"description": "Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.\nBackend then generates 'inspectNodeRequested' event upon element selection.",
"parameters": [
{
"name": "mode",
"$ref": "InspectMode",
"description": "Set an inspection mode."
},
{
"name": "highlightConfig",
"$ref": "HighlightConfig",
"optional": true,
"description": "A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled\n== false`."
}
]
}
],
"description": "This domain provides various functionality related to drawing atop the inspected page.",
"domain": "Overlay",
"dependencies": [
"DOM",
"Page",
"Runtime"
],
"experimental": true,
"events": [
{
"name": "inspectNodeRequested",
"description": "Fired when the node should be inspected. This happens after call to `setInspectMode` or when\nuser manually inspects an element.",
"parameters": [
{
"name": "backendNodeId",
"$ref": "DOM.BackendNodeId",
"description": "Id of the node to inspect."
}
]
},
{
"name": "nodeHighlightRequested",
"description": "Fired when the node should be highlighted. This happens after call to `setInspectMode`.",
"parameters": [
{
"name": "nodeId",
"$ref": "DOM.NodeId"
}
]
}
],
"types": [
{
"id": "HighlightConfig",
"description": "Configuration data for the highlighting of page elements.",
"type": "object",
"properties": [
{
"name": "showInfo",
"optional": true,
"type": "boolean",
"description": "Whether the node info tooltip should be shown (default: false)."
},
{
"name": "showRulers",
"optional": true,
"type": "boolean",
"description": "Whether the rulers should be shown (default: false)."
},
{
"name": "showExtensionLines",
"optional": true,
"type": "boolean",
"description": "Whether the extension lines from node to the rulers should be shown (default: false)."
},
{
"name": "displayAsMaterial",
"optional": true,
"type": "boolean"
},
{
"name": "contentColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The content box highlight fill color (default: transparent)."
},
{
"name": "paddingColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The padding highlight fill color (default: transparent)."
},
{
"name": "borderColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The border highlight fill color (default: transparent)."
},
{
"name": "marginColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The margin highlight fill color (default: transparent)."
},
{
"name": "eventTargetColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The event target element highlight fill color (default: transparent)."
},
{
"name": "shapeColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The shape outside fill color (default: transparent)."
},
{
"name": "shapeMarginColor",
"$ref": "DOM.RGBA",
"optional": true,
"description": "The shape margin fill color (default: transparent)."
},
{
"name": "selectorList",
"optional": true,
"type": "string",
"description": "Selectors to highlight relevant nodes."
}
]
},
{
"id": "InspectMode",
"type": "string",
"enum": [
"searchForNode",
"searchForUAShadowDOM",
"none"
]
}
]
}
],
"version": {
"major": "1",
"minor": "3"
}
}