dom

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 3 Imported by: 254

Documentation

Overview

Package dom provides the Chrome DevTools Protocol commands, types, and events for the DOM domain.

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.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandCollectClassNamesFromSubtree       = "DOM.collectClassNamesFromSubtree"
	CommandCopyTo                             = "DOM.copyTo"
	CommandDescribeNode                       = "DOM.describeNode"
	CommandScrollIntoViewIfNeeded             = "DOM.scrollIntoViewIfNeeded"
	CommandDisable                            = "DOM.disable"
	CommandDiscardSearchResults               = "DOM.discardSearchResults"
	CommandEnable                             = "DOM.enable"
	CommandFocus                              = "DOM.focus"
	CommandGetAttributes                      = "DOM.getAttributes"
	CommandGetBoxModel                        = "DOM.getBoxModel"
	CommandGetContentQuads                    = "DOM.getContentQuads"
	CommandGetDocument                        = "DOM.getDocument"
	CommandGetNodesForSubtreeByStyle          = "DOM.getNodesForSubtreeByStyle"
	CommandGetNodeForLocation                 = "DOM.getNodeForLocation"
	CommandGetOuterHTML                       = "DOM.getOuterHTML"
	CommandGetRelayoutBoundary                = "DOM.getRelayoutBoundary"
	CommandGetSearchResults                   = "DOM.getSearchResults"
	CommandMarkUndoableState                  = "DOM.markUndoableState"
	CommandMoveTo                             = "DOM.moveTo"
	CommandPerformSearch                      = "DOM.performSearch"
	CommandPushNodeByPathToFrontend           = "DOM.pushNodeByPathToFrontend"
	CommandPushNodesByBackendIDsToFrontend    = "DOM.pushNodesByBackendIdsToFrontend"
	CommandQuerySelector                      = "DOM.querySelector"
	CommandQuerySelectorAll                   = "DOM.querySelectorAll"
	CommandGetTopLayerElements                = "DOM.getTopLayerElements"
	CommandGetElementByRelation               = "DOM.getElementByRelation"
	CommandRedo                               = "DOM.redo"
	CommandRemoveAttribute                    = "DOM.removeAttribute"
	CommandRemoveNode                         = "DOM.removeNode"
	CommandRequestChildNodes                  = "DOM.requestChildNodes"
	CommandRequestNode                        = "DOM.requestNode"
	CommandResolveNode                        = "DOM.resolveNode"
	CommandSetAttributeValue                  = "DOM.setAttributeValue"
	CommandSetAttributesAsText                = "DOM.setAttributesAsText"
	CommandSetFileInputFiles                  = "DOM.setFileInputFiles"
	CommandSetNodeStackTracesEnabled          = "DOM.setNodeStackTracesEnabled"
	CommandGetNodeStackTraces                 = "DOM.getNodeStackTraces"
	CommandGetFileInfo                        = "DOM.getFileInfo"
	CommandGetDetachedDomNodes                = "DOM.getDetachedDomNodes"
	CommandSetInspectedNode                   = "DOM.setInspectedNode"
	CommandSetNodeName                        = "DOM.setNodeName"
	CommandSetNodeValue                       = "DOM.setNodeValue"
	CommandSetOuterHTML                       = "DOM.setOuterHTML"
	CommandUndo                               = "DOM.undo"
	CommandGetFrameOwner                      = "DOM.getFrameOwner"
	CommandGetContainerForNode                = "DOM.getContainerForNode"
	CommandGetQueryingDescendantsForContainer = "DOM.getQueryingDescendantsForContainer"
	CommandGetAnchorElement                   = "DOM.getAnchorElement"
	CommandForceShowPopover                   = "DOM.forceShowPopover"
	CommandGetImplicitAnchorCandidates        = "DOM.getImplicitAnchorCandidates"
	CommandForceShowInterest                  = "DOM.forceShowInterest"
	CommandSetTextMarker                      = "DOM.setTextMarker"
	CommandClearTextMarkers                   = "DOM.clearTextMarkers"
)

Command names.

Variables

View Source
var AdRelatedStateUpdated = cdp.Event[EventAdRelatedStateUpdated]{Method: "DOM.adRelatedStateUpdated"}

AdRelatedStateUpdated fired when a node's ad related state changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-adRelatedStateUpdated

View Source
var AdoptedStyleSheetsModified = cdp.Event[EventAdoptedStyleSheetsModified]{Method: "DOM.adoptedStyleSheetsModified"}

AdoptedStyleSheetsModified fired when Element's adoptedStyleSheets are modified.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-adoptedStyleSheetsModified

View Source
var AffectedByStartingStylesFlagUpdated = cdp.Event[EventAffectedByStartingStylesFlagUpdated]{Method: "DOM.affectedByStartingStylesFlagUpdated"}

AffectedByStartingStylesFlagUpdated fired when a node's starting styles changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-affectedByStartingStylesFlagUpdated

View Source
var AttributeModified = cdp.Event[EventAttributeModified]{Method: "DOM.attributeModified"}

AttributeModified fired when Element's attribute is modified.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeModified

View Source
var AttributeRemoved = cdp.Event[EventAttributeRemoved]{Method: "DOM.attributeRemoved"}

AttributeRemoved fired when Element's attribute is removed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeRemoved

View Source
var CharacterDataModified = cdp.Event[EventCharacterDataModified]{Method: "DOM.characterDataModified"}

CharacterDataModified mirrors DOMCharacterDataModified event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-characterDataModified

View Source
var ChildNodeCountUpdated = cdp.Event[EventChildNodeCountUpdated]{Method: "DOM.childNodeCountUpdated"}

ChildNodeCountUpdated fired when Container's child node count has changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeCountUpdated

View Source
var ChildNodeInserted = cdp.Event[EventChildNodeInserted]{Method: "DOM.childNodeInserted"}

ChildNodeInserted mirrors DOMNodeInserted event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted

View Source
var ChildNodeRemoved = cdp.Event[EventChildNodeRemoved]{Method: "DOM.childNodeRemoved"}

ChildNodeRemoved mirrors DOMNodeRemoved event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeRemoved

View Source
var ClearTextMarkers = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandClearTextMarkers}

ClearTextMarkers clears the spelling and grammar error text markers overlapping the ranges set by setTextMarker in this session. These markers are also removed when the DOM domain is disabled or the session ends.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-clearTextMarkers

CollectClassNamesFromSubtree collects class names for the node with given id and all of it's child nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-collectClassNamesFromSubtree

CopyTo creates a deep copy of the specified node and places it into the target container before the given anchor.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-copyTo

DescribeNode describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-describeNode

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable disables DOM agent for the given page.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-disable

DiscardSearchResults discards search results from the session with the given id. getSearchResults should no longer be called for that search.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-discardSearchResults

View Source
var DistributedNodesUpdated = cdp.Event[EventDistributedNodesUpdated]{Method: "DOM.distributedNodesUpdated"}

DistributedNodesUpdated called when distribution is changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-distributedNodesUpdated

View Source
var DocumentUpdated = cdp.Event[EventDocumentUpdated]{Method: "DOM.documentUpdated"}

DocumentUpdated fired when Document has been totally updated. Node ids are no longer valid.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-documentUpdated

Enable enables DOM agent for the given page.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable

Focus focuses the given element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-focus

ForceShowInterest when enabling, this API forces an element to gain interest in its target, keeping interest active until disabled.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-forceShowInterest

ForceShowPopover when enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-forceShowPopover

GetAnchorElement returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAnchorElement

GetAttributes returns attributes for the specified node.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAttributes

GetBoxModel returns boxes for the given node.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getBoxModel

GetContainerForNode returns the query container of the given node based on container query conditions: containerName, physical and logical axes, and whether it queries scroll-state or anchored elements. If no axes are provided and queriesScrollState is false, the style container is returned, which is the direct parent or the closest element with a matching container-name.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContainerForNode

GetContentQuads returns quads that describe node position on the page. This method might return multiple quads for inline nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContentQuads

GetDetachedDomNodes returns list of detached nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDetachedDomNodes

GetDocument returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDocument

GetElementByRelation returns the NodeId of the matched element according to certain relations.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getElementByRelation

GetFileInfo returns file information for the given File wrapper.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFileInfo

GetFrameOwner returns iframe node that owns iframe with the given domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFrameOwner

GetImplicitAnchorCandidates returns candidate nodes that are configured as triggers for the given popover.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getImplicitAnchorCandidates

GetNodeForLocation returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeForLocation

GetNodeStackTraces gets stack traces associated with a Node. As of now, only provides stack trace for Node creation.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeStackTraces

GetNodesForSubtreeByStyle finds nodes with a given computed style in a subtree.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodesForSubtreeByStyle

GetOuterHTML returns node's HTML markup.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getOuterHTML

GetQueryingDescendantsForContainer returns the descendants of a container query container that have container queries against this container.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getQueryingDescendantsForContainer

GetRelayoutBoundary returns the id of the nearest ancestor that is a relayout boundary.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getRelayoutBoundary

GetSearchResults returns search results from given fromIndex to given toIndex from the search with the given identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getSearchResults

GetTopLayerElements 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.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getTopLayerElements

View Source
var InlineStyleInvalidated = cdp.Event[EventInlineStyleInvalidated]{Method: "DOM.inlineStyleInvalidated"}

InlineStyleInvalidated fired when Element's inline style is modified via a CSS property modification.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated

View Source
var MarkUndoableState = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandMarkUndoableState}

MarkUndoableState marks last undoable state.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-markUndoableState

MoveTo moves node into the new container, places it before the given anchor.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-moveTo

PerformSearch searches for a given string in the DOM tree. Use getSearchResults to access search results or cancelSearch to end this search session.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-performSearch

View Source
var PseudoElementAdded = cdp.Event[EventPseudoElementAdded]{Method: "DOM.pseudoElementAdded"}

PseudoElementAdded called when a pseudo element is added to an element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementAdded

View Source
var PseudoElementRemoved = cdp.Event[EventPseudoElementRemoved]{Method: "DOM.pseudoElementRemoved"}

PseudoElementRemoved called when a pseudo element is removed from an element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementRemoved

PushNodeByPathToFrontend requests that the node is sent to the caller given its path. // FIXME, use XPath.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodeByPathToFrontend

PushNodesByBackendIDsToFrontend requests that a batch of nodes is sent to the caller given their backend node ids.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodesByBackendIdsToFrontend

QuerySelector executes querySelector on a given node.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelector

QuerySelectorAll executes querySelectorAll on a given node.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelectorAll

Redo re-does the last undone action.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-redo

RemoveAttribute removes attribute with given name from an element with given id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeAttribute

RemoveNode removes node with given id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeNode

RequestChildNodes 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.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestChildNodes

RequestNode 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.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestNode

ResolveNode resolves the JavaScript node object for a given NodeId or BackendNodeId.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-resolveNode

ScrollIntoViewIfNeeded 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.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-scrollIntoViewIfNeeded

View Source
var ScrollableFlagUpdated = cdp.Event[EventScrollableFlagUpdated]{Method: "DOM.scrollableFlagUpdated"}

ScrollableFlagUpdated fired when a node's scrollability state changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-scrollableFlagUpdated

SetAttributeValue sets attribute for an element with given id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributeValue

SetAttributesAsText 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.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributesAsText

View Source
var SetChildNodes = cdp.Event[EventSetChildNodes]{Method: "DOM.setChildNodes"}

SetChildNodes fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-setChildNodes

SetFileInputFiles sets files for the given file input element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setFileInputFiles

SetInspectedNode enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setInspectedNode

SetNodeName sets node name for a node with given id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeName

SetNodeStackTracesEnabled sets if stack traces should be captured for Nodes. See Node.getNodeStackTraces. Default is disabled.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeStackTracesEnabled

SetNodeValue sets node value for a node with given id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeValue

SetOuterHTML sets node HTML markup, returns new node id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setOuterHTML

SetTextMarker sets a spelling or grammar error marker on the given range of text. See https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setTextMarker

View Source
var ShadowRootPopped = cdp.Event[EventShadowRootPopped]{Method: "DOM.shadowRootPopped"}

ShadowRootPopped called when shadow root is popped from the element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPopped

View Source
var ShadowRootPushed = cdp.Event[EventShadowRootPushed]{Method: "DOM.shadowRootPushed"}

ShadowRootPushed called when shadow root is pushed into the element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPushed

View Source
var TopLayerElementsUpdated = cdp.Event[EventTopLayerElementsUpdated]{Method: "DOM.topLayerElementsUpdated"}

TopLayerElementsUpdated called when top layer elements are changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-topLayerElementsUpdated

Undo undoes the last performed action.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-undo

Functions

This section is empty.

Types

type BoxModel

type BoxModel struct {
	Content      Quad              `json:"content"`                         // Content box
	Padding      Quad              `json:"padding"`                         // Padding box
	Border       Quad              `json:"border"`                          // Border box
	Margin       Quad              `json:"margin"`                          // Margin box
	Width        int64             `json:"width"`                           // Node width
	Height       int64             `json:"height"`                          // Node height
	ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty,omitzero"` // Shape outside coordinates
}

BoxModel box model.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BoxModel

type CSSComputedStyleProperty

type CSSComputedStyleProperty struct {
	Name  string `json:"name"`  // Computed style property name.
	Value string `json:"value"` // Computed style property value.
}

CSSComputedStyleProperty [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-CSSComputedStyleProperty

type CollectClassNamesFromSubtreeParams

type CollectClassNamesFromSubtreeParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to collect class names.
}

CollectClassNamesFromSubtreeParams are the parameters of the command DOM.collectClassNamesFromSubtree.

type CollectClassNamesFromSubtreeResult added in v0.157.3

type CollectClassNamesFromSubtreeResult struct {
	ClassNames []string `json:"classNames,omitempty,omitzero"` // Class name list.
}

CollectClassNamesFromSubtreeResult is the result of the command DOM.collectClassNamesFromSubtree.

type CopyToParams

type CopyToParams struct {
	NodeID             cdp.NodeID `json:"nodeId"`                                // Id of the node to copy.
	TargetNodeID       cdp.NodeID `json:"targetNodeId"`                          // Id of the element to drop the copy into.
	InsertBeforeNodeID cdp.NodeID `json:"insertBeforeNodeId,omitempty,omitzero"` // Drop the copy before this node (if absent, the copy becomes the last child of targetNodeId).
}

CopyToParams are the parameters of the command DOM.copyTo.

type CopyToResult added in v0.157.3

type CopyToResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Id of the node clone.
}

CopyToResult is the result of the command DOM.copyTo.

type DescribeNodeParams

type DescribeNodeParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
	Depth         *int64                 `json:"depth,omitempty,omitzero"`         // 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.
	Pierce        *bool                  `json:"pierce,omitempty,omitzero"`        // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
}

DescribeNodeParams are the parameters of the command DOM.describeNode.

type DescribeNodeResult added in v0.157.3

type DescribeNodeResult struct {
	Node *cdp.Node `json:"node,omitempty,omitzero"` // Node description.
}

DescribeNodeResult is the result of the command DOM.describeNode.

type DetachedElementInfo

type DetachedElementInfo struct {
	TreeNode        *cdp.Node    `json:"treeNode"`
	RetainedNodeIDs []cdp.NodeID `json:"retainedNodeIds"`
}

DetachedElementInfo a structure to hold the top-level node of a detached tree and an array of its retained descendants.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-DetachedElementInfo

type DiscardSearchResultsParams

type DiscardSearchResultsParams struct {
	SearchID string `json:"searchId"` // Unique search session identifier.
}

DiscardSearchResultsParams are the parameters of the command DOM.discardSearchResults.

type EnableIncludeWhitespace added in v0.157.1

type EnableIncludeWhitespace string

EnableIncludeWhitespace whether to include whitespaces in the children array of returned Nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable

const (
	EnableIncludeWhitespaceNone EnableIncludeWhitespace = "none"
	EnableIncludeWhitespaceAll  EnableIncludeWhitespace = "all"
)

EnableIncludeWhitespace values.

func (EnableIncludeWhitespace) String added in v0.157.1

func (t EnableIncludeWhitespace) String() string

String returns the EnableIncludeWhitespace as string value.

type EnableParams

type EnableParams struct {
	IncludeWhitespace EnableIncludeWhitespace `json:"includeWhitespace,omitempty,omitzero"` // Whether to include whitespaces in the children array of returned Nodes.
}

EnableParams are the parameters of the command DOM.enable.

type EventAdRelatedStateUpdated

type EventAdRelatedStateUpdated struct {
	NodeID       cdp.NodeID        `json:"nodeId"`                          // The id of the node.
	AdProvenance *cdp.AdProvenance `json:"adProvenance,omitempty,omitzero"` // The provenance of the ad related node, if it is ad related.
}

EventAdRelatedStateUpdated fired when a node's ad related state changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-adRelatedStateUpdated

type EventAdoptedStyleSheetsModified

type EventAdoptedStyleSheetsModified struct {
	NodeID             cdp.NodeID         `json:"nodeId"`             // Id of the node that has changed.
	AdoptedStyleSheets []cdp.StyleSheetID `json:"adoptedStyleSheets"` // New adoptedStyleSheets array.
}

EventAdoptedStyleSheetsModified fired when Element's adoptedStyleSheets are modified.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-adoptedStyleSheetsModified

type EventAffectedByStartingStylesFlagUpdated

type EventAffectedByStartingStylesFlagUpdated struct {
	NodeID                   cdp.NodeID `json:"nodeId"`                   // The id of the node.
	AffectedByStartingStyles bool       `json:"affectedByStartingStyles"` // If the node has starting styles.
}

EventAffectedByStartingStylesFlagUpdated fired when a node's starting styles changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-affectedByStartingStylesFlagUpdated

type EventAttributeModified

type EventAttributeModified struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
	Name   string     `json:"name"`   // Attribute name.
	Value  string     `json:"value"`  // Attribute value.
}

EventAttributeModified fired when Element's attribute is modified.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeModified

type EventAttributeRemoved

type EventAttributeRemoved struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
	Name   string     `json:"name"`   // A ttribute name.
}

EventAttributeRemoved fired when Element's attribute is removed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-attributeRemoved

type EventCharacterDataModified

type EventCharacterDataModified struct {
	NodeID        cdp.NodeID `json:"nodeId"`        // Id of the node that has changed.
	CharacterData string     `json:"characterData"` // New text value.
}

EventCharacterDataModified mirrors DOMCharacterDataModified event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-characterDataModified

type EventChildNodeCountUpdated

type EventChildNodeCountUpdated struct {
	NodeID         cdp.NodeID `json:"nodeId"`         // Id of the node that has changed.
	ChildNodeCount int64      `json:"childNodeCount"` // New node count.
}

EventChildNodeCountUpdated fired when Container's child node count has changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeCountUpdated

type EventChildNodeInserted

type EventChildNodeInserted struct {
	ParentNodeID   cdp.NodeID `json:"parentNodeId"`   // Id of the node that has changed.
	PreviousNodeID cdp.NodeID `json:"previousNodeId"` // Id of the previous sibling.
	Node           *cdp.Node  `json:"node"`           // Inserted node data.
}

EventChildNodeInserted mirrors DOMNodeInserted event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted

type EventChildNodeRemoved

type EventChildNodeRemoved struct {
	ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
	NodeID       cdp.NodeID `json:"nodeId"`       // Id of the node that has been removed.
}

EventChildNodeRemoved mirrors DOMNodeRemoved event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeRemoved

type EventDistributedNodesUpdated

type EventDistributedNodesUpdated struct {
	InsertionPointID cdp.NodeID         `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
	DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
}

EventDistributedNodesUpdated called when distribution is changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-distributedNodesUpdated

type EventDocumentUpdated

type EventDocumentUpdated struct{}

EventDocumentUpdated fired when Document has been totally updated. Node ids are no longer valid.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-documentUpdated

type EventInlineStyleInvalidated

type EventInlineStyleInvalidated struct {
	NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
}

EventInlineStyleInvalidated fired when Element's inline style is modified via a CSS property modification.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated

type EventPseudoElementAdded

type EventPseudoElementAdded struct {
	ParentID      cdp.NodeID `json:"parentId"`      // Pseudo element's parent element id.
	PseudoElement *cdp.Node  `json:"pseudoElement"` // The added pseudo element.
}

EventPseudoElementAdded called when a pseudo element is added to an element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementAdded

type EventPseudoElementRemoved

type EventPseudoElementRemoved struct {
	ParentID        cdp.NodeID `json:"parentId"`        // Pseudo element's parent element id.
	PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
}

EventPseudoElementRemoved called when a pseudo element is removed from an element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-pseudoElementRemoved

type EventScrollableFlagUpdated

type EventScrollableFlagUpdated struct {
	NodeID       cdp.NodeID `json:"nodeId"`       // The id of the node.
	IsScrollable bool       `json:"isScrollable"` // If the node is scrollable.
}

EventScrollableFlagUpdated fired when a node's scrollability state changes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-scrollableFlagUpdated

type EventSetChildNodes

type EventSetChildNodes struct {
	ParentID cdp.NodeID  `json:"parentId"` // Parent node id to populate with children.
	Nodes    []*cdp.Node `json:"nodes"`    // Child nodes array.
}

EventSetChildNodes fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-setChildNodes

type EventShadowRootPopped

type EventShadowRootPopped struct {
	HostID cdp.NodeID `json:"hostId"` // Host element id.
	RootID cdp.NodeID `json:"rootId"` // Shadow root id.
}

EventShadowRootPopped called when shadow root is popped from the element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPopped

type EventShadowRootPushed

type EventShadowRootPushed struct {
	HostID cdp.NodeID `json:"hostId"` // Host element id.
	Root   *cdp.Node  `json:"root"`   // Shadow root.
}

EventShadowRootPushed called when shadow root is pushed into the element.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-shadowRootPushed

type EventTopLayerElementsUpdated

type EventTopLayerElementsUpdated struct{}

EventTopLayerElementsUpdated called when top layer elements are changed.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-topLayerElementsUpdated

type FocusParams

type FocusParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
}

FocusParams are the parameters of the command DOM.focus.

type ForceShowInterestParams

type ForceShowInterestParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the interest invoker HTMLElement.
	Enable bool       `json:"enable"` // If true, opens and holds interest. If false, releases forced interest.
}

ForceShowInterestParams are the parameters of the command DOM.forceShowInterest.

type ForceShowPopoverParams

type ForceShowPopoverParams struct {
	NodeID        cdp.NodeID        `json:"nodeId"`                           // Id of the popover HTMLElement
	Enable        bool              `json:"enable"`                           // If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.
	InvokerNodeID cdp.BackendNodeID `json:"invokerNodeId,omitempty,omitzero"` // Optional ID of the element invoking this popover, used to establish the implicit anchor. If not provided, it will fall back to the first invoker in the document, preferring elements with a popovertarget attribute over those with a commandfor attribute. Note that if there are multiple invokers, this is just an estimate.
}

ForceShowPopoverParams are the parameters of the command DOM.forceShowPopover.

type ForceShowPopoverResult added in v0.157.3

type ForceShowPopoverResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // List of popovers that were closed in order to respect popover stacking order.
}

ForceShowPopoverResult is the result of the command DOM.forceShowPopover.

type GetAnchorElementParams

type GetAnchorElementParams struct {
	NodeID          cdp.NodeID `json:"nodeId"`                             // Id of the positioned element from which to find the anchor.
	AnchorSpecifier string     `json:"anchorSpecifier,omitempty,omitzero"` // An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.
}

GetAnchorElementParams are the parameters of the command DOM.getAnchorElement.

type GetAnchorElementResult added in v0.157.3

type GetAnchorElementResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // The anchor element of the given anchor query.
}

GetAnchorElementResult is the result of the command DOM.getAnchorElement.

type GetAttributesParams

type GetAttributesParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to retrieve attributes for.
}

GetAttributesParams are the parameters of the command DOM.getAttributes.

type GetAttributesResult added in v0.157.3

type GetAttributesResult struct {
	Attributes []string `json:"attributes,omitempty,omitzero"` // An interleaved array of node attribute names and values.
}

GetAttributesResult is the result of the command DOM.getAttributes.

type GetBoxModelParams

type GetBoxModelParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
}

GetBoxModelParams are the parameters of the command DOM.getBoxModel.

type GetBoxModelResult added in v0.157.3

type GetBoxModelResult struct {
	Model *BoxModel `json:"model,omitempty,omitzero"` // Box model for the node.
}

GetBoxModelResult is the result of the command DOM.getBoxModel.

type GetContainerForNodeParams

type GetContainerForNodeParams struct {
	NodeID             cdp.NodeID   `json:"nodeId"`
	ContainerName      string       `json:"containerName,omitempty,omitzero"`
	PhysicalAxes       PhysicalAxes `json:"physicalAxes,omitempty,omitzero"`
	LogicalAxes        LogicalAxes  `json:"logicalAxes,omitempty,omitzero"`
	QueriesScrollState *bool        `json:"queriesScrollState,omitempty,omitzero"`
	QueriesAnchored    *bool        `json:"queriesAnchored,omitempty,omitzero"`
}

GetContainerForNodeParams are the parameters of the command DOM.getContainerForNode.

type GetContainerForNodeResult added in v0.157.3

type GetContainerForNodeResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // The container node for the given node, or null if not found.
}

GetContainerForNodeResult is the result of the command DOM.getContainerForNode.

type GetContentQuadsParams

type GetContentQuadsParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
}

GetContentQuadsParams are the parameters of the command DOM.getContentQuads.

type GetContentQuadsResult added in v0.157.3

type GetContentQuadsResult struct {
	Quads []Quad `json:"quads,omitempty,omitzero"` // Quads that describe node layout relative to viewport.
}

GetContentQuadsResult is the result of the command DOM.getContentQuads.

type GetDetachedDomNodesResult added in v0.157.3

type GetDetachedDomNodesResult struct {
	DetachedNodes []*DetachedElementInfo `json:"detachedNodes,omitempty,omitzero"` // The list of detached nodes
}

GetDetachedDomNodesResult is the result of the command DOM.getDetachedDomNodes.

type GetDocumentParams

type GetDocumentParams struct {
	Depth  *int64 `json:"depth,omitempty,omitzero"`  // 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.
	Pierce *bool  `json:"pierce,omitempty,omitzero"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
}

GetDocumentParams are the parameters of the command DOM.getDocument.

type GetDocumentResult added in v0.157.3

type GetDocumentResult struct {
	Root *cdp.Node `json:"root,omitempty,omitzero"` // Resulting node.
}

GetDocumentResult is the result of the command DOM.getDocument.

type GetElementByRelationParams

type GetElementByRelationParams struct {
	NodeID   cdp.NodeID                   `json:"nodeId"`   // Id of the node from which to query the relation.
	Relation GetElementByRelationRelation `json:"relation"` // Type of relation to get.
}

GetElementByRelationParams are the parameters of the command DOM.getElementByRelation.

type GetElementByRelationRelation added in v0.157.1

type GetElementByRelationRelation string

GetElementByRelationRelation type of relation to get.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getElementByRelation

const (
	GetElementByRelationRelationPopoverTarget  GetElementByRelationRelation = "PopoverTarget"
	GetElementByRelationRelationInterestTarget GetElementByRelationRelation = "InterestTarget"
	GetElementByRelationRelationCommandFor     GetElementByRelationRelation = "CommandFor"
)

GetElementByRelationRelation values.

func (GetElementByRelationRelation) String added in v0.157.1

String returns the GetElementByRelationRelation as string value.

type GetElementByRelationResult added in v0.157.3

type GetElementByRelationResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // NodeId of the element matching the queried relation.
}

GetElementByRelationResult is the result of the command DOM.getElementByRelation.

type GetFileInfoParams

type GetFileInfoParams struct {
	ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id of the node wrapper.
}

GetFileInfoParams are the parameters of the command DOM.getFileInfo.

type GetFileInfoResult added in v0.157.3

type GetFileInfoResult struct {
	Path string `json:"path,omitempty,omitzero"`
}

GetFileInfoResult is the result of the command DOM.getFileInfo.

type GetFrameOwnerParams

type GetFrameOwnerParams struct {
	FrameID cdp.FrameID `json:"frameId"`
}

GetFrameOwnerParams are the parameters of the command DOM.getFrameOwner.

type GetFrameOwnerResult added in v0.157.3

type GetFrameOwnerResult struct {
	BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Resulting node.
	NodeID        cdp.NodeID        `json:"nodeId,omitempty,omitzero"`        // Id of the node at given coordinates, only when enabled and requested document.
}

GetFrameOwnerResult is the result of the command DOM.getFrameOwner.

type GetImplicitAnchorCandidatesParams

type GetImplicitAnchorCandidatesParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the popover HTMLElement.
}

GetImplicitAnchorCandidatesParams are the parameters of the command DOM.getImplicitAnchorCandidates.

type GetImplicitAnchorCandidatesResult added in v0.157.3

type GetImplicitAnchorCandidatesResult struct {
	BackendNodeIDs []cdp.BackendNodeID `json:"backendNodeIds,omitempty,omitzero"` // Candidate elements that can invoke this popover.
}

GetImplicitAnchorCandidatesResult is the result of the command DOM.getImplicitAnchorCandidates.

type GetNodeForLocationParams

type GetNodeForLocationParams struct {
	X                         int64 `json:"x"`                                            // X coordinate.
	Y                         int64 `json:"y"`                                            // Y coordinate.
	IncludeUserAgentShadowDOM *bool `json:"includeUserAgentShadowDOM,omitempty,omitzero"` // False to skip to the nearest non-UA shadow root ancestor (default: false).
	IgnorePointerEventsNone   *bool `json:"ignorePointerEventsNone,omitempty,omitzero"`   // Whether to ignore pointer-events: none on elements and hit test them.
}

GetNodeForLocationParams are the parameters of the command DOM.getNodeForLocation.

type GetNodeForLocationResult added in v0.157.3

type GetNodeForLocationResult struct {
	BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Resulting node.
	FrameID       cdp.FrameID       `json:"frameId,omitempty,omitzero"`       // Frame this node belongs to.
	NodeID        cdp.NodeID        `json:"nodeId,omitempty,omitzero"`        // Id of the node at given coordinates, only when enabled and requested document.
}

GetNodeForLocationResult is the result of the command DOM.getNodeForLocation.

type GetNodeStackTracesParams

type GetNodeStackTracesParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get stack traces for.
}

GetNodeStackTracesParams are the parameters of the command DOM.getNodeStackTraces.

type GetNodeStackTracesResult added in v0.157.3

type GetNodeStackTracesResult struct {
	Creation *runtime.StackTrace `json:"creation,omitempty,omitzero"` // Creation stack trace, if available.
}

GetNodeStackTracesResult is the result of the command DOM.getNodeStackTraces.

type GetNodesForSubtreeByStyleParams

type GetNodesForSubtreeByStyleParams struct {
	NodeID         cdp.NodeID                  `json:"nodeId"`                    // Node ID pointing to the root of a subtree.
	ComputedStyles []*CSSComputedStyleProperty `json:"computedStyles"`            // The style to filter nodes by (includes nodes if any of properties matches).
	Pierce         *bool                       `json:"pierce,omitempty,omitzero"` // Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false).
}

GetNodesForSubtreeByStyleParams are the parameters of the command DOM.getNodesForSubtreeByStyle.

type GetNodesForSubtreeByStyleResult added in v0.157.3

type GetNodesForSubtreeByStyleResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // Resulting nodes.
}

GetNodesForSubtreeByStyleResult is the result of the command DOM.getNodesForSubtreeByStyle.

type GetOuterHTMLParams

type GetOuterHTMLParams struct {
	NodeID           cdp.NodeID             `json:"nodeId,omitempty,omitzero"`           // Identifier of the node.
	BackendNodeID    cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"`    // Identifier of the backend node.
	ObjectID         runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`         // JavaScript object id of the node wrapper.
	IncludeShadowDOM *bool                  `json:"includeShadowDOM,omitempty,omitzero"` // Include all shadow roots. Equals to false if not specified.
}

GetOuterHTMLParams are the parameters of the command DOM.getOuterHTML.

type GetOuterHTMLResult added in v0.157.3

type GetOuterHTMLResult struct {
	OuterHTML string `json:"outerHTML,omitempty,omitzero"` // Outer HTML markup.
}

GetOuterHTMLResult is the result of the command DOM.getOuterHTML.

type GetQueryingDescendantsForContainerParams

type GetQueryingDescendantsForContainerParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the container node to find querying descendants from.
}

GetQueryingDescendantsForContainerParams are the parameters of the command DOM.getQueryingDescendantsForContainer.

type GetQueryingDescendantsForContainerResult added in v0.157.3

type GetQueryingDescendantsForContainerResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // Descendant nodes with container queries against the given container.
}

GetQueryingDescendantsForContainerResult is the result of the command DOM.getQueryingDescendantsForContainer.

type GetRelayoutBoundaryParams

type GetRelayoutBoundaryParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node.
}

GetRelayoutBoundaryParams are the parameters of the command DOM.getRelayoutBoundary.

type GetRelayoutBoundaryResult added in v0.157.3

type GetRelayoutBoundaryResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Relayout boundary node id for the given node.
}

GetRelayoutBoundaryResult is the result of the command DOM.getRelayoutBoundary.

type GetSearchResultsParams

type GetSearchResultsParams struct {
	SearchID  string `json:"searchId"`  // Unique search session identifier.
	FromIndex int64  `json:"fromIndex"` // Start index of the search result to be returned.
	ToIndex   int64  `json:"toIndex"`   // End index of the search result to be returned.
}

GetSearchResultsParams are the parameters of the command DOM.getSearchResults.

type GetSearchResultsResult added in v0.157.3

type GetSearchResultsResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // Ids of the search result nodes.
}

GetSearchResultsResult is the result of the command DOM.getSearchResults.

type GetTopLayerElementsResult added in v0.157.3

type GetTopLayerElementsResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // NodeIds of top layer elements
}

GetTopLayerElementsResult is the result of the command DOM.getTopLayerElements.

type LogicalAxes

type LogicalAxes string

LogicalAxes containerSelector logical axes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-LogicalAxes

const (
	LogicalAxesInline LogicalAxes = "Inline"
	LogicalAxesBlock  LogicalAxes = "Block"
	LogicalAxesBoth   LogicalAxes = "Both"
)

LogicalAxes values.

func (LogicalAxes) String

func (t LogicalAxes) String() string

String returns the LogicalAxes as string value.

type MoveToParams

type MoveToParams struct {
	NodeID             cdp.NodeID `json:"nodeId"`                                // Id of the node to move.
	TargetNodeID       cdp.NodeID `json:"targetNodeId"`                          // Id of the element to drop the moved node into.
	InsertBeforeNodeID cdp.NodeID `json:"insertBeforeNodeId,omitempty,omitzero"` // Drop node before this one (if absent, the moved node becomes the last child of targetNodeId).
}

MoveToParams are the parameters of the command DOM.moveTo.

type MoveToResult added in v0.157.3

type MoveToResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // New id of the moved node.
}

MoveToResult is the result of the command DOM.moveTo.

type PerformSearchParams

type PerformSearchParams struct {
	Query                     string `json:"query"`                                        // Plain text or query selector or XPath search query.
	IncludeUserAgentShadowDOM *bool  `json:"includeUserAgentShadowDOM,omitempty,omitzero"` // True to search in user agent shadow DOM.
}

PerformSearchParams are the parameters of the command DOM.performSearch.

type PerformSearchResult added in v0.157.3

type PerformSearchResult struct {
	SearchID    string `json:"searchId,omitempty,omitzero"`    // Unique search session identifier.
	ResultCount int64  `json:"resultCount,omitempty,omitzero"` // Number of search results.
}

PerformSearchResult is the result of the command DOM.performSearch.

type PhysicalAxes

type PhysicalAxes string

PhysicalAxes containerSelector physical axes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-PhysicalAxes

const (
	PhysicalAxesHorizontal PhysicalAxes = "Horizontal"
	PhysicalAxesVertical   PhysicalAxes = "Vertical"
	PhysicalAxesBoth       PhysicalAxes = "Both"
)

PhysicalAxes values.

func (PhysicalAxes) String

func (t PhysicalAxes) String() string

String returns the PhysicalAxes as string value.

type PushNodeByPathToFrontendParams

type PushNodeByPathToFrontendParams struct {
	Path string `json:"path"` // Path to node in the proprietary format.
}

PushNodeByPathToFrontendParams are the parameters of the command DOM.pushNodeByPathToFrontend.

type PushNodeByPathToFrontendResult added in v0.157.3

type PushNodeByPathToFrontendResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Id of the node for given path.
}

PushNodeByPathToFrontendResult is the result of the command DOM.pushNodeByPathToFrontend.

type PushNodesByBackendIDsToFrontendParams

type PushNodesByBackendIDsToFrontendParams struct {
	BackendNodeIDs []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids.
}

PushNodesByBackendIDsToFrontendParams are the parameters of the command DOM.pushNodesByBackendIdsToFrontend.

type PushNodesByBackendIDsToFrontendResult added in v0.157.3

type PushNodesByBackendIDsToFrontendResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
}

PushNodesByBackendIDsToFrontendResult is the result of the command DOM.pushNodesByBackendIdsToFrontend.

type Quad

type Quad []float64

Quad an array of quad vertices, x immediately followed by y for each point, points clock-wise.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Quad

type QuerySelectorAllParams

type QuerySelectorAllParams struct {
	NodeID   cdp.NodeID `json:"nodeId"`   // Id of the node to query upon.
	Selector string     `json:"selector"` // Selector string.
}

QuerySelectorAllParams are the parameters of the command DOM.querySelectorAll.

type QuerySelectorAllResult added in v0.157.3

type QuerySelectorAllResult struct {
	NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // Query selector result.
}

QuerySelectorAllResult is the result of the command DOM.querySelectorAll.

type QuerySelectorParams

type QuerySelectorParams struct {
	NodeID   cdp.NodeID `json:"nodeId"`   // Id of the node to query upon.
	Selector string     `json:"selector"` // Selector string.
}

QuerySelectorParams are the parameters of the command DOM.querySelector.

type QuerySelectorResult added in v0.157.3

type QuerySelectorResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Query selector result.
}

QuerySelectorResult is the result of the command DOM.querySelector.

type Rect

type Rect struct {
	X      float64 `json:"x"`      // X coordinate
	Y      float64 `json:"y"`      // Y coordinate
	Width  float64 `json:"width"`  // Rectangle width
	Height float64 `json:"height"` // Rectangle height
}

Rect Rectangle.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Rect

type RemoveAttributeParams

type RemoveAttributeParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the element to remove attribute from.
	Name   string     `json:"name"`   // Name of the attribute to remove.
}

RemoveAttributeParams are the parameters of the command DOM.removeAttribute.

type RemoveNodeParams

type RemoveNodeParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to remove.
}

RemoveNodeParams are the parameters of the command DOM.removeNode.

type RequestChildNodesParams

type RequestChildNodesParams struct {
	NodeID cdp.NodeID `json:"nodeId"`                    // Id of the node to get children for.
	Depth  *int64     `json:"depth,omitempty,omitzero"`  // 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.
	Pierce *bool      `json:"pierce,omitempty,omitzero"` // Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
}

RequestChildNodesParams are the parameters of the command DOM.requestChildNodes.

type RequestNodeParams

type RequestNodeParams struct {
	ObjectID runtime.RemoteObjectID `json:"objectId"` // JavaScript object id to convert into node.
}

RequestNodeParams are the parameters of the command DOM.requestNode.

type RequestNodeResult added in v0.157.3

type RequestNodeResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // Node id for given object.
}

RequestNodeResult is the result of the command DOM.requestNode.

type ResolveNodeParams

type ResolveNodeParams struct {
	NodeID             cdp.NodeID                 `json:"nodeId,omitempty,omitzero"`             // Id of the node to resolve.
	BackendNodeID      cdp.BackendNodeID          `json:"backendNodeId,omitempty,omitzero"`      // Backend identifier of the node to resolve.
	ObjectGroup        string                     `json:"objectGroup,omitempty,omitzero"`        // Symbolic group name that can be used to release multiple objects.
	ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty,omitzero"` // Execution context in which to resolve the node.
}

ResolveNodeParams are the parameters of the command DOM.resolveNode.

type ResolveNodeResult added in v0.157.3

type ResolveNodeResult struct {
	Object *runtime.RemoteObject `json:"object,omitempty,omitzero"` // JavaScript object wrapper for given node.
}

ResolveNodeResult is the result of the command DOM.resolveNode.

type ScrollIntoViewIfNeededParams

type ScrollIntoViewIfNeededParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
	Rect          *Rect                  `json:"rect,omitempty,omitzero"`          // The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.
}

ScrollIntoViewIfNeededParams are the parameters of the command DOM.scrollIntoViewIfNeeded.

type ScrollOrientation

type ScrollOrientation string

ScrollOrientation physical scroll orientation.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ScrollOrientation

const (
	ScrollOrientationHorizontal ScrollOrientation = "horizontal"
	ScrollOrientationVertical   ScrollOrientation = "vertical"
)

ScrollOrientation values.

func (ScrollOrientation) String

func (t ScrollOrientation) String() string

String returns the ScrollOrientation as string value.

type SetAttributeValueParams

type SetAttributeValueParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the element to set attribute for.
	Name   string     `json:"name"`   // Attribute name.
	Value  string     `json:"value"`  // Attribute value.
}

SetAttributeValueParams are the parameters of the command DOM.setAttributeValue.

type SetAttributesAsTextParams

type SetAttributesAsTextParams struct {
	NodeID cdp.NodeID `json:"nodeId"`                  // Id of the element to set attributes for.
	Text   string     `json:"text"`                    // Text with a number of attributes. Will parse this text using HTML parser.
	Name   string     `json:"name,omitempty,omitzero"` // Attribute name to replace with new attributes derived from text in case text parsed successfully.
}

SetAttributesAsTextParams are the parameters of the command DOM.setAttributesAsText.

type SetFileInputFilesParams

type SetFileInputFilesParams struct {
	Files         []string               `json:"files"`                            // Array of file paths to set.
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
}

SetFileInputFilesParams are the parameters of the command DOM.setFileInputFiles.

type SetInspectedNodeParams

type SetInspectedNodeParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // DOM node id to be accessible by means of $x command line API.
}

SetInspectedNodeParams are the parameters of the command DOM.setInspectedNode.

type SetNodeNameParams

type SetNodeNameParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to set name for.
	Name   string     `json:"name"`   // New node's name.
}

SetNodeNameParams are the parameters of the command DOM.setNodeName.

type SetNodeNameResult added in v0.157.3

type SetNodeNameResult struct {
	NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"` // New node's id.
}

SetNodeNameResult is the result of the command DOM.setNodeName.

type SetNodeStackTracesEnabledParams

type SetNodeStackTracesEnabledParams struct {
	Enable bool `json:"enable"` // Enable or disable.
}

SetNodeStackTracesEnabledParams are the parameters of the command DOM.setNodeStackTracesEnabled.

type SetNodeValueParams

type SetNodeValueParams struct {
	NodeID cdp.NodeID `json:"nodeId"` // Id of the node to set value for.
	Value  string     `json:"value"`  // New node's value.
}

SetNodeValueParams are the parameters of the command DOM.setNodeValue.

type SetOuterHTMLParams

type SetOuterHTMLParams struct {
	NodeID    cdp.NodeID `json:"nodeId"`    // Id of the node to set markup for.
	OuterHTML string     `json:"outerHTML"` // Outer HTML markup to set.
}

SetOuterHTMLParams are the parameters of the command DOM.setOuterHTML.

type SetTextMarkerParams

type SetTextMarkerParams struct {
	NodeID        cdp.NodeID             `json:"nodeId,omitempty,omitzero"`        // Identifier of the node.
	BackendNodeID cdp.BackendNodeID      `json:"backendNodeId,omitempty,omitzero"` // Identifier of the backend node.
	ObjectID      runtime.RemoteObjectID `json:"objectId,omitempty,omitzero"`      // JavaScript object id of the node wrapper.
	Type          SetTextMarkerType      `json:"type"`                             // The type of marker to set on the given range of text.
	Start         int64                  `json:"start"`                            // Start offset into the element's rendered text in UTF-16 code units. For a text control, an offset into the control's value. Offsets count text in DOM order and do not enter shadow trees. To mark text inside a shadow tree, pass the element inside the shadow tree.
	End           int64                  `json:"end"`                              // End offset (exclusive) in the same units and space as start.
}

SetTextMarkerParams are the parameters of the command DOM.setTextMarker.

type SetTextMarkerType added in v0.157.1

type SetTextMarkerType string

SetTextMarkerType the type of marker to set on the given range of text.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setTextMarker

const (
	SetTextMarkerTypeSpelling SetTextMarkerType = "spelling"
	SetTextMarkerTypeGrammar  SetTextMarkerType = "grammar"
)

SetTextMarkerType values.

func (SetTextMarkerType) String added in v0.157.1

func (t SetTextMarkerType) String() string

String returns the SetTextMarkerType as string value.

type ShapeOutsideInfo

type ShapeOutsideInfo struct {
	Bounds      Quad           `json:"bounds"`      // Shape bounds
	Shape       []jsonv2.Value `json:"shape"`       // Shape coordinate details
	MarginShape []jsonv2.Value `json:"marginShape"` // Margin shape bounds
}

ShapeOutsideInfo CSS Shape Outside details.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ShapeOutsideInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL