Click or drag to resize

DOMClient Methods

Version 107.1.120

The DOMClient type exposes the following members.

Methods
  NameDescription
Public methodCollectClassNamesFromSubtreeAsync
Collects class names for the node with given id and all of it's child nodes.
Public methodCopyToAsync
Creates a deep copy of the specified node and places it into the target container before the given anchor.
Public methodDescribeNodeAsync
Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.
Public methodDisableAsync
Disables DOM agent for the given page.
Public methodDiscardSearchResultsAsync
Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search.
Public methodEnableAsync
Enables DOM agent for the given page.
Protected methodEnumToString(Enum) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(ContentEncoding) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(CSPViolationType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(DisabledImageType) (Inherited from DevToolsDomainBase.)
Protected methodEnumToString(PermissionType) (Inherited from DevToolsDomainBase.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFocusAsync
Focuses the given element.
Public methodGetAttributesAsync
Returns attributes for the specified node.
Public methodGetBoxModelAsync
Returns boxes for the given node.
Public methodGetContainerForNodeAsync
Returns the container of the given node based on container query conditions. If containerName is given, it will find the nearest container with a matching name; otherwise it will find the nearest container regardless of its container name.
Public methodGetContentQuadsAsync
Returns quads that describe node position on the page. This method might return multiple quads for inline nodes.
Public methodGetDocumentAsync
Returns the root DOM node (and optionally the subtree) to the caller.
Public methodGetFileInfoAsync
Returns file information for the given File wrapper.
Public methodGetFrameOwnerAsync
Returns iframe node that owns iframe with the given domain.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetNodeForLocationAsync
Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.
Public methodGetNodesForSubtreeByStyleAsync
Finds nodes with a given computed style in a subtree.
Public methodGetNodeStackTracesAsync
Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.
Public methodGetOuterHTMLAsync
Returns node's HTML markup.
Public methodGetQueryingDescendantsForContainerAsync
Returns the descendants of a container query container that have container queries against this container.
Public methodGetRelayoutBoundaryAsync
Returns the id of the nearest ancestor that is a relayout boundary.
Public methodGetSearchResultsAsync
Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier.
Public methodGetTopLayerElementsAsync
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.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHideHighlightAsync
Hides any highlight.
Public methodHighlightNodeAsync
Highlights DOM node.
Public methodHighlightRectAsync
Highlights given rectangle.
Public methodMarkUndoableStateAsync
Marks last undoable state.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMoveToAsync
Moves node into the new container, places it before the given anchor.
Public methodPerformSearchAsync
Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session.
Public methodPushNodeByPathToFrontendAsync
Requests that the node is sent to the caller given its path. // FIXME, use XPath
Public methodPushNodesByBackendIdsToFrontendAsync
Requests that a batch of nodes is sent to the caller given their backend node ids.
Public methodQuerySelectorAllAsync
Executes `querySelectorAll` on a given node.
Public methodQuerySelectorAsync
Executes `querySelector` on a given node.
Public methodRedoAsync
Re-does the last undone action.
Public methodRemoveAttributeAsync
Removes attribute with given name from an element with given id.
Public methodRemoveNodeAsync
Removes node with given id.
Public methodRequestChildNodesAsync
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.
Public methodRequestNodeAsync
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.
Public methodResolveNodeAsync
Resolves the JavaScript node object for a given NodeId or BackendNodeId.
Public methodScrollIntoViewIfNeededAsync
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.
Public methodSetAttributesAsTextAsync
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.
Public methodSetAttributeValueAsync
Sets attribute for an element with given id.
Public methodSetFileInputFilesAsync
Sets files for the given file input element.
Public methodSetInspectedNodeAsync
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
Public methodSetNodeNameAsync
Sets node name for a node with given id.
Public methodSetNodeStackTracesEnabledAsync
Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.
Public methodSetNodeValueAsync
Sets node value for a node with given id.
Public methodSetOuterHTMLAsync
Sets node HTML markup, returns new node id.
Protected methodToBase64String (Inherited from DevToolsDomainBase.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUndoAsync
Undoes the last performed action.
Top
See Also