Expand description
This domain exposes DOM read/write operations. Each DOM Node is represented with its mirror object
that has an id
. This id
can be used to get additional information on the Node, resolve it into
the JavaScript object wrapper, etc. It is important that client receives DOM events only for the
nodes that are known to the client. Backend keeps track of the nodes that were sent to the client
and never sends the same node twice. It is client’s responsibility to collect information about
the nodes that were sent to the client. Note that iframe
owner elements will return
corresponding document elements as their child nodes.
Structs§
- Backend
Node - Backend node with a friendly name. BackendNode
- Backend
Node Builder - Backend
Node Id - Unique DOM node identifier used to reference a node that may not have been pushed to the front-end. BackendNodeId
- BoxModel
- Box model. BoxModel
- BoxModel
Builder - Collect
Class Names From Subtree Params - Collects class names for the node with given id and all of it’s child nodes. collectClassNamesFromSubtree
- Collect
Class Names From Subtree Params Builder - Collect
Class Names From Subtree Returns - Collects class names for the node with given id and all of it’s child nodes. collectClassNamesFromSubtree
- Collect
Class Names From Subtree Returns Builder - Copy
ToParams - Creates a deep copy of the specified node and places it into the target container before the given anchor. copyTo
- Copy
ToParams Builder - Copy
ToReturns - Creates a deep copy of the specified node and places it into the target container before the given anchor. copyTo
- Copy
ToReturns Builder - CssComputed
Style Property - CssComputed
Style Property Builder - Describe
Node Params - Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. describeNode
- Describe
Node Params Builder - Describe
Node Returns - Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. describeNode
- Describe
Node Returns Builder - Detached
Element Info - A structure to hold the top-level node of a detached tree and an array of its retained descendants. DetachedElementInfo
- Detached
Element Info Builder - Disable
Params - Disables DOM agent for the given page. disable
- Disable
Returns - Disables DOM agent for the given page. disable
- Discard
Search Results Params - Discards search results from the session with the given id.
getSearchResults
should no longer be called for that search. discardSearchResults - Discard
Search Results Params Builder - Discard
Search Results Returns - Discards search results from the session with the given id.
getSearchResults
should no longer be called for that search. discardSearchResults - Enable
Params - Enables DOM agent for the given page. enable
- Enable
Params Builder - Enable
Returns - Enables DOM agent for the given page. enable
- Event
Attribute Modified - Fired when
Element
’s attribute is modified. attributeModified - Event
Attribute Removed - Fired when
Element
’s attribute is removed. attributeRemoved - Event
Character Data Modified - Mirrors
DOMCharacterDataModified
event. characterDataModified - Event
Child Node Count Updated - Fired when
Container
’s child node count has changed. childNodeCountUpdated - Event
Child Node Inserted - Mirrors
DOMNodeInserted
event. childNodeInserted - Event
Child Node Removed - Mirrors
DOMNodeRemoved
event. childNodeRemoved - Event
Distributed Nodes Updated - Called when distribution is changed. distributedNodesUpdated
- Event
Document Updated - Fired when
Document
has been totally updated. Node ids are no longer valid. documentUpdated - Event
Inline Style Invalidated - Fired when
Element
’s inline style is modified via a CSS property modification. inlineStyleInvalidated - Event
Pseudo Element Added - Called when a pseudo element is added to an element. pseudoElementAdded
- Event
Pseudo Element Removed - Called when a pseudo element is removed from an element. pseudoElementRemoved
- Event
Scrollable Flag Updated - Fired when a node’s scrollability state changes. scrollableFlagUpdated
- Event
SetChild Nodes - Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids. setChildNodes
- Event
Shadow Root Popped - Called when shadow root is popped from the element. shadowRootPopped
- Event
Shadow Root Pushed - Called when shadow root is pushed into the element. shadowRootPushed
- Event
TopLayer Elements Updated - Called when top layer elements are changed. topLayerElementsUpdated
- Focus
Params - Focuses the given element. focus
- Focus
Params Builder - Focus
Returns - Focuses the given element. focus
- GetAnchor
Element Params - Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target. getAnchorElement
- GetAnchor
Element Params Builder - GetAnchor
Element Returns - Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target. getAnchorElement
- GetAnchor
Element Returns Builder - GetAttributes
Params - Returns attributes for the specified node. getAttributes
- GetAttributes
Params Builder - GetAttributes
Returns - Returns attributes for the specified node. getAttributes
- GetAttributes
Returns Builder - GetBox
Model Params - Returns boxes for the given node. getBoxModel
- GetBox
Model Params Builder - GetBox
Model Returns - Returns boxes for the given node. getBoxModel
- GetBox
Model Returns Builder - GetContainer
ForNode Params - Returns the query container of the given node based on container query conditions: containerName, physical, and logical axes. If no axes are provided, the style container is returned, which is the direct parent or the closest element with a matching container-name. getContainerForNode
- GetContainer
ForNode Params Builder - GetContainer
ForNode Returns - Returns the query container of the given node based on container query conditions: containerName, physical, and logical axes. If no axes are provided, the style container is returned, which is the direct parent or the closest element with a matching container-name. getContainerForNode
- GetContainer
ForNode Returns Builder - GetContent
Quads Params - Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. getContentQuads
- GetContent
Quads Params Builder - GetContent
Quads Returns - Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. getContentQuads
- GetContent
Quads Returns Builder - GetDetached
DomNodes Params - Returns list of detached nodes getDetachedDomNodes
- GetDetached
DomNodes Returns - Returns list of detached nodes getDetachedDomNodes
- GetDetached
DomNodes Returns Builder - GetDocument
Params - Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. getDocument
- GetDocument
Params Builder - GetDocument
Returns - Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. getDocument
- GetDocument
Returns Builder - GetElement
ByRelation Params - Returns the NodeId of the matched element according to certain relations. getElementByRelation
- GetElement
ByRelation Params Builder - GetElement
ByRelation Returns - Returns the NodeId of the matched element according to certain relations. getElementByRelation
- GetElement
ByRelation Returns Builder - GetFile
Info Params - Returns file information for the given File wrapper. getFileInfo
- GetFile
Info Params Builder - GetFile
Info Returns - Returns file information for the given File wrapper. getFileInfo
- GetFile
Info Returns Builder - GetFrame
Owner Params - Returns iframe node that owns iframe with the given domain. getFrameOwner
- GetFrame
Owner Params Builder - GetFrame
Owner Returns - Returns iframe node that owns iframe with the given domain. getFrameOwner
- GetFrame
Owner Returns Builder - GetNode
ForLocation Params - Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. getNodeForLocation
- GetNode
ForLocation Params Builder - GetNode
ForLocation Returns - Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. getNodeForLocation
- GetNode
ForLocation Returns Builder - GetNode
Stack Traces Params - Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. getNodeStackTraces
- GetNode
Stack Traces Params Builder - GetNode
Stack Traces Returns - Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. getNodeStackTraces
- GetNode
Stack Traces Returns Builder - GetNodes
ForSubtree ByStyle Params - Finds nodes with a given computed style in a subtree. getNodesForSubtreeByStyle
- GetNodes
ForSubtree ByStyle Params Builder - GetNodes
ForSubtree ByStyle Returns - Finds nodes with a given computed style in a subtree. getNodesForSubtreeByStyle
- GetNodes
ForSubtree ByStyle Returns Builder - GetOuter
Html Params - Returns node’s HTML markup. getOuterHTML
- GetOuter
Html Params Builder - GetOuter
Html Returns - Returns node’s HTML markup. getOuterHTML
- GetOuter
Html Returns Builder - GetQuerying
Descendants ForContainer Params - Returns the descendants of a container query container that have container queries against this container. getQueryingDescendantsForContainer
- GetQuerying
Descendants ForContainer Params Builder - GetQuerying
Descendants ForContainer Returns - Returns the descendants of a container query container that have container queries against this container. getQueryingDescendantsForContainer
- GetQuerying
Descendants ForContainer Returns Builder - GetRelayout
Boundary Params - Returns the id of the nearest ancestor that is a relayout boundary. getRelayoutBoundary
- GetRelayout
Boundary Params Builder - GetRelayout
Boundary Returns - Returns the id of the nearest ancestor that is a relayout boundary. getRelayoutBoundary
- GetRelayout
Boundary Returns Builder - GetSearch
Results Params - Returns search results from given
fromIndex
to giventoIndex
from the search with the given identifier. getSearchResults - GetSearch
Results Params Builder - GetSearch
Results Returns - Returns search results from given
fromIndex
to giventoIndex
from the search with the given identifier. getSearchResults - GetSearch
Results Returns Builder - GetTop
Layer Elements Params - Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content. getTopLayerElements
- GetTop
Layer Elements Returns - Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content. getTopLayerElements
- GetTop
Layer Elements Returns Builder - Hide
Highlight Params - Hides any highlight. hideHighlight
- Hide
Highlight Returns - Hides any highlight. hideHighlight
- Highlight
Node Params - Highlights DOM node. highlightNode
- Highlight
Node Returns - Highlights DOM node. highlightNode
- Highlight
Rect Params - Highlights given rectangle. highlightRect
- Highlight
Rect Returns - Highlights given rectangle. highlightRect
- Mark
Undoable State Params - Marks last undoable state. markUndoableState
- Mark
Undoable State Returns - Marks last undoable state. markUndoableState
- Move
ToParams - Moves node into the new container, places it before the given anchor. moveTo
- Move
ToParams Builder - Move
ToReturns - Moves node into the new container, places it before the given anchor. moveTo
- Move
ToReturns Builder - Node
- DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type. Node
- Node
Builder - NodeId
- Unique DOM node identifier. NodeId
- Perform
Search Params - Searches for a given string in the DOM tree. Use
getSearchResults
to access search results orcancelSearch
to end this search session. performSearch - Perform
Search Params Builder - Perform
Search Returns - Searches for a given string in the DOM tree. Use
getSearchResults
to access search results orcancelSearch
to end this search session. performSearch - Perform
Search Returns Builder - Push
Node ByPath ToFrontend Params - Requests that the node is sent to the caller given its path. // FIXME, use XPath pushNodeByPathToFrontend
- Push
Node ByPath ToFrontend Params Builder - Push
Node ByPath ToFrontend Returns - Requests that the node is sent to the caller given its path. // FIXME, use XPath pushNodeByPathToFrontend
- Push
Node ByPath ToFrontend Returns Builder - Push
Nodes ByBackend IdsTo Frontend Params - Requests that a batch of nodes is sent to the caller given their backend node ids. pushNodesByBackendIdsToFrontend
- Push
Nodes ByBackend IdsTo Frontend Params Builder - Push
Nodes ByBackend IdsTo Frontend Returns - Requests that a batch of nodes is sent to the caller given their backend node ids. pushNodesByBackendIdsToFrontend
- Push
Nodes ByBackend IdsTo Frontend Returns Builder - Quad
- An array of quad vertices, x immediately followed by y for each point, points clock-wise. Quad
- Query
Selector AllParams - Executes
querySelectorAll
on a given node. querySelectorAll - Query
Selector AllParams Builder - Query
Selector AllReturns - Executes
querySelectorAll
on a given node. querySelectorAll - Query
Selector AllReturns Builder - Query
Selector Params - Executes
querySelector
on a given node. querySelector - Query
Selector Params Builder - Query
Selector Returns - Executes
querySelector
on a given node. querySelector - Query
Selector Returns Builder - Rect
- Rectangle. Rect
- Rect
Builder - Redo
Params - Re-does the last undone action. redo
- Redo
Returns - Re-does the last undone action. redo
- Remove
Attribute Params - Removes attribute with given name from an element with given id. removeAttribute
- Remove
Attribute Params Builder - Remove
Attribute Returns - Removes attribute with given name from an element with given id. removeAttribute
- Remove
Node Params - Removes node with given id. removeNode
- Remove
Node Params Builder - Remove
Node Returns - Removes node with given id. removeNode
- Request
Child Nodes Params - Requests that children of the node with given id are returned to the caller in form of
setChildNodes
events where not only immediate children are retrieved, but all children down to the specified depth. requestChildNodes - Request
Child Nodes Params Builder - Request
Child Nodes Returns - Requests that children of the node with given id are returned to the caller in form of
setChildNodes
events where not only immediate children are retrieved, but all children down to the specified depth. requestChildNodes - Request
Node Params - Requests that the node is sent to the caller given the JavaScript node object reference. All
nodes that form the path from the node to the root are also sent to the client as a series of
setChildNodes
notifications. requestNode - Request
Node Params Builder - Request
Node Returns - Requests that the node is sent to the caller given the JavaScript node object reference. All
nodes that form the path from the node to the root are also sent to the client as a series of
setChildNodes
notifications. requestNode - Request
Node Returns Builder - Resolve
Node Params - Resolves the JavaScript node object for a given NodeId or BackendNodeId. resolveNode
- Resolve
Node Params Builder - Resolve
Node Returns - Resolves the JavaScript node object for a given NodeId or BackendNodeId. resolveNode
- Resolve
Node Returns Builder - Rgba
- A structure holding an RGBA color. RGBA
- Rgba
Builder - Scroll
Into View IfNeeded Params - Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node. scrollIntoViewIfNeeded
- Scroll
Into View IfNeeded Params Builder - Scroll
Into View IfNeeded Returns - Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node. scrollIntoViewIfNeeded
- SetAttribute
Value Params - Sets attribute for an element with given id. setAttributeValue
- SetAttribute
Value Params Builder - SetAttribute
Value Returns - Sets attribute for an element with given id. setAttributeValue
- SetAttributes
AsText Params - Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. setAttributesAsText
- SetAttributes
AsText Params Builder - SetAttributes
AsText Returns - Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. setAttributesAsText
- SetFile
Input Files Params - Sets files for the given file input element. setFileInputFiles
- SetFile
Input Files Params Builder - SetFile
Input Files Returns - Sets files for the given file input element. setFileInputFiles
- SetInspected
Node Params - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). setInspectedNode
- SetInspected
Node Params Builder - SetInspected
Node Returns - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). setInspectedNode
- SetNode
Name Params - Sets node name for a node with given id. setNodeName
- SetNode
Name Params Builder - SetNode
Name Returns - Sets node name for a node with given id. setNodeName
- SetNode
Name Returns Builder - SetNode
Stack Traces Enabled Params - Sets if stack traces should be captured for Nodes. See
Node.getNodeStackTraces
. Default is disabled. setNodeStackTracesEnabled - SetNode
Stack Traces Enabled Params Builder - SetNode
Stack Traces Enabled Returns - Sets if stack traces should be captured for Nodes. See
Node.getNodeStackTraces
. Default is disabled. setNodeStackTracesEnabled - SetNode
Value Params - Sets node value for a node with given id. setNodeValue
- SetNode
Value Params Builder - SetNode
Value Returns - Sets node value for a node with given id. setNodeValue
- SetOuter
Html Params - Sets node HTML markup, returns new node id. setOuterHTML
- SetOuter
Html Params Builder - SetOuter
Html Returns - Sets node HTML markup, returns new node id. setOuterHTML
- Shape
Outside Info - CSS Shape Outside details. ShapeOutsideInfo
- Shape
Outside Info Builder - Undo
Params - Undoes the last performed action. undo
- Undo
Returns - Undoes the last performed action. undo
Enums§
- Compatibility
Mode - Document compatibility mode.
- Enable
Include Whitespace - Whether to include whitespaces in the children array of returned Nodes.
- GetElement
ByRelation Relation - Type of relation to get.
- Logical
Axes - ContainerSelector logical axes
- Physical
Axes - ContainerSelector physical axes
- Pseudo
Type - Pseudo element type.
- Scroll
Orientation - Physical scroll orientation
- Shadow
Root Type - Shadow root type.