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.<p>Note that iframe
owner elements will return corresponding document elements as their child nodes.</p>
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.<p>Note that `iframe` owner elements will return corresponding document elements as their child nodes.</p>
(collect-class-names-from-subtree)
(collect-class-names-from-subtree {:as params :keys [node-id]})
(collect-class-names-from-subtree connection {:as params :keys [node-id]})
Collects class names for the node with given id and all of it's child nodes.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to collect class names. |
Return map keys:
Key | Description |
---|---|
:class-names | Class name list. |
Collects class names for the node with given id and all of it's child nodes. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to collect class names. Return map keys: Key | Description -------------|------------ :class-names | Class name list.
(copy-to)
(copy-to {:as params :keys [node-id target-node-id insert-before-node-id]})
(copy-to connection
{:as params :keys [node-id target-node-id insert-before-node-id]})
Creates a deep copy of the specified node and places it into the target container before the given anchor.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to copy. |
:target-node-id | Id of the element to drop the copy into. |
:insert-before-node-id | Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId ). (optional) |
Return map keys:
Key | Description |
---|---|
:node-id | Id of the node clone. |
Creates a deep copy of the specified node and places it into the target container before the given anchor. Parameters map keys: Key | Description -----------------------|------------ :node-id | Id of the node to copy. :target-node-id | Id of the element to drop the copy into. :insert-before-node-id | Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`). (optional) Return map keys: Key | Description ---------|------------ :node-id | Id of the node clone.
(disable)
(disable {:as params :keys []})
(disable connection {:as params :keys []})
Disables DOM agent for the given page.
Disables DOM agent for the given page.
(discard-search-results)
(discard-search-results {:as params :keys [search-id]})
(discard-search-results connection {:as params :keys [search-id]})
Discards search results from the session with the given id. getSearchResults
should no longer be called for that search.
Parameters map keys:
Key | Description |
---|---|
:search-id | Unique search session identifier. |
Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search. Parameters map keys: Key | Description -----------|------------ :search-id | Unique search session identifier.
(enable)
(enable {:as params :keys []})
(enable connection {:as params :keys []})
Enables DOM agent for the given page.
Enables DOM agent for the given page.
(focus)
(focus {:as params :keys [node-id backend-node-id object-id]})
(focus connection {:as params :keys [node-id backend-node-id object-id]})
Focuses the given element.
Parameters map keys:
Key | Description |
---|---|
:node-id | Identifier of the node. (optional) |
:backend-node-id | Identifier of the backend node. (optional) |
:object-id | JavaScript object id of the node wrapper. (optional) |
Focuses the given element. Parameters map keys: Key | Description -----------------|------------ :node-id | Identifier of the node. (optional) :backend-node-id | Identifier of the backend node. (optional) :object-id | JavaScript object id of the node wrapper. (optional)
(get-attributes)
(get-attributes {:as params :keys [node-id]})
(get-attributes connection {:as params :keys [node-id]})
Returns attributes for the specified node.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to retrieve attibutes for. |
Return map keys:
Key | Description |
---|---|
:attributes | An interleaved array of node attribute names and values. |
Returns attributes for the specified node. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to retrieve attibutes for. Return map keys: Key | Description ------------|------------ :attributes | An interleaved array of node attribute names and values.
(get-box-model)
(get-box-model {:as params :keys [node-id backend-node-id object-id]})
(get-box-model connection
{:as params :keys [node-id backend-node-id object-id]})
Returns boxes for the currently selected nodes.
Parameters map keys:
Key | Description |
---|---|
:node-id | Identifier of the node. (optional) |
:backend-node-id | Identifier of the backend node. (optional) |
:object-id | JavaScript object id of the node wrapper. (optional) |
Return map keys:
Key | Description |
---|---|
:model | Box model for the node. |
Returns boxes for the currently selected nodes. Parameters map keys: Key | Description -----------------|------------ :node-id | Identifier of the node. (optional) :backend-node-id | Identifier of the backend node. (optional) :object-id | JavaScript object id of the node wrapper. (optional) Return map keys: Key | Description -------|------------ :model | Box model for the node.
(get-document)
(get-document {:as params :keys [depth pierce]})
(get-document connection {:as params :keys [depth pierce]})
Returns the root DOM node (and optionally the subtree) to the caller.
Parameters map keys:
Key | Description |
---|---|
:depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) |
:pierce | Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional) |
Return map keys:
Key | Description |
---|---|
:root | Resulting node. |
Returns the root DOM node (and optionally the subtree) to the caller. Parameters map keys: Key | Description --------|------------ :depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) :pierce | Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional) Return map keys: Key | Description ------|------------ :root | Resulting node.
(get-flattened-document)
(get-flattened-document {:as params :keys [depth pierce]})
(get-flattened-document connection {:as params :keys [depth pierce]})
Returns the root DOM node (and optionally the subtree) to the caller.
Parameters map keys:
Key | Description |
---|---|
:depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) |
:pierce | Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional) |
Return map keys:
Key | Description |
---|---|
:nodes | Resulting node. |
Returns the root DOM node (and optionally the subtree) to the caller. Parameters map keys: Key | Description --------|------------ :depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) :pierce | Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). (optional) Return map keys: Key | Description -------|------------ :nodes | Resulting node.
(get-node-for-location)
(get-node-for-location {:as params :keys [x y include-user-agent-shadow-dom]})
(get-node-for-location connection
{:as params :keys [x y include-user-agent-shadow-dom]})
Returns node id at given location.
Parameters map keys:
Key | Description |
---|---|
:x | X coordinate. |
:y | Y coordinate. |
:include-user-agent-shadow-dom | False to skip to the nearest non-UA shadow root ancestor (default: false). (optional) |
Return map keys:
Key | Description |
---|---|
:node-id | Id of the node at given coordinates. |
Returns node id at given location. Parameters map keys: Key | Description -------------------------------|------------ :x | X coordinate. :y | Y coordinate. :include-user-agent-shadow-dom | False to skip to the nearest non-UA shadow root ancestor (default: false). (optional) Return map keys: Key | Description ---------|------------ :node-id | Id of the node at given coordinates.
(get-outer-html)
(get-outer-html {:as params :keys [node-id]})
(get-outer-html connection {:as params :keys [node-id]})
Returns node's HTML markup.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to get markup for. |
Return map keys:
Key | Description |
---|---|
:outer-html | Outer HTML markup. |
Returns node's HTML markup. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to get markup for. Return map keys: Key | Description ------------|------------ :outer-html | Outer HTML markup.
(get-relayout-boundary)
(get-relayout-boundary {:as params :keys [node-id]})
(get-relayout-boundary connection {:as params :keys [node-id]})
Returns the id of the nearest ancestor that is a relayout boundary.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node. |
Return map keys:
Key | Description |
---|---|
:node-id | Relayout boundary node id for the given node. |
Returns the id of the nearest ancestor that is a relayout boundary. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node. Return map keys: Key | Description ---------|------------ :node-id | Relayout boundary node id for the given node.
(get-search-results)
(get-search-results {:as params :keys [search-id from-index to-index]})
(get-search-results connection
{:as params :keys [search-id from-index to-index]})
Returns search results from given fromIndex
to given toIndex
from the sarch with the given identifier.
Parameters map keys:
Key | Description |
---|---|
:search-id | Unique search session identifier. |
:from-index | Start index of the search result to be returned. |
:to-index | End index of the search result to be returned. |
Return map keys:
Key | Description |
---|---|
:node-ids | Ids of the search result nodes. |
Returns search results from given `fromIndex` to given `toIndex` from the sarch with the given identifier. Parameters map keys: Key | Description ------------|------------ :search-id | Unique search session identifier. :from-index | Start index of the search result to be returned. :to-index | End index of the search result to be returned. Return map keys: Key | Description ----------|------------ :node-ids | Ids of the search result nodes.
(hide-highlight)
(hide-highlight {:as params :keys []})
(hide-highlight connection {:as params :keys []})
Hides any highlight.
Hides any highlight.
(highlight-node)
(highlight-node {:as params :keys []})
(highlight-node connection {:as params :keys []})
Highlights DOM node.
Highlights DOM node.
(highlight-rect)
(highlight-rect {:as params :keys []})
(highlight-rect connection {:as params :keys []})
Highlights given rectangle.
Highlights given rectangle.
(mark-undoable-state)
(mark-undoable-state {:as params :keys []})
(mark-undoable-state connection {:as params :keys []})
Marks last undoable state.
Marks last undoable state.
(move-to)
(move-to {:as params :keys [node-id target-node-id insert-before-node-id]})
(move-to connection
{:as params :keys [node-id target-node-id insert-before-node-id]})
Moves node into the new container, places it before the given anchor.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to move. |
:target-node-id | Id of the element to drop the moved node into. |
:insert-before-node-id | Drop node before this one (if absent, the moved node becomes the last child of targetNodeId ). (optional) |
Return map keys:
Key | Description |
---|---|
:node-id | New id of the moved node. |
Moves node into the new container, places it before the given anchor. Parameters map keys: Key | Description -----------------------|------------ :node-id | Id of the node to move. :target-node-id | Id of the element to drop the moved node into. :insert-before-node-id | Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`). (optional) Return map keys: Key | Description ---------|------------ :node-id | New id of the moved node.
(perform-search)
(perform-search {:as params :keys [query include-user-agent-shadow-dom]})
(perform-search connection
{:as params :keys [query include-user-agent-shadow-dom]})
Searches for a given string in the DOM tree. Use getSearchResults
to access search results or cancelSearch
to end this search session.
Parameters map keys:
Key | Description |
---|---|
:query | Plain text or query selector or XPath search query. |
:include-user-agent-shadow-dom | True to search in user agent shadow DOM. (optional) |
Return map keys:
Key | Description |
---|---|
:search-id | Unique search session identifier. |
:result-count | Number of search results. |
Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session. Parameters map keys: Key | Description -------------------------------|------------ :query | Plain text or query selector or XPath search query. :include-user-agent-shadow-dom | True to search in user agent shadow DOM. (optional) Return map keys: Key | Description --------------|------------ :search-id | Unique search session identifier. :result-count | Number of search results.
(push-node-by-path-to-frontend)
(push-node-by-path-to-frontend {:as params :keys [path]})
(push-node-by-path-to-frontend connection {:as params :keys [path]})
Requests that the node is sent to the caller given its path. // FIXME, use XPath
Parameters map keys:
Key | Description |
---|---|
:path | Path to node in the proprietary format. |
Return map keys:
Key | Description |
---|---|
:node-id | Id of the node for given path. |
Requests that the node is sent to the caller given its path. // FIXME, use XPath Parameters map keys: Key | Description ------|------------ :path | Path to node in the proprietary format. Return map keys: Key | Description ---------|------------ :node-id | Id of the node for given path.
(push-nodes-by-backend-ids-to-frontend)
(push-nodes-by-backend-ids-to-frontend {:as params :keys [backend-node-ids]})
(push-nodes-by-backend-ids-to-frontend connection
{:as params :keys [backend-node-ids]})
Requests that a batch of nodes is sent to the caller given their backend node ids.
Parameters map keys:
Key | Description |
---|---|
:backend-node-ids | The array of backend node ids. |
Return map keys:
Key | Description |
---|---|
:node-ids | The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds. |
Requests that a batch of nodes is sent to the caller given their backend node ids. Parameters map keys: Key | Description ------------------|------------ :backend-node-ids | The array of backend node ids. Return map keys: Key | Description ----------|------------ :node-ids | The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
(query-selector)
(query-selector {:as params :keys [node-id selector]})
(query-selector connection {:as params :keys [node-id selector]})
Executes querySelector
on a given node.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to query upon. |
:selector | Selector string. |
Return map keys:
Key | Description |
---|---|
:node-id | Query selector result. |
Executes `querySelector` on a given node. Parameters map keys: Key | Description ----------|------------ :node-id | Id of the node to query upon. :selector | Selector string. Return map keys: Key | Description ---------|------------ :node-id | Query selector result.
(query-selector-all)
(query-selector-all {:as params :keys [node-id selector]})
(query-selector-all connection {:as params :keys [node-id selector]})
Executes querySelectorAll
on a given node.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to query upon. |
:selector | Selector string. |
Return map keys:
Key | Description |
---|---|
:node-ids | Query selector result. |
Executes `querySelectorAll` on a given node. Parameters map keys: Key | Description ----------|------------ :node-id | Id of the node to query upon. :selector | Selector string. Return map keys: Key | Description ----------|------------ :node-ids | Query selector result.
(redo)
(redo {:as params :keys []})
(redo connection {:as params :keys []})
Re-does the last undone action.
Re-does the last undone action.
(remove-attribute)
(remove-attribute {:as params :keys [node-id name]})
(remove-attribute connection {:as params :keys [node-id name]})
Removes attribute with given name from an element with given id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the element to remove attribute from. |
:name | Name of the attribute to remove. |
Removes attribute with given name from an element with given id. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the element to remove attribute from. :name | Name of the attribute to remove.
(remove-node)
(remove-node {:as params :keys [node-id]})
(remove-node connection {:as params :keys [node-id]})
Removes node with given id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to remove. |
Removes node with given id. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to remove.
(request-child-nodes)
(request-child-nodes {:as params :keys [node-id depth pierce]})
(request-child-nodes connection {:as params :keys [node-id depth pierce]})
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 map keys:
Key | Description |
---|---|
:node-id | Id of the node to get children for. |
:depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) |
:pierce | Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false). (optional) |
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 map keys: Key | Description ---------|------------ :node-id | Id of the node to get children for. :depth | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. (optional) :pierce | Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false). (optional)
(request-node)
(request-node {:as params :keys [object-id]})
(request-node connection {:as params :keys [object-id]})
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 map keys:
Key | Description |
---|---|
:object-id | JavaScript object id to convert into node. |
Return map keys:
Key | Description |
---|---|
:node-id | Node id for given object. |
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 map keys: Key | Description -----------|------------ :object-id | JavaScript object id to convert into node. Return map keys: Key | Description ---------|------------ :node-id | Node id for given object.
(resolve-node)
(resolve-node {:as params :keys [node-id backend-node-id object-group]})
(resolve-node connection
{:as params :keys [node-id backend-node-id object-group]})
Resolves the JavaScript node object for a given NodeId or BackendNodeId.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to resolve. (optional) |
:backend-node-id | Backend identifier of the node to resolve. (optional) |
:object-group | Symbolic group name that can be used to release multiple objects. (optional) |
Return map keys:
Key | Description |
---|---|
:object | JavaScript object wrapper for given node. |
Resolves the JavaScript node object for a given NodeId or BackendNodeId. Parameters map keys: Key | Description -----------------|------------ :node-id | Id of the node to resolve. (optional) :backend-node-id | Backend identifier of the node to resolve. (optional) :object-group | Symbolic group name that can be used to release multiple objects. (optional) Return map keys: Key | Description --------|------------ :object | JavaScript object wrapper for given node.
(set-attribute-value)
(set-attribute-value {:as params :keys [node-id name value]})
(set-attribute-value connection {:as params :keys [node-id name value]})
Sets attribute for an element with given id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the element to set attribute for. |
:name | Attribute name. |
:value | Attribute value. |
Sets attribute for an element with given id. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the element to set attribute for. :name | Attribute name. :value | Attribute value.
(set-attributes-as-text)
(set-attributes-as-text {:as params :keys [node-id text name]})
(set-attributes-as-text connection {:as params :keys [node-id text name]})
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 map keys:
Key | Description |
---|---|
:node-id | Id of the element to set attributes for. |
:text | Text with a number of attributes. Will parse this text using HTML parser. |
:name | Attribute name to replace with new attributes derived from text in case text parsed successfully. (optional) |
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 map keys: Key | Description ---------|------------ :node-id | Id of the element to set attributes for. :text | Text with a number of attributes. Will parse this text using HTML parser. :name | Attribute name to replace with new attributes derived from text in case text parsed successfully. (optional)
(set-file-input-files)
(set-file-input-files {:as params
:keys [files node-id backend-node-id object-id]})
(set-file-input-files connection
{:as params
:keys [files node-id backend-node-id object-id]})
Sets files for the given file input element.
Parameters map keys:
Key | Description |
---|---|
:files | Array of file paths to set. |
:node-id | Identifier of the node. (optional) |
:backend-node-id | Identifier of the backend node. (optional) |
:object-id | JavaScript object id of the node wrapper. (optional) |
Sets files for the given file input element. Parameters map keys: Key | Description -----------------|------------ :files | Array of file paths to set. :node-id | Identifier of the node. (optional) :backend-node-id | Identifier of the backend node. (optional) :object-id | JavaScript object id of the node wrapper. (optional)
(set-inspected-node)
(set-inspected-node {:as params :keys [node-id]})
(set-inspected-node connection {:as params :keys [node-id]})
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
Parameters map keys:
Key | Description |
---|---|
:node-id | DOM node id to be accessible by means of $x command line API. |
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). Parameters map keys: Key | Description ---------|------------ :node-id | DOM node id to be accessible by means of $x command line API.
(set-node-name)
(set-node-name {:as params :keys [node-id name]})
(set-node-name connection {:as params :keys [node-id name]})
Sets node name for a node with given id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to set name for. |
:name | New node's name. |
Return map keys:
Key | Description |
---|---|
:node-id | New node's id. |
Sets node name for a node with given id. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to set name for. :name | New node's name. Return map keys: Key | Description ---------|------------ :node-id | New node's id.
(set-node-value)
(set-node-value {:as params :keys [node-id value]})
(set-node-value connection {:as params :keys [node-id value]})
Sets node value for a node with given id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to set value for. |
:value | New node's value. |
Sets node value for a node with given id. Parameters map keys: Key | Description ---------|------------ :node-id | Id of the node to set value for. :value | New node's value.
(set-outer-html)
(set-outer-html {:as params :keys [node-id outer-html]})
(set-outer-html connection {:as params :keys [node-id outer-html]})
Sets node HTML markup, returns new node id.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to set markup for. |
:outer-html | Outer HTML markup to set. |
Sets node HTML markup, returns new node id. Parameters map keys: Key | Description ------------|------------ :node-id | Id of the node to set markup for. :outer-html | Outer HTML markup to set.
(undo)
(undo {:as params :keys []})
(undo connection {:as params :keys []})
Undoes the last performed action.
Undoes the last performed action.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close