Chrome Remote Interface v0.4.1 ChromeRemoteInterface.RPC.DOM View Source
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.
Link to this section Summary
Functions
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
Disables DOM agent for the given page.
Enables DOM agent for the given page.
Focuses the given element.
Returns attributes for the specified node.
Returns boxes for the given node.
Returns the root DOM node (and optionally the subtree) to the caller.
Returns the root DOM node (and optionally the subtree) to the caller.
Returns node's HTML markup.
Hides any highlight.
Highlights DOM node.
Highlights given rectangle.
Moves node into the new container, places it before the given anchor.
Executes querySelector
on a given node.
Executes querySelectorAll
on a given node.
Removes attribute with given name from an element with given id.
Removes node with given id.
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.
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.
Resolves the JavaScript node object for a given NodeId or BackendNodeId.
Sets attribute for an element with given id.
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.
Sets files for the given file input element.
Sets node name for a node with given id.
Sets node value for a node with given id.
Sets node HTML markup, returns new node id.
Link to this section Functions
describeNode(page_pid) View Source
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
Parameters:
nodeId -
describeNode(page_pid, parameters) View Source
describeNode(page_pid, parameters, opts) View Source
disable(page_pid) View Source
Disables DOM agent for the given page.
Parameters:
disable(page_pid, parameters) View Source
disable(page_pid, parameters, opts) View Source
enable(page_pid) View Source
Enables DOM agent for the given page.
Parameters:
enable(page_pid, parameters) View Source
enable(page_pid, parameters, opts) View Source
experimental?() View Source
focus(page_pid) View Source
Focuses the given element.
Parameters:
nodeId -
focus(page_pid, parameters) View Source
focus(page_pid, parameters, opts) View Source
getAttributes(page_pid) View Source
Returns attributes for the specified node.
Parameters:
nodeId -
getAttributes(page_pid, parameters) View Source
getAttributes(page_pid, parameters, opts) View Source
getBoxModel(page_pid) View Source
Returns boxes for the given node.
Parameters:
nodeId -
getBoxModel(page_pid, parameters) View Source
getBoxModel(page_pid, parameters, opts) View Source
getDocument(page_pid) View Source
Returns the root DOM node (and optionally the subtree) to the caller.
Parameters:
depth -
getDocument(page_pid, parameters) View Source
getDocument(page_pid, parameters, opts) View Source
getFlattenedDocument(page_pid) View Source
Returns the root DOM node (and optionally the subtree) to the caller.
Parameters:
depth -
getFlattenedDocument(page_pid, parameters) View Source
getFlattenedDocument(page_pid, parameters, opts) View Source
getOuterHTML(page_pid) View Source
Returns node's HTML markup.
Parameters:
nodeId -
getOuterHTML(page_pid, parameters) View Source
getOuterHTML(page_pid, parameters, opts) View Source
hideHighlight(page_pid) View Source
Hides any highlight.
Parameters:
hideHighlight(page_pid, parameters) View Source
hideHighlight(page_pid, parameters, opts) View Source
highlightNode(page_pid) View Source
Highlights DOM node.
Parameters:
highlightNode(page_pid, parameters) View Source
highlightNode(page_pid, parameters, opts) View Source
highlightRect(page_pid) View Source
Highlights given rectangle.
Parameters:
highlightRect(page_pid, parameters) View Source
highlightRect(page_pid, parameters, opts) View Source
moveTo(page_pid) View Source
Moves node into the new container, places it before the given anchor.
Parameters:
nodeId - targetNodeId
).
moveTo(page_pid, parameters) View Source
moveTo(page_pid, parameters, opts) View Source
querySelector(page_pid) View Source
Executes querySelector
on a given node.
Parameters:
nodeId -
querySelector(page_pid, parameters) View Source
querySelector(page_pid, parameters, opts) View Source
querySelectorAll(page_pid) View Source
Executes querySelectorAll
on a given node.
Parameters:
nodeId -
querySelectorAll(page_pid, parameters) View Source
querySelectorAll(page_pid, parameters, opts) View Source
removeAttribute(page_pid) View Source
Removes attribute with given name from an element with given id.
Parameters:
nodeId -
removeAttribute(page_pid, parameters) View Source
removeAttribute(page_pid, parameters, opts) View Source
removeNode(page_pid) View Source
Removes node with given id.
Parameters:
nodeId -
removeNode(page_pid, parameters) View Source
removeNode(page_pid, parameters, opts) View Source
requestChildNodes(page_pid) View Source
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.
Parameters:
nodeId -
requestChildNodes(page_pid, parameters) View Source
requestChildNodes(page_pid, parameters, opts) View Source
requestNode(page_pid) View Source
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.
Parameters:
objectId -
requestNode(page_pid, parameters) View Source
requestNode(page_pid, parameters, opts) View Source
resolveNode(page_pid) View Source
Resolves the JavaScript node object for a given NodeId or BackendNodeId.
Parameters:
nodeId -
resolveNode(page_pid, parameters) View Source
resolveNode(page_pid, parameters, opts) View Source
setAttributeValue(page_pid) View Source
Sets attribute for an element with given id.
Parameters:
nodeId -
setAttributeValue(page_pid, parameters) View Source
setAttributeValue(page_pid, parameters, opts) View Source
setAttributesAsText(page_pid) View Source
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.
Parameters:
nodeId -
setAttributesAsText(page_pid, parameters) View Source
setAttributesAsText(page_pid, parameters, opts) View Source
setFileInputFiles(page_pid) View Source
Sets files for the given file input element.
Parameters:
files -
setFileInputFiles(page_pid, parameters) View Source
setFileInputFiles(page_pid, parameters, opts) View Source
setNodeName(page_pid) View Source
Sets node name for a node with given id.
Parameters:
nodeId -
setNodeName(page_pid, parameters) View Source
setNodeName(page_pid, parameters, opts) View Source
setNodeValue(page_pid) View Source
Sets node value for a node with given id.
Parameters:
nodeId -
setNodeValue(page_pid, parameters) View Source
setNodeValue(page_pid, parameters, opts) View Source
setOuterHTML(page_pid) View Source
Sets node HTML markup, returns new node id.
Parameters:
nodeId -