Module dom

Source
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§

BackendNode
Backend node with a friendly name. BackendNode
BackendNodeBuilder
BackendNodeId
Unique DOM node identifier used to reference a node that may not have been pushed to the front-end. BackendNodeId
BoxModel
Box model. BoxModel
BoxModelBuilder
CollectClassNamesFromSubtreeParams
Collects class names for the node with given id and all of it’s child nodes. collectClassNamesFromSubtree
CollectClassNamesFromSubtreeParamsBuilder
CollectClassNamesFromSubtreeReturns
Collects class names for the node with given id and all of it’s child nodes. collectClassNamesFromSubtree
CollectClassNamesFromSubtreeReturnsBuilder
CopyToParams
Creates a deep copy of the specified node and places it into the target container before the given anchor. copyTo
CopyToParamsBuilder
CopyToReturns
Creates a deep copy of the specified node and places it into the target container before the given anchor. copyTo
CopyToReturnsBuilder
CssComputedStyleProperty
CssComputedStylePropertyBuilder
DescribeNodeParams
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. describeNode
DescribeNodeParamsBuilder
DescribeNodeReturns
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. describeNode
DescribeNodeReturnsBuilder
DetachedElementInfo
A structure to hold the top-level node of a detached tree and an array of its retained descendants. DetachedElementInfo
DetachedElementInfoBuilder
DisableParams
Disables DOM agent for the given page. disable
DisableReturns
Disables DOM agent for the given page. disable
DiscardSearchResultsParams
Discards search results from the session with the given id. getSearchResults should no longer be called for that search. discardSearchResults
DiscardSearchResultsParamsBuilder
DiscardSearchResultsReturns
Discards search results from the session with the given id. getSearchResults should no longer be called for that search. discardSearchResults
EnableParams
Enables DOM agent for the given page. enable
EnableParamsBuilder
EnableReturns
Enables DOM agent for the given page. enable
EventAttributeModified
Fired when Element’s attribute is modified. attributeModified
EventAttributeRemoved
Fired when Element’s attribute is removed. attributeRemoved
EventCharacterDataModified
Mirrors DOMCharacterDataModified event. characterDataModified
EventChildNodeCountUpdated
Fired when Container’s child node count has changed. childNodeCountUpdated
EventChildNodeInserted
Mirrors DOMNodeInserted event. childNodeInserted
EventChildNodeRemoved
Mirrors DOMNodeRemoved event. childNodeRemoved
EventDistributedNodesUpdated
Called when distribution is changed. distributedNodesUpdated
EventDocumentUpdated
Fired when Document has been totally updated. Node ids are no longer valid. documentUpdated
EventInlineStyleInvalidated
Fired when Element’s inline style is modified via a CSS property modification. inlineStyleInvalidated
EventPseudoElementAdded
Called when a pseudo element is added to an element. pseudoElementAdded
EventPseudoElementRemoved
Called when a pseudo element is removed from an element. pseudoElementRemoved
EventScrollableFlagUpdated
Fired when a node’s scrollability state changes. scrollableFlagUpdated
EventSetChildNodes
Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids. setChildNodes
EventShadowRootPopped
Called when shadow root is popped from the element. shadowRootPopped
EventShadowRootPushed
Called when shadow root is pushed into the element. shadowRootPushed
EventTopLayerElementsUpdated
Called when top layer elements are changed. topLayerElementsUpdated
FocusParams
Focuses the given element. focus
FocusParamsBuilder
FocusReturns
Focuses the given element. focus
GetAnchorElementParams
Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target. getAnchorElement
GetAnchorElementParamsBuilder
GetAnchorElementReturns
Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target. getAnchorElement
GetAnchorElementReturnsBuilder
GetAttributesParams
Returns attributes for the specified node. getAttributes
GetAttributesParamsBuilder
GetAttributesReturns
Returns attributes for the specified node. getAttributes
GetAttributesReturnsBuilder
GetBoxModelParams
Returns boxes for the given node. getBoxModel
GetBoxModelParamsBuilder
GetBoxModelReturns
Returns boxes for the given node. getBoxModel
GetBoxModelReturnsBuilder
GetContainerForNodeParams
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
GetContainerForNodeParamsBuilder
GetContainerForNodeReturns
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
GetContainerForNodeReturnsBuilder
GetContentQuadsParams
Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. getContentQuads
GetContentQuadsParamsBuilder
GetContentQuadsReturns
Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. getContentQuads
GetContentQuadsReturnsBuilder
GetDetachedDomNodesParams
Returns list of detached nodes getDetachedDomNodes
GetDetachedDomNodesReturns
Returns list of detached nodes getDetachedDomNodes
GetDetachedDomNodesReturnsBuilder
GetDocumentParams
Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. getDocument
GetDocumentParamsBuilder
GetDocumentReturns
Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. getDocument
GetDocumentReturnsBuilder
GetElementByRelationParams
Returns the NodeId of the matched element according to certain relations. getElementByRelation
GetElementByRelationParamsBuilder
GetElementByRelationReturns
Returns the NodeId of the matched element according to certain relations. getElementByRelation
GetElementByRelationReturnsBuilder
GetFileInfoParams
Returns file information for the given File wrapper. getFileInfo
GetFileInfoParamsBuilder
GetFileInfoReturns
Returns file information for the given File wrapper. getFileInfo
GetFileInfoReturnsBuilder
GetFrameOwnerParams
Returns iframe node that owns iframe with the given domain. getFrameOwner
GetFrameOwnerParamsBuilder
GetFrameOwnerReturns
Returns iframe node that owns iframe with the given domain. getFrameOwner
GetFrameOwnerReturnsBuilder
GetNodeForLocationParams
Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. getNodeForLocation
GetNodeForLocationParamsBuilder
GetNodeForLocationReturns
Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. getNodeForLocation
GetNodeForLocationReturnsBuilder
GetNodeStackTracesParams
Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. getNodeStackTraces
GetNodeStackTracesParamsBuilder
GetNodeStackTracesReturns
Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. getNodeStackTraces
GetNodeStackTracesReturnsBuilder
GetNodesForSubtreeByStyleParams
Finds nodes with a given computed style in a subtree. getNodesForSubtreeByStyle
GetNodesForSubtreeByStyleParamsBuilder
GetNodesForSubtreeByStyleReturns
Finds nodes with a given computed style in a subtree. getNodesForSubtreeByStyle
GetNodesForSubtreeByStyleReturnsBuilder
GetOuterHtmlParams
Returns node’s HTML markup. getOuterHTML
GetOuterHtmlParamsBuilder
GetOuterHtmlReturns
Returns node’s HTML markup. getOuterHTML
GetOuterHtmlReturnsBuilder
GetQueryingDescendantsForContainerParams
Returns the descendants of a container query container that have container queries against this container. getQueryingDescendantsForContainer
GetQueryingDescendantsForContainerParamsBuilder
GetQueryingDescendantsForContainerReturns
Returns the descendants of a container query container that have container queries against this container. getQueryingDescendantsForContainer
GetQueryingDescendantsForContainerReturnsBuilder
GetRelayoutBoundaryParams
Returns the id of the nearest ancestor that is a relayout boundary. getRelayoutBoundary
GetRelayoutBoundaryParamsBuilder
GetRelayoutBoundaryReturns
Returns the id of the nearest ancestor that is a relayout boundary. getRelayoutBoundary
GetRelayoutBoundaryReturnsBuilder
GetSearchResultsParams
Returns search results from given fromIndex to given toIndex from the search with the given identifier. getSearchResults
GetSearchResultsParamsBuilder
GetSearchResultsReturns
Returns search results from given fromIndex to given toIndex from the search with the given identifier. getSearchResults
GetSearchResultsReturnsBuilder
GetTopLayerElementsParams
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
GetTopLayerElementsReturns
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
GetTopLayerElementsReturnsBuilder
HideHighlightParams
Hides any highlight. hideHighlight
HideHighlightReturns
Hides any highlight. hideHighlight
HighlightNodeParams
Highlights DOM node. highlightNode
HighlightNodeReturns
Highlights DOM node. highlightNode
HighlightRectParams
Highlights given rectangle. highlightRect
HighlightRectReturns
Highlights given rectangle. highlightRect
MarkUndoableStateParams
Marks last undoable state. markUndoableState
MarkUndoableStateReturns
Marks last undoable state. markUndoableState
MoveToParams
Moves node into the new container, places it before the given anchor. moveTo
MoveToParamsBuilder
MoveToReturns
Moves node into the new container, places it before the given anchor. moveTo
MoveToReturnsBuilder
Node
DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type. Node
NodeBuilder
NodeId
Unique DOM node identifier. NodeId
PerformSearchParams
Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session. performSearch
PerformSearchParamsBuilder
PerformSearchReturns
Searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session. performSearch
PerformSearchReturnsBuilder
PushNodeByPathToFrontendParams
Requests that the node is sent to the caller given its path. // FIXME, use XPath pushNodeByPathToFrontend
PushNodeByPathToFrontendParamsBuilder
PushNodeByPathToFrontendReturns
Requests that the node is sent to the caller given its path. // FIXME, use XPath pushNodeByPathToFrontend
PushNodeByPathToFrontendReturnsBuilder
PushNodesByBackendIdsToFrontendParams
Requests that a batch of nodes is sent to the caller given their backend node ids. pushNodesByBackendIdsToFrontend
PushNodesByBackendIdsToFrontendParamsBuilder
PushNodesByBackendIdsToFrontendReturns
Requests that a batch of nodes is sent to the caller given their backend node ids. pushNodesByBackendIdsToFrontend
PushNodesByBackendIdsToFrontendReturnsBuilder
Quad
An array of quad vertices, x immediately followed by y for each point, points clock-wise. Quad
QuerySelectorAllParams
Executes querySelectorAll on a given node. querySelectorAll
QuerySelectorAllParamsBuilder
QuerySelectorAllReturns
Executes querySelectorAll on a given node. querySelectorAll
QuerySelectorAllReturnsBuilder
QuerySelectorParams
Executes querySelector on a given node. querySelector
QuerySelectorParamsBuilder
QuerySelectorReturns
Executes querySelector on a given node. querySelector
QuerySelectorReturnsBuilder
Rect
Rectangle. Rect
RectBuilder
RedoParams
Re-does the last undone action. redo
RedoReturns
Re-does the last undone action. redo
RemoveAttributeParams
Removes attribute with given name from an element with given id. removeAttribute
RemoveAttributeParamsBuilder
RemoveAttributeReturns
Removes attribute with given name from an element with given id. removeAttribute
RemoveNodeParams
Removes node with given id. removeNode
RemoveNodeParamsBuilder
RemoveNodeReturns
Removes node with given id. removeNode
RequestChildNodesParams
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
RequestChildNodesParamsBuilder
RequestChildNodesReturns
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
RequestNodeParams
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
RequestNodeParamsBuilder
RequestNodeReturns
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
RequestNodeReturnsBuilder
ResolveNodeParams
Resolves the JavaScript node object for a given NodeId or BackendNodeId. resolveNode
ResolveNodeParamsBuilder
ResolveNodeReturns
Resolves the JavaScript node object for a given NodeId or BackendNodeId. resolveNode
ResolveNodeReturnsBuilder
Rgba
A structure holding an RGBA color. RGBA
RgbaBuilder
ScrollIntoViewIfNeededParams
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
ScrollIntoViewIfNeededParamsBuilder
ScrollIntoViewIfNeededReturns
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
SetAttributeValueParams
Sets attribute for an element with given id. setAttributeValue
SetAttributeValueParamsBuilder
SetAttributeValueReturns
Sets attribute for an element with given id. setAttributeValue
SetAttributesAsTextParams
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
SetAttributesAsTextParamsBuilder
SetAttributesAsTextReturns
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
SetFileInputFilesParams
Sets files for the given file input element. setFileInputFiles
SetFileInputFilesParamsBuilder
SetFileInputFilesReturns
Sets files for the given file input element. setFileInputFiles
SetInspectedNodeParams
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). setInspectedNode
SetInspectedNodeParamsBuilder
SetInspectedNodeReturns
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). setInspectedNode
SetNodeNameParams
Sets node name for a node with given id. setNodeName
SetNodeNameParamsBuilder
SetNodeNameReturns
Sets node name for a node with given id. setNodeName
SetNodeNameReturnsBuilder
SetNodeStackTracesEnabledParams
Sets if stack traces should be captured for Nodes. See Node.getNodeStackTraces. Default is disabled. setNodeStackTracesEnabled
SetNodeStackTracesEnabledParamsBuilder
SetNodeStackTracesEnabledReturns
Sets if stack traces should be captured for Nodes. See Node.getNodeStackTraces. Default is disabled. setNodeStackTracesEnabled
SetNodeValueParams
Sets node value for a node with given id. setNodeValue
SetNodeValueParamsBuilder
SetNodeValueReturns
Sets node value for a node with given id. setNodeValue
SetOuterHtmlParams
Sets node HTML markup, returns new node id. setOuterHTML
SetOuterHtmlParamsBuilder
SetOuterHtmlReturns
Sets node HTML markup, returns new node id. setOuterHTML
ShapeOutsideInfo
CSS Shape Outside details. ShapeOutsideInfo
ShapeOutsideInfoBuilder
UndoParams
Undoes the last performed action. undo
UndoReturns
Undoes the last performed action. undo

Enums§

CompatibilityMode
Document compatibility mode.
EnableIncludeWhitespace
Whether to include whitespaces in the children array of returned Nodes.
GetElementByRelationRelation
Type of relation to get.
LogicalAxes
ContainerSelector logical axes
PhysicalAxes
ContainerSelector physical axes
PseudoType
Pseudo element type.
ScrollOrientation
Physical scroll orientation
ShadowRootType
Shadow root type.