[go: nahoru, domu]

blob: 9f4c648fa821d238d1c232dfadc8ccf6ee539114 [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
},
{
"name": "performSearch",
"parameters": [
{ "name": "query", "type": "string", "description": "Plain text or query selector or XPath search query." },
{ "name": "includeUserAgentShadowDOM", "type": "boolean", "optional": true, "description": "True to search in user agent shadow DOM." }
],
"returns": [
{ "name": "searchId", "type": "string", "description": "Unique search session identifier." },
{ "name": "resultCount", "type": "integer", "description": "Number of search results." }
],
"description": "Searches for a given string in the DOM tree. Use <code>getSearchResults</code> to access search results or <code>cancelSearch</code> to end this search session.",
"experimental": true
},
{
"name": "getSearchResults",
"parameters": [
{ "name": "searchId", "type": "string", "description": "Unique search session identifier." },
{ "name": "fromIndex", "type": "integer", "description": "Start index of the search result to be returned." },
{ "name": "toIndex", "type": "integer", "description": "End index of the search result to be returned." }
],
"returns": [
{ "name": "nodeIds", "type": "array", "items": { "$ref": "NodeId" }, "description": "Ids of the search result nodes." }
],
"description": "Returns search results from given <code>fromIndex</code> to given <code>toIndex</code> from the search with the given identifier.",
"experimental": true
},
{
"name": "discardSearchResults",
"parameters": [
{ "name": "searchId", "type": "string", "description": "Unique search session identifier." }
],
"description": "Discards search results from the session with the given id. <code>getSearchResults</code> should no longer be called for that search.",
"experimental": true
},
{
"name": "dispatchMouseEvent",
"parameters": [
{
"name": "nodeId",
"$ref": "NodeId",
"description": "Id of the node."
},
{
"name": "event",
"$ref": "MouseEvent",
"description": "Mouse event to dispatch."
}
],
"description": "Dispatch a mouse event for a given node. Only used for UI Devtools."
},
{
"name": "dispatchKeyEvent",
"parameters": [
{
"name": "nodeId",
"$ref": "NodeId",
"description": "Id of the node."
},
{
"name": "event",
"$ref": "KeyEvent",
"description": "Keyboard event to dispatch."
}
],
"description": "Dispatch a keyboard event for a given node. Only used for UI Devtools."
}
],
"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)."
}
]
},
{
"id": "MouseEvent",
"description": "Used by dispatchMouseEvent. Only used for UI DevTools.",
"type": "object",
"properties" : [
{
"name": "type",
"type": "string",
"enum": [
"mousePressed",
"mouseDragged",
"mouseReleased",
"mouseMoved",
"mouseEntered",
"mouseExited",
"mouseWheel"
],
"description": "Mouse event type."
},
{
"name": "x",
"type": "integer",
"description": "x position relative to the node."
},
{
"name": "y",
"type": "integer",
"description": "y position relative to the node."
},
{
"name": "button",
"type": "string",
"enum": [
"none",
"left",
"right",
"middle",
"back",
"forward"
],
"description": "Mouse button type."
},
{
"name": "wheelDirection",
"type": "string",
"enum": [
"none",
"up",
"down",
"left",
"right"
],
"description": "Only used for mouseWheel event."
}
]
},
{
"id": "KeyEvent",
"description": "Used by dispatchKeyEvent. Only used for UI DevTools. Mirroring the KeyEvent class from ui/events/event.h",
"type": "object",
"properties" : [
{
"name": "type",
"type": "string",
"enum": [
"keyPressed",
"keyReleased"
],
"description": "Key event type."
},
{
"name": "keyCode",
"type": "integer",
"description": "Virtual key code. Definition: ui/events/keycodes/keyboard_codes_posix.h"
},
{
"name": "code",
"type": "integer",
"description": "Dom code. Definition: ui/events/keycodes/dom/dom_code_data.inc"
},
{
"name": "flags",
"type": "integer",
"description": "Event flags for keyboard modifiers. Definition: ui/events/event_constants.h"
},
{
"name": "key",
"type": "integer",
"description": "Provide meaning of a key. It's either a dom key value for a key stroke event or an unicode character for a character event."
},
{
"name": "isChar",
"type": "boolean",
"description": "Whether it's a character event or a key stroke event."
}
]
}
]
},
{
"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": "matchedCSSRules",
"type": "array",
"items": {
"$ref": "RuleMatch"
},
"optional": true,
"description": "CSS rules matching this node, from all applicable stylesheets."
}
]
},
{
"name": "getStyleSheetText",
"parameters": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId"
}
],
"returns": [
{
"name": "text",
"type": "string",
"description": "The stylesheet text."
}
],
"description": "Returns the current source content for a stylesheet."
},
{
"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"
}
]
},
{
"name": "styleSheetAdded",
"parameters": [
{
"name": "header",
"$ref": "CSSStyleSheetHeader",
"description": "Added stylesheet metainfo."
}
],
"description": "Fired whenever an active document stylesheet is added."
}
],
"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": "RuleMatch",
"description": "Match data for a CSS rule.",
"type": "object",
"properties": [
{
"name": "rule",
"$ref": "CSSRule",
"description": "CSS rule in the match."
},
{
"name": "matchingSelectors",
"type": "array",
"items": {
"type": "integer"
},
"description": "Matching selector indices in the rule's selectorList selectors (0-based)."
}
]
},
{
"id": "Value",
"type": "object",
"properties": [
{
"name": "text",
"type": "string",
"description": "Value text."
},
{
"name": "range",
"$ref": "SourceRange",
"optional": true,
"description": "Value range in the underlying resource (if available)."
}
],
"description": "Data for a simple selector (these are delimited by commas in a selector list)."
},
{
"id": "SelectorList",
"type": "object",
"properties": [
{
"name": "selectors",
"type": "array",
"items": {
"$ref": "Value"
},
"description": "Selectors in the list."
}
],
"description": "Selector list data."
},
{
"id": "CSSStyleSheetHeader",
"type": "object",
"properties": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId",
"description": "The stylesheet identifier."
},
{
"name": "sourceURL",
"type": "string",
"description": "Stylesheet resource URL."
},
{
"name": "startLine",
"type": "number",
"description": "Line offset of the stylesheet within the resource (zero based)."
},
{
"name": "startColumn",
"type": "number",
"description": "Column offset of the stylesheet within the resource (zero based)."
}
],
"description": "CSS stylesheet metainformation."
},
{
"id": "CSSRule",
"description": "CSS rule representation.",
"type": "object",
"properties": [
{
"name": "styleSheetId",
"$ref": "StyleSheetId",
"optional": true,
"description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from."
},
{
"name": "selectorList",
"$ref": "SelectorList",
"description": "Rule selector data."
},
{
"name": "style",
"$ref": "CSSStyle",
"description": "Associated style declaration."
}
]
},
{
"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"
]
}
]
},
{
"commands" : [
{
"name": "disable",
"description": "Disables domain notifications."
},
{
"name": "enable",
"description": "Enables domain notifications."
},
{
"name": "reload",
"parameters": [
{
"name":"ignoreCache",
"type": "boolean",
"optional": true,
"description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)."
}
],
"description": "Called on Ctrl+R with |ignoreCache|=false, which is used to toggle debug bounds rectangles and Ctrl+Shift+R with |ignoreCache|=true, which is used to toggle bubble locking."
},
{
"name": "getResourceTree",
"description": "Called when UI DevTools first loads. Used to populate sources panel.",
"returns": [
{
"name": "frameTree",
"$ref": "FrameResourceTree",
"description": "Present frame / resource tree structure."
}
],
"experimental": true
},
{
"name": "getResourceContent",
"async": true,
"description": "Returns source file content of the given resource.",
"parameters": [
{
"name": "frameId",
"type": "string",
"description": "Frame id to get resource for."
},
{
"name": "url",
"type": "string",
"description": "URL of the resource to get content for."
}
],
"returns": [
{
"name": "content",
"type": "string",
"description": "Resource content."
},
{
"name": "base64Encoded",
"type": "boolean",
"description": "True, if content was served as base64."
}
],
"experimental": true
}
],
"description": "Actions and events related to the inspected page belong to the page domain.",
"domain": "Page",
"dependencies": [
"DOM"
],
"types": [
{
"id": "ResourceType",
"type": "string",
"enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"],
"description": "Resource type as it was perceived by the rendering engine."
},
{
"id": "Frame",
"type": "object",
"description": "Information about the Frame on the page.",
"properties": [
{
"name": "id",
"type": "string",
"description": "Frame unique identifier."
},
{
"name": "url",
"type": "string",
"description": "Frame document's URL."
}
]
},
{
"id": "FrameResource",
"type": "object",
"description": "Information about the Resource on the page.",
"properties": [
{
"name": "url",
"type": "string",
"description": "Resource URL."
},
{
"name": "type",
"$ref": "ResourceType",
"description": "Type of this resource."
},
{
"name": "mimeType",
"type": "string",
"description": "Resource mimeType as determined by the browser."
}
],
"experimental": true
},
{
"id": "FrameResourceTree",
"type": "object",
"description": "Information about the Frame hierarchy along with their cached resources.",
"properties": [
{
"name": "frame",
"$ref": "Frame",
"description": "Frame information for this tree item."
},
{
"name": "childFrames",
"type": "array",
"optional": true,
"items":
{
"$ref": "FrameResourceTree"
},
"description": "Child frames."
},
{
"name": "resources",
"type": "array",
"items":
{
"$ref": "FrameResource"
},
"description": "Information about frame resources."
}
],
"experimental": true
}
]
},
{
"domain": "Tracing",
"experimental": true,
"commands": [
{
"name": "start",
"description": "Start trace events collection.",
"parameters": [
{ "name": "categories", "type": "string", "optional": true, "deprecated": true, "description": "Category/tag filter" },
{ "name": "options", "type": "string", "optional": true, "deprecated": true, "description": "Tracing options" },
{ "name": "bufferUsageReportingInterval", "type": "number", "optional": true, "description": "If set, the agent will issue bufferUsage events at this interval, specified in milliseconds" }
]
},
{
"name": "end",
"description": "Stop trace events collection."
},
{
"name": "disable",
"description": "Disables Tracing agent for the given page."
},
{
"name": "enable",
"description": "Enables Tracing agent for the given page."
}
],
"events": [
{
"name": "dataCollected",
"parameters": [
{ "name": "value", "type": "array", "items": { "type": "object" } }
],
"description": "Contains a bucket of collected trace events. When tracing is stopped collected events will be sent as a sequence of dataCollected events followed by tracingComplete event."
},
{
"name": "tracingComplete",
"description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.",
"parameters": [
{ "name": "dataLossOccurred", "type": "boolean", "optional": true, "description": "A handle of the stream that holds resulting trace data." }
]
},
{
"name": "bufferUsage",
"parameters": [
{ "name": "percentFull", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." },
{ "name": "eventCount", "type": "number", "optional": true, "description": "An approximate number of events in the trace log." },
{ "name": "value", "type": "number", "optional": true, "description": "A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size." }
]
}
]
}
],
"version": {
"major": "1",
"minor": "3"
}
}