Record Replay Protocol

Methods

DOM.getAllBoundingClientRects

Get the bounding client rect for all elements on the page.

Return Object
elements
array[ NodeBounds ]

All elements on the page and their bounding client rects. These are are given in stacking order: elements earlier in the list will be drawn in front of later elements.

DOM.getBoundingClientRect

Get the bounding client rect for a node.

parameters
node
Pause.ObjectId

Node to get the bounds for.

Return Object
rect
Rect

Bounding client rect for the node.

DOM.getBoxModel

Get boxes for a node.

parameters
node
Pause.ObjectId

Node to get boxes for.

Return Object
model
BoxModel

Box model data for the node.

DOM.getDocument

Get the page's root document.

Return Object
document
Pause.ObjectId

ID for the document.

data
Pause.PauseData

Information about the document and related nodes.

DOM.getEventListeners

Get the event listeners attached to a node in the page.

parameters
node
Pause.ObjectId

Node to get listeners for.

Return Object
listeners
array[ EventListener ]

All event listeners for the node.

data
Pause.PauseData

Additional information about the event listeners.

DOM.getParentNodes

Load previews for an object and its transitive parents up to the root document.

parameters
node
Pause.ObjectId

Node to load the previews for.

Return Object
data
Pause.PauseData

Returned data, including previews for the object and its transitive parents.

DOM.performSearch

Search the DOM for nodes containing a string.

parameters
query
string

Text to search for.

Return Object
nodes
array[ Pause.ObjectId ]

Nodes whose name, attributes, or text content contains the query string.

data
Pause.PauseData

Any data associated with the returned nodes, including all parent nodes up to the root document.

DOM.querySelector

Call querySelector() on a node in the page.

parameters
node
Pause.ObjectId

Base node for the query.

selector
string

Selector to query.

Return Object
result
Pause.ObjectId

ID of the found node, omitted if none was found.

data
Pause.PauseData

Information about the returned node and related nodes, including all parent nodes up to the root document.

DOM.repaintGraphics

Paint the state of the DOM at this pause, even if no equivalent paint occurred when originally recording. In the latter case a best-effort attempt will be made to paint the current graphics, but the result might not be identical to what would have originally been drawn while recording.

Return Object
description
Graphics.ScreenShotDescription

Description of the resulting screen shot.

screenShot
Graphics.ScreenShot

Contents of the screen shot. If an identical screen shot was previously returned, this will be omitted.

Types

DOM.Attr

Description of an element attribute.

Type: object

properties
name
string

Value of attr.name.

value
string

Value of attr.value.

DOM.BoxModel

Description of the box model for a node.

Type: object

properties
node
Pause.ObjectId

Node this is the box model for.

content
Quads

Quads holding the node's content.

padding
Quads

Quads including the content and any padding between the border.

border
Quads

Quads including the border.

margin
Quads

Quads including the border and any margin between other nodes.

DOM.ClipBounds

Clipping bounds that are applied to an element. These come from an ancestor element that has the CSS overflow property set. Bounds that have no effect on the element are left out.

Type: object

properties
left
number
top
number
right
number
bottom
number

DOM.EventListener

Description of an event listener on a page.

Type: object

properties
node
Pause.ObjectId

Node the listener is attached to.

handler
Pause.ObjectId

Handler function associated with the listener.

type
string

Event being listened for.

capture
boolean

Whether the listener captures events.

DOM.Node

Description of a node's contents which is attached to its associated Pause.ObjectPreview.node.

Type: object

properties
nodeType
integer

Value of node.nodeType.

nodeName
string

Value of node.nodeName.

nodeValue
string

Value of node.nodeValue.

isConnected
boolean

Value of node.isConnected.

attributes
array[ Attr ]

For element nodes, the attributes.

pseudoType
PseudoType

For pseudo elements, the pseudo type.

style
Pause.ObjectId

For element nodes, ID of any inline style declaration.

parentNode
Pause.ObjectId

ID of any node.parentNode. For the document node in an iframe, this will be the iframe element itself instead of null.

childNodes
array[ Pause.ObjectId ]

IDs of all node.childNodes. For iframe elements this will additionally contain the document element of that frame.

documentURL
string

For document nodes, the URL property.

DOM.NodeBounds

Describes the bounding client rect for a node.

Type: object

properties
node
Pause.ObjectId

Node being described.

rect
Rect

Bounding client rect for the node. This is the smallest rect that includes all client rects.

rects
array[ Rect ]

All client rects for the node if there is more than one.

clipBounds
ClipBounds

Clipping bounds for the node.

visibility
string

Set to "hidden" for nodes with that CSS property

pointerEvents
string

Set to "none" for nodes with that CSS property

DOM.PseudoType

Type of a pseudo element.

Allowed Values: before, after, marker

Type: string

DOM.Quads

Compact representation of an array of DOMQuads, projected onto the x/y plane (i.e. z and w values in points are ignored). Each quad is 8 elements, with the x and y coordinates of the four points in the quad. The entire array will have a length that is a multiple of 8.

Type: array

DOM.Rect

Compact representation of a DOMRect. A rect has four elements, listing the rect's left, top, right, and bottom values in order.

Type: array