DOM

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.

Common API Experimental API Not implemented

Chrome (CDP 1.2)

Edge 0.1

Edge 0.2 (preview)

Node (V8)

Safari iOS 10.0

collectClassNamesFromSubtree collectClassNamesFromSubtree
copyTo copyTo
disable disable disable
discardSearchResults discardSearchResults discardSearchResults
enable enable enable
focus focus focus
getAttributes getAttributes getAttributes getAttributes
getBoxModel getBoxModel
getDocument getDocument getDocument getDocument
getFlattenedDocument getFlattenedDocument
getNodeForLocation getNodeForLocation
getOuterHTML getOuterHTML getOuterHTML getOuterHTML
getRelayoutBoundary getRelayoutBoundary
getSearchResults getSearchResults getSearchResults
hideHighlight hideHighlight hideHighlight hideHighlight
highlightNode highlightNode highlightNode highlightNode
highlightRect highlightRect highlightRect
markUndoableState markUndoableState markUndoableState
moveTo moveTo moveTo
performSearch performSearch performSearch
pushNodeByPathToFrontend pushNodeByPathToFrontend pushNodeByPathToFrontend
pushNodesByBackendIdsToFrontend pushNodesByBackendIdsToFrontend pushNodesByBackendIdsToFrontend
querySelector querySelector querySelector querySelector
querySelectorAll querySelectorAll querySelectorAll querySelectorAll
redo redo redo
removeAttribute removeAttribute removeAttribute
removeNode removeNode removeNode
requestChildNodes requestChildNodes requestChildNodes requestChildNodes
requestNode requestNode requestNode requestNode
resolveNode resolveNode resolveNode resolveNode
setAttributeValue setAttributeValue setAttributeValue
setAttributesAsText setAttributesAsText setAttributesAsText
setFileInputFiles setFileInputFiles
setInspectedNode setInspectedNode setInspectedNode
setNodeName setNodeName setNodeName
setNodeValue setNodeValue setNodeValue
setOuterHTML setOuterHTML setOuterHTML
undo undo undo
getHighlightObjectForTest
highlightFrame highlightFrame
highlightQuad highlightQuad
setInspectMode
getAccessibilityPropertiesForNode getAccessibilityPropertiesForNode
getEventListenersForNode getEventListenersForNode
highlightSelector highlightSelector
pushNodeByBackendIdToFrontend pushNodeByBackendIdToFrontend
releaseBackendNodeIds releaseBackendNodeIds
setInspectModeEnabled setInspectModeEnabled

Events

Chrome (CDP 1.2)

Edge 0.1

Edge 0.2 (preview)

Node (V8)

Safari iOS 10.0

attributeModified attributeModified attributeModified attributeModified
attributeRemoved attributeRemoved attributeRemoved attributeRemoved
characterDataModified characterDataModified characterDataModified characterDataModified
childNodeCountUpdated childNodeCountUpdated childNodeCountUpdated
childNodeInserted childNodeInserted childNodeInserted childNodeInserted
childNodeRemoved childNodeRemoved childNodeRemoved childNodeRemoved
distributedNodesUpdated distributedNodesUpdated
documentUpdated documentUpdated documentUpdated documentUpdated
inlineStyleInvalidated inlineStyleInvalidated inlineStyleInvalidated
pseudoElementAdded pseudoElementAdded pseudoElementAdded
pseudoElementRemoved pseudoElementRemoved pseudoElementRemoved
setChildNodes setChildNodes setChildNodes setChildNodes
shadowRootPopped shadowRootPopped shadowRootPopped
shadowRootPushed shadowRootPushed shadowRootPushed
inspectNodeRequested
nodeHighlightRequested

Types

Chrome (CDP 1.2)

Edge 0.1

Edge 0.2 (preview)

Node (V8)

Safari iOS 10.0

BackendNode BackendNode
BackendNodeId BackendNodeId BackendNodeId
BoxModel BoxModel
Node Node Node Node
NodeId NodeId NodeId NodeId
PseudoType PseudoType PseudoType
Quad Quad Quad
RGBA RGBA RGBA
Rect Rect
ShadowRootType ShadowRootType ShadowRootType
ShapeOutsideInfo ShapeOutsideInfo
HighlightConfig HighlightConfig HighlightConfig
InspectMode
AccessibilityProperties AccessibilityProperties
EventListener EventListener
LiveRegionRelevant LiveRegionRelevant
RGBAColor RGBAColor