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
- Variables
- type BoxModel
- type CSSComputedStyleProperty
- type CollectClassNamesFromSubtreeParams
- type CollectClassNamesFromSubtreeResult
- type CopyToParams
- type CopyToResult
- type DescribeNodeParams
- type DescribeNodeResult
- type DetachedElementInfo
- type DiscardSearchResultsParams
- type EnableIncludeWhitespace
- type EnableParams
- type EventAdRelatedStateUpdated
- type EventAdoptedStyleSheetsModified
- type EventAffectedByStartingStylesFlagUpdated
- type EventAttributeModified
- type EventAttributeRemoved
- type EventCharacterDataModified
- type EventChildNodeCountUpdated
- type EventChildNodeInserted
- type EventChildNodeRemoved
- type EventDistributedNodesUpdated
- type EventDocumentUpdated
- type EventInlineStyleInvalidated
- type EventPseudoElementAdded
- type EventPseudoElementRemoved
- type EventScrollableFlagUpdated
- type EventSetChildNodes
- type EventShadowRootPopped
- type EventShadowRootPushed
- type EventTopLayerElementsUpdated
- type FocusParams
- type ForceShowInterestParams
- type ForceShowPopoverParams
- type ForceShowPopoverResult
- type GetAnchorElementParams
- type GetAnchorElementResult
- type GetAttributesParams
- type GetAttributesResult
- type GetBoxModelParams
- type GetBoxModelResult
- type GetContainerForNodeParams
- type GetContainerForNodeResult
- type GetContentQuadsParams
- type GetContentQuadsResult
- type GetDetachedDomNodesResult
- type GetDocumentParams
- type GetDocumentResult
- type GetElementByRelationParams
- type GetElementByRelationRelation
- type GetElementByRelationResult
- type GetFileInfoParams
- type GetFileInfoResult
- type GetFrameOwnerParams
- type GetFrameOwnerResult
- type GetImplicitAnchorCandidatesParams
- type GetImplicitAnchorCandidatesResult
- type GetNodeForLocationParams
- type GetNodeForLocationResult
- type GetNodeStackTracesParams
- type GetNodeStackTracesResult
- type GetNodesForSubtreeByStyleParams
- type GetNodesForSubtreeByStyleResult
- type GetOuterHTMLParams
- type GetOuterHTMLResult
- type GetQueryingDescendantsForContainerParams
- type GetQueryingDescendantsForContainerResult
- type GetRelayoutBoundaryParams
- type GetRelayoutBoundaryResult
- type GetSearchResultsParams
- type GetSearchResultsResult
- type GetTopLayerElementsResult
- type LogicalAxes
- type MoveToParams
- type MoveToResult
- type PerformSearchParams
- type PerformSearchResult
- type PhysicalAxes
- type PushNodeByPathToFrontendParams
- type PushNodeByPathToFrontendResult
- type PushNodesByBackendIDsToFrontendParams
- type PushNodesByBackendIDsToFrontendResult
- type Quad
- type QuerySelectorAllParams
- type QuerySelectorAllResult
- type QuerySelectorParams
- type QuerySelectorResult
- type Rect
- type RemoveAttributeParams
- type RemoveNodeParams
- type RequestChildNodesParams
- type RequestNodeParams
- type RequestNodeResult
- type ResolveNodeParams
- type ResolveNodeResult
- type ScrollIntoViewIfNeededParams
- type ScrollOrientation
- type SetAttributeValueParams
- type SetAttributesAsTextParams
- type SetFileInputFilesParams
- type SetInspectedNodeParams
- type SetNodeNameParams
- type SetNodeNameResult
- type SetNodeStackTracesEnabledParams
- type SetNodeValueParams
- type SetOuterHTMLParams
- type SetTextMarkerParams
- type SetTextMarkerType
- type ShapeOutsideInfo
Constants ¶
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 ¶
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
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
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
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
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
var CharacterDataModified = cdp.Event[EventCharacterDataModified]{Method: "DOM.characterDataModified"}
CharacterDataModified mirrors DOMCharacterDataModified event.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-characterDataModified
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
var ChildNodeInserted = cdp.Event[EventChildNodeInserted]{Method: "DOM.childNodeInserted"}
ChildNodeInserted mirrors DOMNodeInserted event.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted
var ChildNodeRemoved = cdp.Event[EventChildNodeRemoved]{Method: "DOM.childNodeRemoved"}
ChildNodeRemoved mirrors DOMNodeRemoved event.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeRemoved
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
var CollectClassNamesFromSubtree = cdp.Command[CollectClassNamesFromSubtreeParams, CollectClassNamesFromSubtreeResult]{Method: CommandCollectClassNamesFromSubtree}
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
var CopyTo = cdp.Command[CopyToParams, CopyToResult]{Method: CommandCopyTo}
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
var DescribeNode = cdp.Command[DescribeNodeParams, DescribeNodeResult]{Method: CommandDescribeNode}
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
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
var DiscardSearchResults = cdp.Command[DiscardSearchResultsParams, cdp.Empty]{Method: CommandDiscardSearchResults}
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
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
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
var Enable = cdp.Command[EnableParams, cdp.Empty]{Method: CommandEnable}
Enable enables DOM agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
var Focus = cdp.Command[FocusParams, cdp.Empty]{Method: CommandFocus}
Focus focuses the given element.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-focus
var ForceShowInterest = cdp.Command[ForceShowInterestParams, cdp.Empty]{Method: CommandForceShowInterest}
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
var ForceShowPopover = cdp.Command[ForceShowPopoverParams, ForceShowPopoverResult]{Method: CommandForceShowPopover}
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
var GetAnchorElement = cdp.Command[GetAnchorElementParams, GetAnchorElementResult]{Method: CommandGetAnchorElement}
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
var GetAttributes = cdp.Command[GetAttributesParams, GetAttributesResult]{Method: CommandGetAttributes}
GetAttributes returns attributes for the specified node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAttributes
var GetBoxModel = cdp.Command[GetBoxModelParams, GetBoxModelResult]{Method: CommandGetBoxModel}
GetBoxModel returns boxes for the given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getBoxModel
var GetContainerForNode = cdp.Command[GetContainerForNodeParams, GetContainerForNodeResult]{Method: CommandGetContainerForNode}
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
var GetContentQuads = cdp.Command[GetContentQuadsParams, GetContentQuadsResult]{Method: CommandGetContentQuads}
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
var GetDetachedDomNodes = cdp.Command[cdp.Empty, GetDetachedDomNodesResult]{Method: CommandGetDetachedDomNodes}
GetDetachedDomNodes returns list of detached nodes.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getDetachedDomNodes
var GetDocument = cdp.Command[GetDocumentParams, GetDocumentResult]{Method: CommandGetDocument}
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
var GetElementByRelation = cdp.Command[GetElementByRelationParams, GetElementByRelationResult]{Method: CommandGetElementByRelation}
GetElementByRelation returns the NodeId of the matched element according to certain relations.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getElementByRelation
var GetFileInfo = cdp.Command[GetFileInfoParams, GetFileInfoResult]{Method: CommandGetFileInfo}
GetFileInfo returns file information for the given File wrapper.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFileInfo
var GetFrameOwner = cdp.Command[GetFrameOwnerParams, GetFrameOwnerResult]{Method: CommandGetFrameOwner}
GetFrameOwner returns iframe node that owns iframe with the given domain.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFrameOwner
var GetImplicitAnchorCandidates = cdp.Command[GetImplicitAnchorCandidatesParams, GetImplicitAnchorCandidatesResult]{Method: CommandGetImplicitAnchorCandidates}
GetImplicitAnchorCandidates returns candidate nodes that are configured as triggers for the given popover.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getImplicitAnchorCandidates
var GetNodeForLocation = cdp.Command[GetNodeForLocationParams, GetNodeForLocationResult]{Method: CommandGetNodeForLocation}
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
var GetNodeStackTraces = cdp.Command[GetNodeStackTracesParams, GetNodeStackTracesResult]{Method: CommandGetNodeStackTraces}
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
var GetNodesForSubtreeByStyle = cdp.Command[GetNodesForSubtreeByStyleParams, GetNodesForSubtreeByStyleResult]{Method: CommandGetNodesForSubtreeByStyle}
GetNodesForSubtreeByStyle finds nodes with a given computed style in a subtree.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodesForSubtreeByStyle
var GetOuterHTML = cdp.Command[GetOuterHTMLParams, GetOuterHTMLResult]{Method: CommandGetOuterHTML}
GetOuterHTML returns node's HTML markup.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getOuterHTML
var GetQueryingDescendantsForContainer = cdp.Command[GetQueryingDescendantsForContainerParams, GetQueryingDescendantsForContainerResult]{Method: CommandGetQueryingDescendantsForContainer}
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
var GetRelayoutBoundary = cdp.Command[GetRelayoutBoundaryParams, GetRelayoutBoundaryResult]{Method: CommandGetRelayoutBoundary}
GetRelayoutBoundary returns the id of the nearest ancestor that is a relayout boundary.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getRelayoutBoundary
var GetSearchResults = cdp.Command[GetSearchResultsParams, GetSearchResultsResult]{Method: CommandGetSearchResults}
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
var GetTopLayerElements = cdp.Command[cdp.Empty, GetTopLayerElementsResult]{Method: CommandGetTopLayerElements}
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
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
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
var MoveTo = cdp.Command[MoveToParams, MoveToResult]{Method: CommandMoveTo}
MoveTo moves node into the new container, places it before the given anchor.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-moveTo
var PerformSearch = cdp.Command[PerformSearchParams, PerformSearchResult]{Method: CommandPerformSearch}
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
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
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
var PushNodeByPathToFrontend = cdp.Command[PushNodeByPathToFrontendParams, PushNodeByPathToFrontendResult]{Method: CommandPushNodeByPathToFrontend}
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
var PushNodesByBackendIDsToFrontend = cdp.Command[PushNodesByBackendIDsToFrontendParams, PushNodesByBackendIDsToFrontendResult]{Method: CommandPushNodesByBackendIDsToFrontend}
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
var QuerySelector = cdp.Command[QuerySelectorParams, QuerySelectorResult]{Method: CommandQuerySelector}
QuerySelector executes querySelector on a given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelector
var QuerySelectorAll = cdp.Command[QuerySelectorAllParams, QuerySelectorAllResult]{Method: CommandQuerySelectorAll}
QuerySelectorAll executes querySelectorAll on a given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelectorAll
var Redo = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandRedo}
Redo re-does the last undone action.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-redo
var RemoveAttribute = cdp.Command[RemoveAttributeParams, cdp.Empty]{Method: CommandRemoveAttribute}
RemoveAttribute removes attribute with given name from an element with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeAttribute
var RemoveNode = cdp.Command[RemoveNodeParams, cdp.Empty]{Method: CommandRemoveNode}
RemoveNode removes node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeNode
var RequestChildNodes = cdp.Command[RequestChildNodesParams, cdp.Empty]{Method: CommandRequestChildNodes}
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
var RequestNode = cdp.Command[RequestNodeParams, RequestNodeResult]{Method: CommandRequestNode}
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
var ResolveNode = cdp.Command[ResolveNodeParams, ResolveNodeResult]{Method: CommandResolveNode}
ResolveNode resolves the JavaScript node object for a given NodeId or BackendNodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-resolveNode
var ScrollIntoViewIfNeeded = cdp.Command[ScrollIntoViewIfNeededParams, cdp.Empty]{Method: CommandScrollIntoViewIfNeeded}
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
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
var SetAttributeValue = cdp.Command[SetAttributeValueParams, cdp.Empty]{Method: CommandSetAttributeValue}
SetAttributeValue sets attribute for an element with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributeValue
var SetAttributesAsText = cdp.Command[SetAttributesAsTextParams, cdp.Empty]{Method: CommandSetAttributesAsText}
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
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
var SetFileInputFiles = cdp.Command[SetFileInputFilesParams, cdp.Empty]{Method: CommandSetFileInputFiles}
SetFileInputFiles sets files for the given file input element.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setFileInputFiles
var SetInspectedNode = cdp.Command[SetInspectedNodeParams, cdp.Empty]{Method: CommandSetInspectedNode}
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
var SetNodeName = cdp.Command[SetNodeNameParams, SetNodeNameResult]{Method: CommandSetNodeName}
SetNodeName sets node name for a node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeName
var SetNodeStackTracesEnabled = cdp.Command[SetNodeStackTracesEnabledParams, cdp.Empty]{Method: CommandSetNodeStackTracesEnabled}
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
var SetNodeValue = cdp.Command[SetNodeValueParams, cdp.Empty]{Method: CommandSetNodeValue}
SetNodeValue sets node value for a node with given id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeValue
var SetOuterHTML = cdp.Command[SetOuterHTMLParams, cdp.Empty]{Method: CommandSetOuterHTML}
SetOuterHTML sets node HTML markup, returns new node id.
See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setOuterHTML
var SetTextMarker = cdp.Command[SetTextMarkerParams, cdp.Empty]{Method: CommandSetTextMarker}
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
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
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
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
var Undo = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandUndo}
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
func (t GetElementByRelationRelation) String() string
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 ¶
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 ¶
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 ¶
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